hr_timesheet_invoice: add on_change_account_id since it was remove from hr_timesheet
bzr revid: ced-c2fe22683b71d137c32e2085202bb551196d4009
This commit is contained in:
@@ -77,7 +77,7 @@ account_analytic_line()
|
||||
class hr_analytic_timesheet(osv.osv):
|
||||
_inherit = "hr.analytic.timesheet"
|
||||
def on_change_account_id(self, cr, uid, ids, account_id):
|
||||
res = super(hr_analytic_timesheet,self).on_change_account_id(cr, uid, ids, account_id)
|
||||
res = {}
|
||||
if not account_id:
|
||||
return res
|
||||
res.setdefault('value',{})
|
||||
|
||||
@@ -31,6 +31,18 @@
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="hr_timesheet_line_form2">
|
||||
<field name="name">hr.analytic.timesheet.form2</field>
|
||||
<field name="model">hr.analytic.timesheet</field>
|
||||
<field name="type">form</field>
|
||||
<field name="inherit_id" ref="hr_timesheet.hr_timesheet_line_form" />
|
||||
<field name="arch" type="xml">
|
||||
<field name="account_id" position="replace">
|
||||
<field name="account_id" domain="[('type','=','normal'),('state', '<>', 'close')]" select="1" on_change="on_change_account_id(account_id)"/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="hr_timesheet_line_tree">
|
||||
<field name="name">hr.analytic.timesheet.tree</field>
|
||||
<field name="model">hr.analytic.timesheet</field>
|
||||
@@ -43,6 +55,19 @@
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="hr_timesheet_line_tree2">
|
||||
<field name="name">hr.analytic.timesheet.tree2</field>
|
||||
<field name="model">hr.analytic.timesheet</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="inherit_id" ref="hr_timesheet.hr_timesheet_line_tree" />
|
||||
<field name="arch" type="xml">
|
||||
|
||||
<field name="account_id" position="replace">
|
||||
<field name="account_id" domain="[('type','=','normal'),('state', '<>', 'close')]" on_change="on_change_account_id(account_id)"/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
#
|
||||
# Inherits for account analytic lines
|
||||
#
|
||||
|
||||
Reference in New Issue
Block a user