Hardik Ansodariya (OpenERP) has proposed merging 
lp:~openerp-dev/openobject-server/6.0-opw-577295-han into 
lp:openobject-server/6.0.

Requested reviews:
  Naresh(OpenERP) (nch-openerp)

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-server/6.0-opw-577295-han/+merge/120707

Hello,

Fixed the issue of field when it refine in inherited object and save the record 
it was not allow to save when parent field is required.

e.g 
when redefine required field in product_product that's already defined in 
product_template. As example 
redefined standard_price in product_product.

Add this field on the form view, restart server and install or update module 
with this code 
and create a new product, when save the record it generates the error.

Kindly review it.

Thanks
-- 
https://code.launchpad.net/~openerp-dev/openobject-server/6.0-opw-577295-han/+merge/120707
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-server/6.0-opw-577295-han.
=== modified file 'bin/osv/orm.py'
--- bin/osv/orm.py	2012-06-19 08:29:38 +0000
+++ bin/osv/orm.py	2012-08-22 05:59:20 +0000
@@ -3607,7 +3607,8 @@
             if v in self._inherit_fields:
                 (table, col, col_detail, original_parent) = self._inherit_fields[v]
                 tocreate[table][v] = vals[v]
-                del vals[v]
+                if v not in self._columns:
+                    del vals[v]
             else:
                 if (v not in self._inherit_fields) and (v not in self._columns):
                     del vals[v]

_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help   : https://help.launchpad.net/ListHelp

Reply via email to