** Summary changed: - [trunk] issue with inherited field when put in child and parent is required + [trunk/6.1/6.0] issue with inherited field when put in child and parent is required
-- You received this bug notification because you are a member of OpenERP Indian Team, which is subscribed to OpenERP Server. https://bugs.launchpad.net/bugs/931202 Title: [trunk/6.1/6.0] issue with inherited field when put in child and parent is required Status in OpenERP Server: Confirmed Bug description: Modified code for v in vals.keys(): if v in self._inherit_fields: (table, col, col_detail, original_parent) = self._inherit_fields[v] tocreate[table][v] = vals[v] if v not in self._columns: del vals[v] Original code for v in vals.keys(): 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] The cause of this problem can be demonstrated by product and product_variant_multi module. pvm redeclares name field as part of product, yet both are required fields in template and product. When creating a product, product template creation fails because name value is not passed to create. Now I am not saying this is the most elegant way to fix it, and one could argue it would be better done in the addons code, but both these modules existed long before the code change that introduced the error. The modified code block is how I resolved it, essentially writing the value to both models. To manage notifications about this bug go to: https://bugs.launchpad.net/openobject-server/+bug/931202/+subscriptions _______________________________________________ Mailing list: https://launchpad.net/~openerp-india Post to : [email protected] Unsubscribe : https://launchpad.net/~openerp-india More help : https://help.launchpad.net/ListHelp

