Merge lp:~openerp-dev/openobject-addons/trunk-bug-707287-aag into lp:openobject-addons
Proposed by
Atik Agewan(OpenERP)
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Fabien (Open ERP) | ||||
Approved revision: | no longer in the source branch. | ||||
Merged at revision: | 5620 | ||||
Proposed branch: | lp:~openerp-dev/openobject-addons/trunk-bug-707287-aag | ||||
Merge into: | lp:openobject-addons | ||||
Diff against target: |
33 lines (+16/-0) 1 file modified
product/product.py (+16/-0) |
||||
To merge this branch: | bzr merge lp:~openerp-dev/openobject-addons/trunk-bug-707287-aag | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Rucha (Open ERP) (community) | Needs Information | ||
qdp (OpenERP) | Needs Fixing | ||
Atik Agewan(OpenERP) (community) | Needs Resubmitting | ||
Review via email: mp+80213@code.launchpad.net |
Description of the change
Hello,
Product :User can not change the existing UOM category ,Old Uom and New Uom category should be same.
Thanks,
Atik
To post a comment you must log in.
please improve the code,
29 + product = self.pool. get('product. product' ) get('product. uom') uom1.uom_ id.id). category_ id
30 + uom_obj = self.pool.
31 + product_uom1 = product.browse(cr, uid, ids)[0]
32 + category_1 = uom_obj.browse(cr, uid, product_
you are in product class, can't you simply do it by self instead of self.pool.get(..)? uom1.uom_ id.category_ id will give you the category,
you don't need to use uom_obj,
product_
also make sure to use proper variable name, product_uom1 doesn't suits for browse record for product,
simplify the other code please,
thanks