[IMP] Avoid to set to_invoice 100% when 'use timesheet' set.
bzr revid: tta@openerp.com-20121129141529-avzooa3gxgtpv32d
This commit is contained in:
parent
5de572c005
commit
ec5c761b7d
|
@ -77,13 +77,6 @@ class account_analytic_account(osv.osv):
|
|||
'pricelist_id': lambda self, cr, uid, ctx: ctx.get('pricelist_id', False),
|
||||
}
|
||||
|
||||
def on_change_use_timesheets(self, cr, uid, ids, use_timesheets, context=None):
|
||||
res = {'value': {}}
|
||||
if use_timesheets:
|
||||
ir_model_obj = self.pool.get('ir.model.data')
|
||||
res['value']['to_invoice'] = ir_model_obj.get_object_reference(cr, uid, 'hr_timesheet_invoice', 'timesheet_invoice_factor1')[1]
|
||||
return res
|
||||
|
||||
def on_change_partner_id(self, cr, uid, ids, partner_id, name, context=None):
|
||||
res = super(account_analytic_account, self).on_change_partner_id(cr, uid, ids, partner_id, name, context=context)
|
||||
part = self.pool.get('res.partner').browse(cr, uid, partner_id, context=context)
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
</group>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='use_timesheets']" position="replace">
|
||||
<field name="use_timesheets" on_change="on_change_use_timesheets(use_timesheets, context)"/>
|
||||
<field name="use_timesheets"/>
|
||||
</xpath>
|
||||
<xpath expr="/form/sheet" position='before'>
|
||||
<header>
|
||||
|
|
Loading…
Reference in New Issue