Merge lp:~openerp-dev/openobject-addons/7.0-opw-593811-dhr into lp:openobject-addons/7.0

Proposed by Dharti Ratani(OpenERP)
Status: Needs review
Proposed branch: lp:~openerp-dev/openobject-addons/7.0-opw-593811-dhr
Merge into: lp:openobject-addons/7.0
Diff against target: 34 lines (+4/-4)
2 files modified
account_analytic_analysis/account_analytic_analysis_view.xml (+2/-2)
analytic_contract_hr_expense/analytic_contract_hr_expense_view.xml (+2/-2)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/7.0-opw-593811-dhr
Reviewer Review Type Date Requested Status
Dharti Ratani(OpenERP) (community) Needs Resubmitting
Yannick Vaucher @ Camptocamp (community) Needs Fixing
Naresh(OpenERP) Pending
Review via email: mp+169993@code.launchpad.net

Description of the change

Hello Sir,

Improved Analytic Accounts form view.
Steps to produce :
Install account_analytic_analysis or analytic_contract_hr_expense module.
Create an analytic account.
Set Timesheets true.
Set the type to 'contract or project' or 'template of contract'.
Set On Timesheets or Charge Expenses true.
Remove either pricelist or Invoicng ratio (which is required here)
Then change the type to Analytic account or Analytic view, the Contract Information page is invisible but the error shows Invalid field error and you can't save the form.
So made both fields require if type is Contract or temlated and On timesheets or Charge expense is true.

Thanks
dhr

To post a comment you must log in.
Revision history for this message
Yannick Vaucher @ Camptocamp (yvaucher-c2c) wrote :
review: Needs Fixing
9247. By Dharti Ratani(OpenERP)

[MERGE]Merged with 7.0

9248. By Dharti Ratani(OpenERP)

[IMP]Improved as per suggestion

Revision history for this message
Dharti Ratani(OpenERP) (dhr-openerp) wrote :

Hello,

I have improved as per suggestion.

Thanks
Dharti

review: Needs Resubmitting

Unmerged revisions

9248. By Dharti Ratani(OpenERP)

[IMP]Improved as per suggestion

9247. By Dharti Ratani(OpenERP)

[MERGE]Merged with 7.0

9246. By Dharti Ratani(OpenERP)

[FIX]Changed the attrs in account_analytic_analysis for Pricelists and Invoicing ratio in an analytic account form should be required if type is contract or project and invoiceing is based on timesheet or expenses

9245. By Dharti Ratani(OpenERP)

[FIX]Fixed the issue: Pricelists and Invoicing ratio in an analytic account form should be required if type is contract or project and invoiceing is based on timesheet or expenses

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'account_analytic_analysis/account_analytic_analysis_view.xml'
2--- account_analytic_analysis/account_analytic_analysis_view.xml 2013-06-07 16:09:27 +0000
3+++ account_analytic_analysis/account_analytic_analysis_view.xml 2013-09-11 09:35:34 +0000
4@@ -139,11 +139,11 @@
5 <group>
6 <field name="pricelist_id"
7 class="oe_inline"
8- attrs="{'required': [('invoice_on_timesheets', '=', True)]}"/>
9+ attrs="{'required': ['|',('type','=','template'),('type','=','contract'), ('invoice_on_timesheets', '=', True)]}"/>
10 <field name="to_invoice"
11 class="oe_inline"
12 widget="selection"
13- attrs="{'required': [('invoice_on_timesheets', '=', True)]}"/>
14+ attrs="{'required': ['|',('type','=','template'),('type','=','contract'), ('invoice_on_timesheets', '=', True)]}"/>
15 </group>
16 </group>
17 </xpath>
18
19=== modified file 'analytic_contract_hr_expense/analytic_contract_hr_expense_view.xml'
20--- analytic_contract_hr_expense/analytic_contract_hr_expense_view.xml 2013-03-13 16:19:50 +0000
21+++ analytic_contract_hr_expense/analytic_contract_hr_expense_view.xml 2013-09-11 09:35:34 +0000
22@@ -44,10 +44,10 @@
23 <attribute name="attrs">{'invisible': [('invoice_on_timesheets','=',False),('charge_expenses','=',False)]}</attribute>
24 </xpath>
25 <xpath expr="//field[@name='pricelist_id']" position="attributes">
26- <attribute name="attrs">{'required': ['|',('invoice_on_timesheets','=',True),('charge_expenses','=',True)]}</attribute>
27+ <attribute name="attrs">{'required': ['|',('type','=','template'),('type','=','contract'), '|', ('invoice_on_timesheets','=',True),('charge_expenses','=',True)]}</attribute>
28 </xpath>
29 <xpath expr="//field[@name='to_invoice']" position="attributes">
30- <attribute name="attrs">{'required': ['|',('invoice_on_timesheets','=',True),('charge_expenses','=',True)]}</attribute>
31+ <attribute name="attrs">{'required': ['|',('type','=','template'),('type','=','contract'), '|', ('invoice_on_timesheets','=',True),('charge_expenses','=',True)]}</attribute>
32 <attribute name="string">Expenses and Timesheet Invoicing Ratio</attribute>
33 </xpath>
34 </field>