[IMP]:added domain and default context while creating a account from timesheet line.
bzr revid: apa@tinyerp.com-20120529070000-k9p3j9th9e1abzny
This commit is contained in:
parent
cc38db164d
commit
65f31b9061
|
@ -12,7 +12,7 @@
|
|||
<field name="user_id" on_change="on_change_user_id(user_id)" required="1"/>
|
||||
<field name="journal_id" invisible="1"/>
|
||||
<field name="name"/>
|
||||
<field domain="[('type','=','normal')]" name="account_id"/>
|
||||
<field domain="[('type','=','normal'),('use_timesheets','=',1)]" name="account_id" context="{'default_use_timesheets': 1}"/>
|
||||
<field name="product_id" on_change="on_change_unit_amount(product_id, unit_amount, False, product_uom_id,journal_id)" required="1" domain="[('type','=','service')]" invisible="1"/>
|
||||
<field name="unit_amount" on_change="on_change_unit_amount(product_id, unit_amount, False, product_uom_id,journal_id)" sum="Total time" widget="float_time"/>
|
||||
<field name="product_uom_id" on_change="on_change_unit_amount(product_id, unit_amount, False, product_uom_id,journal_id)" invisible="1"/>
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
<field name="inherit_id" ref="hr_timesheet.hr_timesheet_line_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="account_id" position="replace">
|
||||
<field domain="[('type','=','normal'),('state', '<>', 'close')]" name="account_id" on_change="on_change_account_id(account_id)" select="1" context="{'search_default_use_timesheets': 1, 'default_use_timesheets': 1}"/>
|
||||
<field domain="[('type','=','normal'),('state', '<>', 'close'),('use_timesheets','=',1)]" name="account_id" on_change="on_change_account_id(account_id)" select="1" context="{'default_use_timesheets': 1}"/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
@ -66,9 +66,8 @@
|
|||
<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 domain="[('type','=','normal'),('state', '<>', 'close')]" name="account_id" on_change="on_change_account_id(account_id)" context="{'search_default_use_timesheets': 1, 'default_use_timesheets': 1}"/>
|
||||
<field domain="[('type','=','normal'),('state', '<>', 'close'),('use_timesheets','=',1)]" name="account_id" on_change="on_change_account_id(account_id)" select="1" context="{'default_use_timesheets': 1}"/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
|
|
@ -109,7 +109,7 @@
|
|||
<field colspan="4" context="{'date':date_current,'user_id':user_id}" domain="[('name','=',date_current)]" name="timesheet_ids" nolabel="1">
|
||||
<tree editable="top" string="Timesheet Lines">
|
||||
<field invisible="1" name="date"/>
|
||||
<field domain="[('type','=','normal'), ('state', '<>', 'close')]" name="account_id" on_change="on_change_account_id(account_id)"/>
|
||||
<field domain="[('type','=','normal'), ('state', '<>', 'close'),('use_timesheets','=',1)]" name="account_id" on_change="on_change_account_id(account_id)" context="{'default_use_timesheets': 1}"/>
|
||||
<field name="name"/>
|
||||
<field name="unit_amount" on_change="on_change_unit_amount(product_id, unit_amount, False, product_uom_id,journal_id)" widget="float_time"/>
|
||||
<field name="to_invoice" widget="selection"/>
|
||||
|
|
Loading…
Reference in New Issue