Skip to content
Snippets Groups Projects
Commit 65f31b90 authored by Amit Patel's avatar Amit Patel
Browse files

[IMP]:added domain and default context while creating a account from timesheet line.

bzr revid: apa@tinyerp.com-20120529070000-k9p3j9th9e1abzny
parent cc38db16
No related branches found
No related tags found
No related merge requests found
......@@ -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', '&lt;&gt;', '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', '&lt;&gt;', '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', '&lt;&gt;', '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', '&lt;&gt;', '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', '&lt;&gt;', 'close')]" name="account_id" on_change="on_change_account_id(account_id)"/>
<field domain="[('type','=','normal'), ('state', '&lt;&gt;', '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"/>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment