Merge lp:~camptocamp/openobject-addons/7.0-fix-1190259 into lp:openobject-addons/7.0

Proposed by Yannick Vaucher @ Camptocamp
Status: Superseded
Proposed branch: lp:~camptocamp/openobject-addons/7.0-fix-1190259
Merge into: lp:openobject-addons/7.0
Diff against target: 47 lines (+8/-8)
1 file modified
analytic_user_function/analytic_user_function_view.xml (+8/-8)
To merge this branch: bzr merge lp:~camptocamp/openobject-addons/7.0-fix-1190259
Reviewer Review Type Date Requested Status
OpenERP Core Team Pending
Review via email: mp+168977@code.launchpad.net

This proposal has been superseded by a proposal from 2013-06-13.

Description of the change

[FIX] analytic_user_function - wrong override of domain for account_id in timesheet lines

To post a comment you must log in.
Revision history for this message
Yannick Vaucher @ Camptocamp (yvaucher-c2c) wrote :

An other option would be to use the boolean field 'use_timehseets'

There is a bigger cleaning to do about it in hr_timesheet and hr_timesheet_sheet modules

Complete domain might be
[('type','in',['normal', 'contract']), ('state', '<>', 'close'),('use_timesheets','=',1)]

gtAnd complete context should be:
context="{'default_use_timesheets': 1, 'default_type': 'contract'}"

9230. By Yannick Vaucher @ Camptocamp

[IMP] hr_timesheet_sheet - domain and context of account_id in hr_timesheet_sheet view

9231. By Yannick Vaucher @ Camptocamp

[IMP] hr_timesheet - domain and context of account_id in hr_timesheet_line view, also removed checked on parent_id != False as this seems too restricitve and filtering on type should be enough

9232. By Yannick Vaucher @ Camptocamp

[FIX] hr_timesheet - operator in domain

Unmerged revisions

9232. By Yannick Vaucher @ Camptocamp

[FIX] hr_timesheet - operator in domain

9231. By Yannick Vaucher @ Camptocamp

[IMP] hr_timesheet - domain and context of account_id in hr_timesheet_line view, also removed checked on parent_id != False as this seems too restricitve and filtering on type should be enough

9230. By Yannick Vaucher @ Camptocamp

[IMP] hr_timesheet_sheet - domain and context of account_id in hr_timesheet_sheet view

9229. By Yannick Vaucher @ Camptocamp

[IMP] analytic_user_function - use attributes instead of replace in view inheritance in order to keep domain and context

9228. By Yannick Vaucher @ Camptocamp

[FIX] analytic_user_function - also add contract in domain for hr_timesheet_line view inherits

9227. By Yannick Vaucher @ Camptocamp

[FIX] analytic_user_function - wrong override of domain for account_id in timesheet lines

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'analytic_user_function/analytic_user_function_view.xml'
2--- analytic_user_function/analytic_user_function_view.xml 2013-03-12 12:33:21 +0000
3+++ analytic_user_function/analytic_user_function_view.xml 2013-06-13 08:49:30 +0000
4@@ -65,8 +65,8 @@
5 <field name="priority" eval="18"/>
6 <field name="inherit_id" ref="hr_timesheet_sheet.hr_timesheet_sheet_form"/>
7 <field name="arch" type="xml">
8- <xpath expr="//field[@name='timesheet_ids']/tree/field[@name='account_id']" position="replace">
9- <field name="account_id" domain="[('type','=','normal'),('state', '&lt;&gt;', 'close')]" on_change="on_change_account_id(account_id, user_id, unit_amount)"/>
10+ <xpath expr="//field[@name='timesheet_ids']/tree/field[@name='account_id']" position="attributes">
11+ <attribute name="on_change">on_change_account_id(account_id, user_id, unit_amount)</attribute>
12 </xpath>
13 </field>
14 </record>
15@@ -78,8 +78,8 @@
16 <field name="priority" eval="19"/>
17 <field name="inherit_id" ref="hr_timesheet_sheet.hr_timesheet_sheet_form"/>
18 <field name="arch" type="xml">
19- <xpath expr="//field[@name='timesheet_ids']/form/field[@name='account_id']" position="replace">
20- <field name="account_id" domain="[('type','=','normal'),('state', '&lt;&gt;', 'close')]" on_change="on_change_account_id(account_id, user_id, unit_amount)"/>
21+ <xpath expr="//field[@name='timesheet_ids']/form/field[@name='account_id']" position="attributes">
22+ <attribute name="on_change">on_change_account_id(account_id, user_id, unit_amount)</attribute>
23 </xpath>
24 </field>
25 </record>
26@@ -90,8 +90,8 @@
27 <field name="model">hr.analytic.timesheet</field>
28 <field name="inherit_id" ref="hr_timesheet.hr_timesheet_line_form"/>
29 <field name="arch" type="xml">
30- <xpath expr="//field[@name='account_id']" position="replace">
31- <field name="account_id" domain="[('type','=','normal'),('state', '&lt;&gt;', 'close')]" on_change="on_change_account_id(account_id, user_id, unit_amount)" />
32+ <xpath expr="//field[@name='account_id']" position="attributes">
33+ <attribute name="on_change">on_change_account_id(account_id, user_id, unit_amount)</attribute>
34 </xpath>
35 </field>
36 </record>
37@@ -112,8 +112,8 @@
38 <field name="model">hr.analytic.timesheet</field>
39 <field name="inherit_id" ref="hr_timesheet.hr_timesheet_line_tree"/>
40 <field name="arch" type="xml">
41- <xpath expr="/tree/field[@name='account_id']" position="replace">
42- <field name="account_id" domain="[('type','=','normal'),('state', '&lt;&gt;', 'close')]" on_change="on_change_account_id(account_id, user_id, unit_amount)" />
43+ <xpath expr="/tree/field[@name='account_id']" position="attributes">
44+ <attribute name="on_change">on_change_account_id(account_id, user_id, unit_amount)</attribute>
45 </xpath>
46 </field>
47 </record>