Merge lp:~openerp-dev/openobject-server/6.0-opw-577295-han into lp:openobject-server/6.0

Proposed by Hardik Ansodariya (OpenERP)
Status: Approved
Approved by: Naresh(OpenERP)
Approved revision: 3634
Proposed branch: lp:~openerp-dev/openobject-server/6.0-opw-577295-han
Merge into: lp:openobject-server/6.0
Diff against target: 13 lines (+2/-1)
1 file modified
bin/osv/orm.py (+2/-1)
To merge this branch: bzr merge lp:~openerp-dev/openobject-server/6.0-opw-577295-han
Reviewer Review Type Date Requested Status
Naresh(OpenERP) (community) Approve
Christophe CHAUVET (community) Approve
Review via email: mp+120707@code.launchpad.net

Description of the change

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

To post a comment you must log in.
Revision history for this message
Christophe CHAUVET (christophe-chauvet) wrote :

Hi

I've test on my customer instance and it works correctly

Regards,

review: Approve
Revision history for this message
Naresh(OpenERP) (nch-openerp) :
review: Approve

Unmerged revisions

3634. By Hardik Ansodariya (OpenERP)

[FIX] orm/create: issue with inherited field when put in child and parent is required (Maintanance case: 577295)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'bin/osv/orm.py'
2--- bin/osv/orm.py 2012-06-19 08:29:38 +0000
3+++ bin/osv/orm.py 2012-08-22 05:59:20 +0000
4@@ -3607,7 +3607,8 @@
5 if v in self._inherit_fields:
6 (table, col, col_detail, original_parent) = self._inherit_fields[v]
7 tocreate[table][v] = vals[v]
8- del vals[v]
9+ if v not in self._columns:
10+ del vals[v]
11 else:
12 if (v not in self._inherit_fields) and (v not in self._columns):
13 del vals[v]