Review: Needs Fixing
That's better. Two things left to fix:
- when 'part' is False (no partner selected), you should not modify
'to_invoice';
- the factor "Yes (100%)" has xml_id
'hr_timesheet_invoice.timesheet_invoice_factor1', try to retrieve its id from
its xml_id
The latter can be retrieved with:
data_obj = self.pool.get('ir.model.data')
data_id = data_obj._get_id(cr, uid, 'hr_timesheet_invoice',
'timesheet_invoice_factor1')
factor_id = data_obj.browse(cr, uid, data_id).res_id
Raphael
--
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-usability-onchange_partner_set_invoice_task_work-aar/+merge/69209
Your team OpenERP R&D Team is subscribed to branch
lp:~openerp-dev/openobject-addons/trunk-usability.
_______________________________________________
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