FAQ Database Discussion Community


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,...

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...

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,...

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...

Odoo 8 what is best way to create records with reference to each other

orm,model,odoo,recordset
After Ive created a method for importing external product categories into my odoo db, I had observed, that the method create of orm model needs a lot of time, when I loop for the reference to each other like this: @api.multi def action_confirm_site(self): account = self ebay_site = self.env['ebay.sites'].browse(account.site.id) call_data...

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 can i add a report record in openerp odoo?

report,odoo,openerp-8
I'm using OpenERP 8 odoo and I'm following the report creation tutorial but I get stuck at where i can but the report record code for example: <report id="account_invoices" model="account.invoice" string="Invoices" report_type="qweb-pdf" name="account.report_invoice" file="account.report_invoice" attachment_use="True" attachment="(object.state in ('open','paid')) and ('INV'+(object.number or '').replace('/','')+'.pdf')" /> Thanks in advance Reference : http://blog.emiprotechnologies.com/create-qweb-report-odoo/...

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 !!...

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"/>...

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...

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...

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...

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...

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...

Odoo - how to properly copy views from other model

inheritance,view,odoo,openerp-8
I have a model. For example let say it is this: class my_model(models.Model): _name = 'my.model' field1 = fields.Char('name') It has tree and form views. Both work properly. Now I have created new model, copying old one: class my_model_template(models.Model): _name = 'my.model.template' _inherit = 'my.model' Now till this part, everything...

Is there a way to edit the title of live support chat in Odoo

odoo
I am currently doing up a site page in Odoo. One of my objective is to edit the title of the Live Support chat box from "Have a Question?Chat with Us" to "Welcome, feel free to chat with us if you have any queries". Does anyone know where I should...

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"/>...

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...

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...

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.

ODOO, calendar.event : bool have no attribute replace

python-2.7,calendar,odoo,odoo-8
I extends class calendar_event for add status with statusbar. It's work perfectly when i update an event BUT when i tried to create i've a problem : Traceback (most recent call last): File "/home/x/workspace/Odoo8/openerp/http.py", line 530, in _handle_exception return super(JsonRequest, self)._handle_exception(exception) File "/home/x/workspace/Odoo8/openerp/http.py", line 567, in dispatch result = self._call_function(**self.params)...

odoo v8 - Field(s) `arch` failed against a constraint: Invalid view definition

python,xml,view,odoo,add-on
I want to create a new view with a DB-view. When I try to install my app, DB-view was created then I get error: 2015-06-22 12:59:10,574 11988 ERROR odoo openerp.addons.base.ir.ir_ui_view: Das Feld `datum` existiert nicht Fehler Kontext: Ansicht `overview.tree.view` [view_id: 1532, xml_id: k. A., model: net.time.overview, parent_id: k. A.] 2015-06-22...

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...

Link a button to a python function from my model (Odoo 8)

python,model,odoo,odoo-8
I get trouble linking a button to a function (python) from my model. I searched on the net but got only few informations for Odoo 8. That is my code right now: My function from my model (mymodule.service): def main_val(self, context=None): if context is None: context = {} [...] The...

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 = {...

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 ?...

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....

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?

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?

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.?...

How can I check if a user is Manager for a specific module in Odoo?

orm,xml-rpc,odoo
I am looking for a way to check if a logged-in user is Manager for a particular Module like 'Point of sale'. Using SQL I am able to check this condition, but can we accomplish the same using ORM? Following is my sql query which is listing the users who...

How to call the website side widget in odoo

javascript,odoo,odoo-8
This is my file which was contain template 'website_fb.fb_shared_post' Qweb.add_template('website_fb_redertemplate.xml'); Below code through create a website side widget so now if call this widget then how to do. I refer the Odoo documentation but nothing to understandable for me so please help me. var RenderTemplate = Widget.extend({ template: 'website_fb.fb_shared_post',...

Bold IN List View Odoo

customization,odoo
I am trying the below code for bolding my first record and it works fine. BUt for multiple it does not Pls guide Code: <tree string="Configuration Tree" fonts="bold:task_name == 'PLANNING AND DESIGN'"> and for multiple I am trying this: <tree string="Configuration Tree" fonts="bold:task_name == 'PLANNING AND DESIGN' bold:task_name == 'DEVELOPMENT'">...

Adding icons to menu items in odoo

odoo,odoo-8
I try to set an icon to menuitem, So I find that the attribute icon is supported, but No change happen when I change its value. I want to know if it is still supported by menuitem in odoo v7/8. If not, how to add an icon to a menu...

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...

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...

Improve SQL statement with Index Scan Backward

python,performance,postgresql,odoo
We are using the python software Odoo which uses an ORM for the database requests (PostgreSQL). Currently I'm trying to reduce the execution times of some SQL statements. I could increase the time by adding some indexes. Now I have one query which takes much time and can't decrease the...

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...

Odoo8 Qweb generated pdf document. The tablerows on the 2nd page are jammed

pdf,report,wkhtmltopdf,odoo,qweb
On the 2nd 3rd etc. page the tableheader and tablerows of quotation or invoice are jammed, when I print the document in pdf format. This works the same (wrong) way in my own written templates too. Brand new installed LinuxMint17 (Ubuntu clone), latest odoo8 (2015-01-29), wkhtmltox0.12.2.1 Is this a bug...

OpenERP / Odoo using domain for many2one in xml view

odoo,odoo-8
I try to set invisible attribute to a field depending on a field in many2one relation: In fact, I have a model M1 with a field option and a field m2_id which is a m2o relation to model M2 that contains a field category (a selection field with values val1/val2)...

Add element in an inherited view (Odoo 8)

xml,view,odoo,odoo-8
I would like to add an element (a button) in an inherited view but we can't add element which are not in the parent view. <record model="ir.ui.view" id="view_bill_clients_form"> <field name="name">bills.clients.form</field> <field name="model">res.partner</field> <field name="inherit_id" ref="base.view_partner_form"/> <field name="arch" type="xml"> <field name="name" /> <!--<button name="account.action_invoice_tree" type="object" string="Generer" class="oe_highlight" />-->...

Using domain in Odoo colors attribute

xml,odoo,openerp-8
Is it possible to have a domain-like condition in Odoo colors attribute instead of a single condition ? example : I wanna have a condition like this colors="blue:state=='approved'&&doc_type=='revisi'" I noticed that we could have a hidden function field that filled depend on the both fields and use it in the...

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 list States of a Country in ODOO v8

odoo,odoo-8
I'm trying to list all the states of a country. In OpenERP v7, I suppose that could be work: _columns = { 'country_id': fields.many2one('res.country', 'Country'), 'state_id': fields.related('country_id', 'state_id', type="many2one", relation="res.country.state", string="State"), } How can I do that in Odoo-v8? I tried: country_id = fields.many2one('res.country', 'Country') state_id = fields.related('country_id', 'state_id', type="many2one",...

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...

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,...

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...

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...

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...

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 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...

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...

odoo inherit more one template

python,templates,inheritance,odoo
I try to insert a tree template inside a tab on Odoo. I have a problem when I want to implement a new class. Class in relation with another template created. Server trace-back : File "/usr/lib/python2.7/dist-packages/openerp/modules/registry.py", line 101, in __getitem__ return self.models[model_name] KeyError: 'products.group' Do you have an idea ?...

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 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...

Add column to BOM lines in OpenERP v8

python,xml,odoo,openerp-8
I'm trying to customize the BOM form view with a custom column in the BOM lines, based on https://www.odoo.com/apps/modules/7.0/mrp_bom_product_details/ My attempt stranded at the following state: custom_bom_form.py: from openerp.osv import fields, osv from openerp.tools.translate import _ class mrp_bom(osv.osv): _inherit = 'mrp.bom' _columns ={ 'product_qty_available': fields.related('product_id', 'qty_available', type='float', string='Quantity On Hand',...

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...

Odoo Prefilter many2one / many2many / one2many

orm,model,odoo
How can I predefinde/prefilter a many2one field? As example product.category has a type, in my view the user should only be able to select a product.category based on the category type. //field in model category_id = fields.Many2one(comodel_name="product.category", string="ebay Category", required=True) //field in view How can I prefilter the select in...

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...

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....

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.

Why are odoo openerp changes to python files and view files not visible?

python,odoo
I am new to odoo. I am running it in docker container with mounted source code. Why I change some xml file or python file changes are not visible. I tried restarting server but nothing. I also try changing fils directly in docker container but changes are not visible at...

Send notification for specific group in odoo

python,odoo
I want to send notificaton for everyone in manfacture group so i tried this code but it does not work manf_categ_ids=self.pool.get('ir.module.category').search(cr,uid,[('name','=','Manufacturing')],context=context)[0] users=self.pool.get('res.groups').browse(cr, uid, manf_categ_ids , context=context).users for user in users: recipient_partners = [] recipient_partners.append( (4, user.partner_id.id) ) #user_ids=self.pool.get('res.users').search(cr,uid,[('groups_id','=',manf_categ_ids)],context=context) post_vars = {'subject':...

Odoo8 - how can I sort status bar and set default as new?

default,statusbar,odoo,odoo-8
I have created a new module in Odoo for helpdesk and I have 2 problems that I can't seem to fix or find information on so need some help. I created a status bar (code): state = fields.Selection({('new','New'), ('open','In Progress'), ('closed','Closed')}, "Status") _defaults = { 'state': 'new' } <header> <field...

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 = "";...

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...

odoo:get unit price from an other table

python,odoo
I want the price to be automatically displayed when I select the product in the invoice @api.one @api.depends('price_unit') def _on_change_service (self): self.price_unit = self.le_prix ...

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 ...

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...

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....

Odoo , Domain, filter date and month

python,date,filter,odoo
I try to create a filter domain in sale.report as : Month(order_date) = month(current_date) AND Day(order_date) <= Day(current_date). filter string="This Month" domain="[(('date').strftime('%%m'),'=', ((context_today()).strftime('%%m'))),(('date').strftime('%%d'),'&gt;=', ((context_today()).strftime('%%d')))]"/> I have a problem in left side of domain : ('date'), System say: AttributeError: object has no attribute 'strftime'. try many combination, but response it's same....

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 = {...

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...

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'...

how to join more then two table in postgresql?

sql,postgresql,postgresql-9.2,odoo,pgadmin
i am running following query select to_char(sale_order.date_order ,'DD-MM-YYYY') , sum(sale_order.amount_total) as amount from public.sale_order where sale_order.order_year = '2015' and sale_order.order_month = 'April' group by to_char(sale_order.date_order ,'DD-MM-YYYY') order by to_char(sale_order.date_order ,'DD-MM-YYYY') asc its giving correct output to_char.. amount "14-04-2015"; 1298.00 "15-04-2015"; 4294.00 "16-04-2015"; 1398.00 "17-04-2015"; 1927.00 "18-04-2015"; 3094.00 "19-04-2015"; 6988.00 "20-04-2015";...

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...

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...

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'] =...