[IMP]project_timesheet:added method for setting default type of invoicing
bzr revid: kbh@tinyerp.com-20121012090527-zn9ngz25ylbio2nx
This commit is contained in:
parent
fce8bb9c29
commit
06ae4d8913
|
@ -302,9 +302,18 @@ class account_analytic_line(osv.osv):
|
||||||
return employee.product_id.uom_id.id
|
return employee.product_id.uom_id.id
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
def _default_invoice(self, cr, uid, context=None):
|
||||||
|
proxy = self.pool.get('hr_timesheet_invoice.factor')
|
||||||
|
record_ids = proxy.search(cr, uid, [('customer_name', '=', '100%')], context=context)
|
||||||
|
invoice = proxy.browse(cr, uid, record_ids[0], context=context)
|
||||||
|
if invoice:
|
||||||
|
return invoice.id
|
||||||
|
return False
|
||||||
|
|
||||||
_defaults = {
|
_defaults = {
|
||||||
'product_id': _default_product,
|
'product_id': _default_product,
|
||||||
'product_uom_id': _default_product_uom,
|
'product_uom_id': _default_product_uom,
|
||||||
|
'to_invoice': _default_invoice
|
||||||
}
|
}
|
||||||
|
|
||||||
account_analytic_line()
|
account_analytic_line()
|
||||||
|
|
Loading…
Reference in New Issue