FAQ Database Discussion Community


Get post save event in Odoo

events,openerp,odoo
I want to execute a function after some record is saved in the database (something like Signals in Django). I have tried using Odoo Connector but with no success. connector module is not present in openerp.addons package by default and I could not find a good resource to understand how...

how i know who is the active user in odoo 8

openerp,openerp-7,odoo,openerp-8,odoo-8
i have a table orders this orders are made by juan, and juan asigment to pedro, i want to list only the orders for pedro when Pedro logg, how i can filter this???? i have a table orders this orders are made by juan, and juan asigment to pedro, i...

bootstrap-less was not found When ODOO Theme Change?

openerp,odoo
install the ODOO app bootstrap theme then problem bootstrap-less was not found web.assest Not Found Help me ...

there is possible to related a related field?

field,openerp,odoo
there is possible to related a related field ? I did 1st object _columns = { 'sale_price_unit': fields.related('sale_line_id','price_unit',string='Prix de vente',type='float', store=True, readonly=True), } the other object _columns={ 'sale_price_unit': fields.related('procurement_id','sale_price_unit',string='Prix de vente',type='float', store=True, readonly=True), } the value of the 2nd object alwayse equal 0.0 !!...

how to use ajax call with jQuery toggle button

jquery,ajax,onclick,jsonp,openerp
I am working with OpenERP-odoo module. In which toggle button is used to display publish-unpublish on click. on each click there is some background process to fetch data using json rpc I want to .hide() this toggle button for the duration while background process [Inshort: i dont want to toggle...

OpenERP - bringing related field from another table into tree view

openerp,odoo
I am trying to bring in "name" field from product.category table into the tree view via related x_nk_class_desc field. Here is my py code: class mrp_bom(osv.osv): _inherit = 'mrp.bom' _name = 'mrp.bom' _columns = { 'x_nk_default_code': fields.related('product_id', 'default_code', type='char', relation='product.product', string='Part Number', store=True, readonly=True), 'x_nk_class_desc': fields.related('product_tmpl_id', 'categ_id', type='char', relation='product.template', string='Class...

OpenERP - which field is getting the value from overridden name_get() function?

openerp,odoo
I hope this question makes sense. My goal is to display field as defined in name_get(). I have overridden name_get() function in mrp_bom class, code attached. However, I don't know which field will get return value from the function name_get(). Any insight is greatly appreciated! class mrp_bom(osv.osv): _inherit = 'mrp.bom'...

Using popup window to get user inputs and use those inputs in button's function in OpenERP

python,openerp,odoo
I would like to ask community to evaluate my solution in OpenERP. I am using Odoo v8. I have created a popup window with two fields, original_code and replacement_code, and the button with caption "Replace". The popup is launched from parent page "More" button dropdown option. Use case is that...

How to set a specific lines order in a one2many field in OpenERP7?

order,openerp,openerp-7
Is it possible to order lines in a one2many field by a specific column without modifying the original class order? Let's put an example: The model res.partner is ordered by the field name. So, if you open a res.partner view, the rows are going to be ordered by their name....

change color background kanban in odoo

xml,openerp,odoo
I need change to color background red if expired/date deadline in less than date now, and change to color background green if expired/date deadline more than date now, and change to color background orange if expired/date deadline in less than 1 days and 3 days <div t-if="record.eth_current_stage_deadline.raw_value and record.eth_current_stage_deadline.raw_value gt...

filter tree view of header model on base of values of the detail model

openerp,odoo,openerp-7
I have a model 'purchase_approval_item' with an invoice_id multiple people approve the invoice and they are registered in the model 'purchase_approval_item_line' Now i need to show the 'purchase_approval_item' in a tree view, but filter is for the logged in user. I want to add one2many field in 'purchase_approval_item', approved_by_ids which...

Add(Sum) two values in odoo

openerp,odoo
Suppose I have two field. Such as num1 and num2. I want to show the sum of these values in tree view. How to apply this in odoo?

OpenERP, Aptana - debugging Python code, breakpoint not working

python,openerp,aptana,odoo
I have created Odoo v8 PyDev project in Aptana. When I run the openerp server from Aptana, and set a breakpoint in my file product_nk.py, the program does not stop at this break point although I navigated to the Odoo web pages where the functionality is linked to the code...

How to order by a boolean field in Odoo?

order,openerp,odoo,odoo-8,kanban
I can't understand the behaviour of the Odoo API. It's driving me crazy. As you may know, if you want to order a model by some of its fields, you have to modify the attribute _order of the model. It works fine. Now, suppose you want to order a specific...

OpenERP 7.0 except_orm: 'View error', u"Can't find field

python,module,openerp
final version of my problem is this error : except_orm: ('View error', u"Can't find field 'purchase_order_id' in the following view parts composing the view of object model 'fleet.vehicle':\n * Inherited Fleet Vehicle Form\n\nEither you wrongly customized this view, or some modules bringing those views are not compatible with your current...

Error while installing Odoo

centos,openerp,odoo-8
Finished Dependency Resolution Error Package: odoo-8.0_20150617-1.noarch (odoo-nightly) Requires: python(abi) = 2.7 Installed: python-2.6.6-52.el6.x86_64 (@base) python(abi) = 2.6 Available: python-2.6.6-51.el6.x86_64 (test) python(abi) = 2.6 trying using --skip-broken to work around the problem trying running: rpm -Va --nofiles --nodigest Steps Which I Followed installed the pstgresql 9.4.4 updated the python 2.6 to...

OpenERP - field not showing in a tree view

openerp,odoo
Here is my XML file. For some reason the field "product_uom" is not showing in view's tree view. Any insights why it is happening and how I can make it show? <tree string="Components" editable="bottom"> <field name="sequence" widget="handle"/> <field name="product_id" on_change="onchange_product_id(product_id, product_qty)"/> <field name="type"/> <field name="product_qty"/> <field name="product_uom" on_change="onchange_uom(product_id, product_uom)" groups="product.group_uom"/>...

Getting error: TemplateAssertionError: no filter named 'n' when printing report?

python,templates,openerp,odoo
I am trying to print a report for a custom module I am building with Odoo, but when I try to print I get the following error: File "/opt/odoo/openerp/service/report.py", line 93, in go result, format = openerp.report.render_report(cr, uid, ids, object, datas, context) File "/opt/odoo/openerp/report/__init__.py", line 40, in render_report return registry['ir.actions.report.xml'].render_report(cr,...

any way to format date with function field odoo?

date,field,openerp,odoo
is there a way to display date field in different format on the view of odoo/openerp ? I tried using function fields as the follow lines: def _format_date(self, cr, uid, ids, field_name, arg, context=None): res = {} for line in self.browse(cr, uid, ids, context=context): res[line.id]= { 'date_fin':'', } print line.id,'date...

OpenERP - related field returns empty rows

openerp,odoo
I have two related fields in question, x_nk_categ_id and x_nk_class_desc. For some reason field "x_nk_class_desc" is returning empty rows. I have checked in the table mrp_bom, field x_nk_categ_id is correctly populated with categ_id values, but column x_nk_class_desc is empty. class mrp_bom(osv.osv): _inherit = 'mrp.bom' _name = 'mrp.bom' _columns = {...

I can't identify which class have this errors (odoo)

python,orm,openerp,odoo,openerp-8
I'm developing an OpenERP module and it contains too many class and when i try to install it i go that errors and i can't find which class have this error what should i do (i develop with eclipse IDE) Traceback (most recent call last): File "C:\Users\Mostafa\PycharmProjects\odoo\odoo8\openerp\http.py", line 517, in...

I can't find my module in Odoo

openerp,odoo,openerp-8
I have created a module in Odoo 8 following a tutorial. I activated the technical features in Users then I've updated the module list but it doesn't appear in the list. What should I do ?...

Automatic user creation in odoo8 when custom record created using inheritance by delegation

python,inheritance,openerp,odoo
How can i create user from my custom model using inheritance by delegation? Please explain with a sample code. Actually i need to create user when someone registered in my custom model.Thanks in advance...

Inherit product save method

openerp,odoo,odoo-8
I would like to run a script when a product is saved (added or updated). Following the advice of the answer to this thread, I created and installed a module and tried to override the save method of product.product, like so: # -*- coding: utf-8 -*- from openerp.osv import osv...

Python convert datetime string to date

python,django,python-2.7,openerp,openerp-7
I have this string (It's come from a variable. as a example, st_date) '2015-01-28 03:00:00' and I want to parse the date and convert to type:date datetime.date 2015-01-28 from it.. How could I do that?...

Can't setFont(Times-Roman) missing the T1 files?

python,openerp,reportlab,odoo
I have the error : Can't find .pfb for face 'Times-Roman' Error: reportlab.graphics.renderPM.RenderPMError: Can't setFont(Times-Roman) missing the T1 files? I think the Times-Roman fonts is not getting. Can anyone have a solution for this one. Thanks....

Update a field from other field with button

python,openerp,odoo,openerp-7
I have a problem when I update field1 with the value of field2 from button in the same form. <field name="field1" /> <field name="field2" /> <button name="button1" type="object" /> Here is method code: def button1(self, cr, uid, ids, context=None): ... return self.write(cr, uid, ids, {'field1': field2}, context=context) _columns = {...

How to set up an incoming email server for an user in Odoo?

openerp,imap,odoo,odoo-8,fetchmail
I'm trying to configure an incoming mail server for the user admin. This user has the next account: [email protected] I did the next steps: Configuration > Configuration > General Settings, section domain alias, I turned it to mydomain.com. Configuration > Users > Users, I selected admin user and went to...

Change the order of Form, Tree views in Odoo, OpenERP

openerp,odoo
I created a module with normal settings which shows a form view and a tree view. The default behavior is to show the Form view at first. I need to change this and show the tree view as the default view. I tried to use the sequence attribute and changed...

Odoo - Impossible to extend stock.view_picking_form view

openerp,odoo,openerp-8
I try to extend the view with external id stock.view_picking_form as follows : <?xml version="1.0" encoding="UTF-8"?> <openerp> <data> <record model="ir.ui.view" id="cap_stock.stock_picking_form"> <field name="name">cap_stock.stock_picking_form</field> <field name="model">stock.picking</field> <field name="inherit_id" ref="stock.view_picking_form" /> <field name="arch" type="xml"> <xpath expr="//button[@name='action_assign']" position="replace"> <button...

Get deleted records id's from ODOO Sever

openerp,odoo,openerp-7,openerp-8,odoo-8
I am doing offline implementation for ODOO/ OpenERP iOS application. In this can i get list of deleted records from odoo server ?? If some record is deleted from ODOO web and same record is still present in my mobile database, i want to delete that from mobile too. I...

Add a custom parser for QWeb report

python,openerp,odoo,odoo-8
I've tried to create a custom parser for my qweb report based on some tutorials on the internet: ig_account_object_printout_report_parser.py import time from openerp.osv import osv from openerp.report import report_sxw class ig_account_object_printout_report_parser(report_sxw.rml_parse): def __init__(self, cr, uid, name, context): super(ig_account_object_printout_report_parser, self).__init__(cr, uid, name, context=context) self.localcontext.update({ 'time': time, 'hello_world': self._hello_world, }) def _hello_world(self,...

Odoo 8 error when trying to open customer

openerp,odoo,openerp-8,odoo-8
I am using Odoo 8 on Ubuntu. I have problem opening some customers (some are OK). When I try to open it for editing I get Odoo Server Error...IndexError: list index out of range. Any idea what could cause this problem ? I tried to search for similar problems but...

Access objects from another class

python,openerp
I'm wondering what I'm doing wrong here. I'm trying to access an object that I have in another object. So for res.partner I made a custom module that gives an extra field named xx_manager. Now in sale.order I want to check if the field is empty or not, so I...

How to create a summary table of an one2many table in OpenERP7?

python,xml,openerp,odoo,openerp-7
I have tree models: res.partner, my_category and partner_my_category_rel. The relationship between partner and category is a many2many, but I needed to store some attributes in the relationship table (not only the IDs, but also the registration date), so, as you may know, I had to create the intermediate table by...

change existing filter string in OpenERP

openerp,openerp-7,odoo
I'm trying to add a custom filter for a state, basically I just needed to edit the string of an already existing filter. So I made this XML part but I can't quite figure out what I'm doing wrong here: <record id="sale_order_list_select" model="ir.ui.view"> <field name="name">sale.order.list.select</field> <field name="model">sale.order</field> <field name="inherit_id" ref="base.view_sales_order_filter"/>...

Response time is delayed when we have multiple requests in oodo server or openerp?

python,python-2.7,openerp,odoo,openerp-8
My Openerp version is 8.0. I am very new to the openerp module.My problem is that if i hit the server with the multiple requests I am getting the response after completion of the all the requests processing, to all the requests. What I want from this scenario is, whenever...

How to hide field depend on condition odoo?

openerp,odoo,openerp-8
attrs="{'invisible': [('rule_id.type_test', '!=', 'A')]}" in code above not work, how i can fix this? class test_list(models.Model): _name = 'test.list' type_test = fields.Selection([('A', 'aaaa'),('B','bbbbb')], default='A', string="Type", required=True) rule_list = fields.One2many('test.rule', 'rule_id') class test_rule(models.Model): _name = 'test.rule' rule_id = fields.Many2one('test.list', required=True) ul = fields.Many2one('product.ul', string='Package Logistic Unit' <record model="ir.ui.view" id="rules_form_view"> <field...

Send data from bpm workflow to openERP?

java-ee,openerp,xml-rpc,bonita,bpms
After a lot of research, i couldn't find any useful information that could be of use onto my problem. My problem is how i can send business data from BPMS (bonita, tibgo, bizagi ....) to openERP via web services?.

How to fetch Calendar (calendar.event) meetings for particular date in ODOO?

openerp,odoo,openerp-8,odoo-8
Does anybody know how to fetch Calendar (calendar.event) meetings/events for particular date OR "from date to date" in ODOO ? Till yet i have read meetings using meeting Ids as follow: ( Sample DB Name, 1, Password, calendar.event, read, ( 125 ) ) In above input parameter 125 is my...

Access inherited field of a model from a view

openerp,openerp-7
I'm working on OpenERP7, trying to access a related field located in a parent model of said related model. If someone at this point understand something, you're way smarter than I am, so i will just put the example of what i'm trying to achieve : My model : class...

Extend year range in odoo

openerp,odoo,odoo-8
By default, odoo (openerp 8.0) fields.date combobox only show year selection in range of +/-10 years from current year. How could we extend it?

RML report openerp 7

openerp,openerp-7,odoo,openerp-8,rml
How to get the field which is present in sale.order in invoice report. So invoice report use the model account.invoice, if i add a function in report.py it allow only self.cr,self.uid because we are not using osv.memory. So how to get the value of cust_ref_value from sale.order to invoice report.

how to create a function to raise error in openerp

openerp,odoo,openerp-7,raiseerror
I want to create a function that raise an error when the user enters a not valid date,so if we enter a date before the current date it will show an error, any ideas? My class looks like: class business_trip(orm.Model): _columns = {'start_trip': fields.datetime('Trip Starts on:',translate=True, required=False), 'start_business': fields.datetime('Business Starts...

how to add a related field many2one?

field,openerp,odoo
I have a field on stock_picking table I would like to relate it with stock_move _inherit= 'stock.picking' _columns={ 'user_id': fields.many2one('res.users', 'user', select=True), } I would like to relate the field user_id with stock_move I tried this _inherit= 'stock.move' _columns={ 'user_id': fields.related('picking_id', 'user_id', relation="res.users", type='many2one', string="user", store=True, readonly=True) } any Idea...

Getting TypeError: type() argument 1 must be string, not None

python,openerp,odoo
I am getting error while installing customized Odoo module. Here is the full Traceback I am getting. it is when I am clicking install button on module kanban view. Traceback (most recent call last): File "/home/software/ws/bma8_dev/odoo/openerp/http.py", line 518, in _handle_exception return super(JsonRequest, self)._handle_exception(exception) File "/home/software/ws/bma8_dev/odoo/openerp/http.py", line 539, in dispatch result...

What is Main difference between @api.onchange and @api.depends in Odoo(openerp)?

openerp,odoo,openerp-8
In Odoo v8 there are many API decorators used. But i don't understand the main difference between @api.depends and @api.onchange. Can anyone help me out from this one? Thank You....

How to create Task ( project.task ) under specific customer (res.partner ) in ODOO?

ios,openerp,odoo,openerp-7,openerp-8
How to create Task ( project.task ) for specific customer (res.partner ) in ODOO / OpenERP ? I am sending below input parameter for creating Task under customer : ( Sample Database, 1, Pass4ODOO, project.task, create, { "categ_ids" = ( ( 6, 0, ( ) ) ); description = "";...

Where is the match validation for reset password in OpenERP [V8 Odoo]

python-2.7,openerp,odoo,openerp-8,odoo-8
I was trying to add more security politics, but I can't find where is the match validation for the 2 fields Password and Confirm Password, I was putting intensionally 2 different passwords in the fields to see the red advertisement, and I look in auth_singup module (/view/auth_signup_login.xml) and I only...

OpenERP : Multiple module overriding onchange function

python,openerp,onchange,openerp-7,overriding
I need to override onchange_partner_id function present in sale.order but I'm working on a system that already have a module overriding this function. I tried to write my own onchange_partner_id with similar code : def onchange_partner_id(self, cr, uid, ids, part): res = super(sale_order, self).onchange_partner_id(cr, uid, ids, part) // doing some...

Button to Open Product Record in Tree view

openerp,odoo
In the manufacturing bill of materials (mrp.bom model) form view, There is a list of components that make up a product. I want to add a button to the list view that opens the product component in a pop up. I have tried this code but the button is opening...

How to make a custom field appear

python,openerp
The purpose is to show a checkbox in an Invoice (Customer Invoice) over at the "Other Info" tab. There's a field "Journal Entry" (move_id) and it has to appear below that field. So I've made a custom field that looks like this: _columns = {"xx_lawyer": fields.boolean("Lawyer")} And then I've set...

How to get the uploaded file name in Openerp

openerp,openerp-7
When I Upload a file using binary field in openerp and saved it, at the time of downloading I am not getting the same name as I uploaded from my lacal i.e, my file name is odoo.pdf during upload, while download it automatically changes into model name i.e (pay_slip_doc) pay_slip_doc...

Odoo status bar glitches when I reload the page using browser refresh page (F5)

html,css,openerp,odoo,odoo-8
Normally the status bar looks like this: But every time I reload the page using F5 it turns into this: This is a really annoying glitch because I can't trace what's causing this. Can anyone help me on this? Browser: Google Chrome Version 42.0.2311.152 m HTML Code: <header> <button type="button"...

How to hide a field on a one2many in openerp?

xml,field,openerp
I have customize the sale order menu in openerp making it into two menus named as "Local" and the other one is "Export". I add some field at sale.order class: 'is_local' : fields.boolean('Local'), #Default as true if user clicked the Local menu. 'is_export' : fields.boolean('Export'), #Default as true if user...

OpenERP 7 : How can I make a button inserting a predefined text in the Clipboard?

python,openerp,clipboard
I am new to OpenERP and Python and here is my problem : In a form view the user can see the address of one of his customer, my mission is to add a button which, when the user clicks on it, saves the address in the clipboard so the...

OpenERP - Python development environment

openerp,odoo
I have installed Odoo v8 on VM, with Ubuntu. I am using GEDIT for editing .py and .xml files. Is there a Python development environment out there where I can develop, and more importantly, debug my Python code? Thanks in advance for your help.

Automated Action Birthday =19

python,orm,openerp,odoo,openerp-8
I have a table called students and i need to check male students ages every day to know if they are more than 19 or not .i know i should run cron function to check the birth dates every day but i need to get the values in the birth...

openerp many2many default disappear

many-to-many,openerp,default
I have a form which I pass some invoice ids through context by an act_window. Invoices are set as default in an many2many field (I tried both using a default function and overriding the default_get function), but when I add a record on another one2many field in the same form,...

How add more security policies to a password in ODOO(OpenERP)

openerp,odoo,openerp-7,openerp-8,odoo-8
How to add the password policy on user or employee form with the required,A number(0...9), especial character(@, *, ...), Password size > 6, A capital letter(A...Z), etc Do you have any solution for to implement this policy.?...

Setting fields when making customer

python,openerp
I'm trying to make it so that whenever I create a customer and a date isn't entered, it gives a warning about it and automatically sets the date to today. Currently I have this, but it isn't working as intended: def create(self, cr, uid, vals, context=None): if not vals.get('date'): vals.update({'date':...

Is there any way to call a function when a record is requested to be shown in a form view?

openerp,odoo,odoo-8
I would like to update every record when it is shown in form view. Is there anyway to define some sort of a callback to update the record BEFORE it is shown? One method that I could think of is by adding a dummy field to form view with an...

how to display openerp error message

python,openerp,openerp-7,odoo
In my student module I inherited res.partner. And I want to restrict to modify name in partner view if partner is a student. here is my cord. from openerp.osv import osv, fields class res_partner(osv.Model): _inherit = 'res.partner' _columns = { 'name': fields.char('Name', size=250, required=True, select=True), 'is_student': fields.boolean('Student', readonly=True), } def...

How to change the odoo language?

openerp,odoo
I'd like to change the Odoo language, but only the english language is available. Is there any way to add other languages? Any help will be appreciated....

How can I add new states for a country in OpenERP/Odoo?

openerp,odoo,odoo-8
I was trying to find the file where the states for US are charged to the data base , but I only found res.country.state.csv file, and I modified adding other record then restart the server, and nothing happened. If anyone have a tutorial o pdf guide to help me. I...

Change a many2one field content in onchange from another field?

openerp,odoo,openerp-7,odoo-8
Im trying to change the content of a many2one field when another field trigger onchange method. Heres my py code: class proevent(osv.osv): _name = 'proevent.events' _description = 'Events Module' def onchange_client(self,cr,uid,ids, client_id,sale_orders_ids,context=None): res={} order_obj = self.pool.get('sale.order') order_ids = order_obj.search(cr,uid, [('partner_id','=',client_id)]) logging.info('LIST OF SALE ORDERS OF SELECTED PARTNER') logging.info(order_ids) res['sale_orders_ids'] =...

Odoo IndexError: list assignment index out of range

openerp,odoo
I just create a module. After adding values and got the problem IndexError: list assignment index out of range. How to fix it. Re Edit code please. Here is my code: class calculator(osv.osv): _name = 'calculator.calculator' def get_total(self, cr, uid, ids, field_name, arg, context): res = [] perfos = self.browse(cr,...

Give warning when a field is empty while making a customer

python,openerp
So basically I want to make it so that when I want to create a customer, and when I don't enter a date, it gives a warning and sets the date to default. I know I can just put the default values like this: _ defaults = { 'date1': fields.date.context_today,...

What happens when there is more than one access right for the same object in ACL OpenErp?

openerp,openerp-7
How does ACL behave when there is more than one access rights for the same object for the same group. For example: There is two rights entries for the object 'partner' for the same group sale/manager, having different accesses. res.partner.sale.manager - Partner - Sales / Manager res.partner.crm.user - Partner -...

OpenERP 7 : How can I make a field editable in a inheriting view?

xml,inheritance,openerp
I made a view inheriting a tree to add a field (date_encaissement) in it, but I want this field to be editable in the tree view, I know that it is done by adding editable="top" or "bottom" in the tree and then adding readonly="False" in the field, but here I...