Parameter uom and uom_id same function for inherit

Bug #1148068 reported by Ulises Lopez
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
New
Undecided
OpenERP Publisher's Warranty Team

Bug Description

1 Steps to reproduce the issue you have observed
 1.1 Open file ./account_anglo_saxon/invoice.py
 1.2 Open file ./account/account_invoice.py

2 The result you observed
 2.1 Parameter uom in account_anglo_saxon
         ./account_anglo_saxon/invoice.py:
         def product_id_change(self, cr, uid, ids, product, uom, qty=0, name='', type='out_invoice', partner_id=False, fposition_id=False, price_unit=False, currency_id=False, context=None, company_id=None):

 2.2 Parameter uom_id in account
          ./account/account_invoice.py:
          def product_id_change(self, cr, uid, ids, product, uom_id, qty=0, name='', type='out_invoice', partner_id=False, fposition_id=False, price_unit=False, currency_id=False, context=None, company_id=None):

3 The result you expected
 3.1 Same parameter for the function product_id_change

4 The platform you are using
 4.1 Ubuntu 12.04 LTS

5 The OpenERP version you are using
 5.1 Openerp 7.0
 5.2 Server: 4859
 5.3 Web: 3793
 5.4 Addons: 8781

Tags: maintenance
Changed in openobject-addons:
assignee: nobody → OpenERP Publisher's Warranty Team (openerp-opw)
tags: added: maintenance
Revision history for this message
Amit Dodiya (OpenERP) (ado-openerp) wrote :

Hello Ulises Lopez,

uom is the default argument for product_id_change() in the anglo_saxon module and that should not create any problem.
Any name for default argument should work, it should create problem for keyword argument when the argument name is not same.

IMHO this is not a bug and shall never create problem, what do you think?
Please correct me if I am wrong.

Revision history for this message
Amit Dodiya (OpenERP) (ado-openerp) wrote :

Some correction:
consider default argument = mandatory argument / formal argument

Revision history for this message
Moisés López - http://www.vauxoo.com (moylop260) wrote :

OpenERP-Trunk you use wizard sale/sale_make_invoice_advance
The line code
val = inv_line_obj.product_id_change(cr, uid, [], wizard.product_id.id,
                    uom_id=False, partner_id=sale.partner_id.id, fposition_id=sale.fiscal_position.id)
You can note "uom_id"
This generate a error with anglosaxon "uom"

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.