Sanjay Gohel (Open ERP) has proposed merging
lp:~openerp-dev/openobject-addons/trunk-contract-apa-timesheet-improvement-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-timesheet-improvement-sgo/+merge/102443
Hello sir,
I have add timesheet boolean field in analytic account. and if it is true
than only analytic account of that shows in hr timesheet.
Thank You.
SGO
--
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-contract-apa-timesheet-improvement-sgo/+merge/102443
Your team OpenERP R&D Team is subscribed to branch
lp:~openerp-dev/openobject-addons/trunk-contract-apa.
=== modified file 'hr_timesheet_invoice/hr_timesheet_invoice.py'
--- hr_timesheet_invoice/hr_timesheet_invoice.py 2012-03-30 09:51:17 +0000
+++ hr_timesheet_invoice/hr_timesheet_invoice.py 2012-04-18 06:53:23 +0000
@@ -73,6 +73,7 @@
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."),
+ 'timesheet' : fields.boolean("Timesheet",help="This timesheet true analytic account will show in hr timesheet."),
}
_defaults = {
'pricelist_id': lambda self, cr, uid, ctx: ctx.get('pricelist_id', False),
=== modified file 'hr_timesheet_invoice/hr_timesheet_invoice_view.xml'
--- hr_timesheet_invoice/hr_timesheet_invoice_view.xml 2012-04-03 08:27:56 +0000
+++ hr_timesheet_invoice/hr_timesheet_invoice_view.xml 2012-04-18 06:53:23 +0000
@@ -8,7 +8,7 @@
<field name="inherit_id" ref="account.view_account_analytic_account_form"/>
<field name="arch" type="xml">
<field name="partner_id" position="replace">
- <field name="partner_id" on_change="on_change_partner_id(partner_id, context)"/>
+ <field name="partner_id" on_change="on_change_partner_id(partner_id, context)" />
</field>
<group name="contract" position="after">
<group colspan="2" col="2" name="invoice_data">
@@ -16,6 +16,7 @@
<field name="to_invoice" widget="selection"/>
<field name="pricelist_id" groups="product.group_sale_pricelist" domain="[('type','=','sale')]" attrs="{'required':[('to_invoice','!=',False)]}"/>
<field name="amount_max"/>
+ <field name="timesheet"/>
</group>
<group colspan="2" col="2" name="invoice_stats">
<separator colspan="4" string="Invoicing Statistics"/>
@@ -54,7 +55,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', '<>', 'close')]" name="account_id" on_change="on_change_account_id(account_id)" select="1"/>
+ <field domain="[('type','=','normal'),('state', '<>', 'close'),('timesheet','=',True)]" context="{'search_default_timesheet': 1, 'default_timesheet': 1}" name="account_id" on_change="on_change_account_id(account_id)" select="1"/>
</field>
</field>
</record>
@@ -79,7 +80,7 @@
<field name="arch" type="xml">
<field name="account_id" position="replace">
- <field domain="[('type','=','normal'),('state', '<>', 'close')]" name="account_id" on_change="on_change_account_id(account_id)"/>
+ <field domain="[('type','=','normal'),('state', '<>', 'close'),('timesheet','=',True)]" context="{'search_default_timesheet': 1, 'default_timesheet': 1}" name="account_id" on_change="on_change_account_id(account_id)"/>
</field>
</field>
</record>
_______________________________________________
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