Hardik Ansodariya (OpenERP) has proposed merging
lp:~openerp-dev/openobject-server/6.1-opw-577295-han into
lp:openobject-server/6.1.
Requested reviews:
Naresh(OpenERP) (nch-openerp)
Related bugs:
Bug #931202 in OpenERP Server: "[trunk/6.1/6.0] issue with inherited field
when put in child and parent is required"
https://bugs.launchpad.net/openobject-server/+bug/931202
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-server/6.1-opw-577295-han/+merge/120708
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.1-opw-577295-han/+merge/120708
Your team OpenERP R&D Team is subscribed to branch
lp:~openerp-dev/openobject-server/6.1-opw-577295-han.
=== modified file 'openerp/osv/orm.py'
--- openerp/osv/orm.py 2012-07-13 12:57:28 +0000
+++ openerp/osv/orm.py 2012-08-22 06:12:31 +0000
@@ -4102,7 +4102,8 @@
if v in self._inherit_fields and v not in self._columns:
(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