[MERGE]merge with parent branch
authorSanjay Gohel (Open ERP) <sgo@tinyerp.com>
Tue, 29 May 2012 05:02:53 +0000 (10:32 +0530)
committerSanjay Gohel (Open ERP) <sgo@tinyerp.com>
Tue, 29 May 2012 05:02:53 +0000 (10:32 +0530)
bzr revid: sgo@tinyerp.com-20120529050253-914jkrtgig53pxz0

addons/account_analytic_analysis/account_analytic_analysis_view.xml
addons/hr_timesheet/hr_timesheet.py
addons/hr_timesheet/hr_timesheet_view.xml
addons/hr_timesheet_invoice/hr_timesheet_invoice.py

index 9917d75..197f1d9 100644 (file)
@@ -45,7 +45,7 @@
                        <field name="to_invoice" widget="selection" />
                    </group>
                 </xpath>
-                <xpath expr='//group[@name="contract"]' position="after">
+                <xpath expr='//group[@name="project"]' position="after">
                     <group col="6" colspan="3" class="oe_form_group_label_border">
                         <field name="quantity_max"/><label string="/"/> <label string="Remaining"/> <field name="remaining_hours" nolabel="1"/>
                     </group>
index 12fbbcd..656dd3f 100644 (file)
@@ -190,4 +190,15 @@ class hr_analytic_timesheet(osv.osv):
 
 hr_analytic_timesheet()
 
+class account_analytic_account(osv.osv):
+
+    _inherit = 'account.analytic.account'
+    _description = 'Analytic Account'
+    
+    _columns = {
+        'use_timesheets': fields.boolean('Timesheets:', help="Check this field if this project manages timesheets"),
+    }
+
+account_analytic_account()
+
 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
index e4838ed..d5229b0 100644 (file)
             </field>
 
         </record>
+        
+        <record id="account_analytic_account_timesheet_form" model="ir.ui.view">
+            <field name="name">account.analytic.account.invoice.form</field>
+            <field name="model">account.analytic.account</field>
+            <field name="type">form</field>
+            <field name="inherit_id" ref="analytic.view_account_analytic_account_form"/>
+            <field name="arch" type="xml">
+                <xpath expr='//group[@name="contract"]' position='after'>
+                           <group colspan="2" col="2" name="project" class="oe_form_group_label_border">
+                                       <separator colspan="2" string="Project" name="project_sep"/>
+                                       <field name="use_timesheets" />
+                           </group>
+                </xpath>
+            </field>
+        </record>
 
         <record id="act_hr_timesheet_line_evry1_all_form" model="ir.actions.act_window">
             <field name="name">Timesheet Lines</field>
index 2d449e7..2aaeed9 100644 (file)
@@ -73,11 +73,9 @@ class account_analytic_account(osv.osv):
             help="Fill this field if you plan to automatically generate invoices based " \
             "on the costs in this analytic account: timesheets, expenses, ..." \
             "You can configure an automatic invoice rate on analytic accounts."),
-        'use_timesheets': fields.boolean('Timesheets:', help="Check this field if this project manages timesheets"),
     }
     _defaults = {
         'pricelist_id': lambda self, cr, uid, ctx: ctx.get('pricelist_id', False),
-        'use_timesheets' : True,
     }
     def on_change_partner_id(self, cr, uid, ids,partner_id, context={}):
         res = super(account_analytic_account,self).on_change_partner_id(cr, uid, ids,partner_id, context=context)