Sanjay Gohel (Open ERP) has proposed merging 
lp:~openerp-dev/openobject-addons/trunk-contract-apa-add-boolean-sgo into 
lp:~openerp-dev/openobject-addons/trunk-contract-apa.

Requested reviews:
  Amit Patel (OpenERP) (apa-tiny)

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-contract-apa-add-boolean-sgo/+merge/107710

hello sir,

i have moved use_timesheet field to hr_timesheet_invoice to hr_timesheet.
and improve code.

Thank you.
SGO
-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-contract-apa-add-boolean-sgo/+merge/107710
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-addons/trunk-contract-apa.
=== modified file 'account_analytic_analysis/account_analytic_analysis_view.xml'
--- account_analytic_analysis/account_analytic_analysis_view.xml	2012-05-28 13:23:13 +0000
+++ account_analytic_analysis/account_analytic_analysis_view.xml	2012-05-29 05:05:21 +0000
@@ -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>

=== modified file 'hr_timesheet/hr_timesheet.py'
--- hr_timesheet/hr_timesheet.py	2012-04-25 07:32:57 +0000
+++ hr_timesheet/hr_timesheet.py	2012-05-29 05:05:21 +0000
@@ -190,4 +190,15 @@
 
 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:

=== modified file 'hr_timesheet/hr_timesheet_view.xml'
--- hr_timesheet/hr_timesheet_view.xml	2012-05-07 18:13:46 +0000
+++ hr_timesheet/hr_timesheet_view.xml	2012-05-29 05:05:21 +0000
@@ -82,6 +82,21 @@
             </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>

=== modified file 'hr_timesheet_invoice/hr_timesheet_invoice.py'
--- hr_timesheet_invoice/hr_timesheet_invoice.py	2012-05-28 13:07:27 +0000
+++ hr_timesheet_invoice/hr_timesheet_invoice.py	2012-05-29 05:05:21 +0000
@@ -73,11 +73,9 @@
             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)

_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help   : https://help.launchpad.net/ListHelp

Reply via email to