> I'd suggest the following changes:
> 1. perform a default_get call pushed into the `this.ready` queue right before
> the `fields_get` (at the end of `start`), this would have to be on all fields,
> but I would say it's not a huge issue (compared to the bunch of fields_get
> calls we have to do anyway), store just the field names from its result into
> an array (e.g. `self.fields_with_defaults`)
Add default_get method in queue at end of start. and store default fields in 
self.fields_with_defaults.
> 2. During the filtering to know which fields are required and which are not,
> just add a call to `_.difference`, to remove all fields with default values
In this case we can not use _.difference because if default value in m2o/o2m 
field then default_get field return (like :- partner_shipping_id) field name. 
and self.required_fields store the partner_shipping_id/id so we need to check 
with id. so I add the condition in _.filter.

-- 
https://code.launchpad.net/~openerp-dev/openerp-web/trunk-bug-871625-ysa/+merge/79073
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openerp-web/trunk-bug-871625-ysa.

_______________________________________________
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