Hardik Sanchawat (OpenERP) has proposed merging
lp:~openerp-dev/openobject-addons/trunk-addons5-sale-hmo-contract-hsa into
lp:~openerp-dev/openobject-addons/trunk-addons5-sale-hmo.
Requested reviews:
Harry (OpenERP) (hmo-tinyerp)
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-addons5-sale-hmo-contract-hsa/+merge/123255
Hello,
In Contract, click on timesheet and create a new entry.
Thanks
- HSA
--
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-addons5-sale-hmo-contract-hsa/+merge/123255
Your team OpenERP R&D Team is subscribed to branch
lp:~openerp-dev/openobject-addons/trunk-addons5-sale-hmo.
=== modified file 'hr_timesheet/hr_timesheet_view.xml'
--- hr_timesheet/hr_timesheet_view.xml 2012-09-06 07:01:33 +0000
+++ hr_timesheet/hr_timesheet_view.xml 2012-09-07 11:07:23 +0000
@@ -9,14 +9,14 @@
<tree editable="bottom" string="Timesheet Lines">
<field name="date" on_change="on_change_date(date)"/>
<field name="user_id" on_change="on_change_user_id(user_id)" required="1"/>
- <field name="journal_id" invisible="1"/>
+ <field name="journal_id"/>
<field name="name"/>
<field domain="[('type','=','normal'),('use_timesheets','=',1)]" name="account_id" context="{'default_use_timesheets': 1}"/>
- <field name="product_id" on_change="on_change_unit_amount(product_id, unit_amount, False, product_uom_id,journal_id)" required="1" domain="[('type','=','service')]" invisible="1"/>
+ <field name="product_id" on_change="on_change_unit_amount(product_id, unit_amount, False, product_uom_id,journal_id)" required="1" domain="[('type','=','service')]"/>
<field name="unit_amount" string="Duration" on_change="on_change_unit_amount(product_id, unit_amount, False, product_uom_id,journal_id)" sum="Total time" widget="float_time"/>
<field name="product_uom_id" on_change="on_change_unit_amount(product_id, unit_amount, False, product_uom_id,journal_id)" invisible="1"/>
<field name="amount" sum="Total cost" invisible="1"/>
- <field name="general_account_id" invisible="1"/>
+ <field name="general_account_id"/>
</tree>
</field>
</record>
=== modified file 'hr_timesheet_invoice/hr_timesheet_invoice.py'
--- hr_timesheet_invoice/hr_timesheet_invoice.py 2012-09-07 07:31:52 +0000
+++ hr_timesheet_invoice/hr_timesheet_invoice.py 2012-09-07 11:07:23 +0000
@@ -129,15 +129,18 @@
def _default_journal(self, cr, uid, context=None):
proxy = self.pool.get('hr.employee')
record_ids = proxy.search(cr, uid, [('user_id', '=', uid)], context=context)
- employee = proxy.browse(cr, uid, record_ids[0], context=context)
- return employee.journal_id and employee.journal_id.id or False
+ if record_ids:
+ employee = proxy.browse(cr, uid, record_ids[0], context=context)
+ return employee.journal_id and employee.journal_id.id or False
+ return False
def _default_general_account(self, cr, uid, context=None):
proxy = self.pool.get('hr.employee')
record_ids = proxy.search(cr, uid, [('user_id', '=', uid)], context=context)
- employee = proxy.browse(cr, uid, record_ids[0], context=context)
- if employee.product_id and employee.product_id.property_account_income:
- return employee.product_id.property_account_income.id
+ if record_ids:
+ employee = proxy.browse(cr, uid, record_ids[0], context=context)
+ if employee.product_id and employee.product_id.property_account_income:
+ return employee.product_id.property_account_income.id
return False
_defaults = {
_______________________________________________
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