<xpath expr='//div[@name="duration"]' position="after" version="7.0">
<label for="quantity_max"/>
<div>
- <field name="quantity_max" class="oe_form_inline"/> / Remaining:
- <field name="remaining_hours" class="oe_form_inline"/>
+ <field name="quantity_max" class="oe_form_inline"/> / Remaining: <field name="remaining_hours" class="oe_form_inline"/>
</div>
</xpath>
- <xpath expr="//field[@name='use_timesheets']" position="replace">
- <group colspan="2" col="4">
- <field name="use_timesheets" on_change="on_change_use_timesheets(use_timesheets, context)"/>
- <field name="to_invoice" attrs="{'required': [('invoice_on_timesheets', '=', True)],'invisible': [('invoice_on_timesheets','=',False)]}"/>
+ <xpath expr='//group[@name="invoice_on_timesheets"]' position="replace">
+ <group name='invoice_on_timesheets' string="Invoice on Timesheets Options" attrs="{'invisible': [('invoice_on_timesheets','=',False)]}" col="4">
+ <field name="pricelist_id" attrs="{'required': [('invoice_on_timesheets', '=', True)]}"/>
+ <field name="to_invoice" widget="selection" attrs="{'required': [('invoice_on_timesheets', '=', True)]}"/>
</group>
</xpath>
- <xpath expr="//group[@name='invoice_on_timesheets']" position="replace"/>
<xpath expr='//group[@name="master"]' position='after'>
<separator name="toinvoice" string="Invoicing"/>
- <group>
- <group>
- <field name="pricelist_id" attrs="{'required': [('invoice_on_timesheets', '=', True)],'invisible': [('invoice_on_timesheets','=',False)]}"/>
- </group>
- <group></group>
- </group>
<table width="100%%">
<tr>
<th></th>
help="Keep empty if this contract is not limited to a total fixed price."),
'amount_invoiced': fields.function(_invoiced_calc, string='Invoiced Amount',
help="Total invoiced"),
- 'to_invoice': fields.many2one('hr_timesheet_invoice.factor', 'Invocing Ratio',
+ 'to_invoice': fields.many2one('hr_timesheet_invoice.factor', 'Timesheet Invoicing Ratio',
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."),
def set_close(self, cr, uid, ids, context=None):
self.write(cr, uid, ids, {'state':'close'}, context=context)
- self.set_close_send_note(cr, uid, ids, context)
+ message = _("Contract has been <b>closed</b>.")
+ self.message_append_note(cr, uid, ids, body=message, context=context)
return True
def set_cancel(self, cr, uid, ids, context=None):
self.write(cr, uid, ids, {'state':'cancelled'}, context=context)
- self.set_cancel_send_note(cr, uid, ids, context)
+ message = _("Contract has been <b>cancelled</b>.")
+ self.message_append_note(cr, uid, ids, body=message, context=context)
return True
def set_open(self, cr, uid, ids, context=None):
self.write(cr, uid, ids, {'state':'open'}, context=context)
- self.set_open_send_note(cr, uid, ids, context)
+ message = _("Contract has been <b>opened</b>.")
+ self.message_append_note(cr, uid, ids, body=message, context=context)
return True
def set_pending(self, cr, uid, ids, context=None):
self.write(cr, uid, ids, {'state':'pending'}, context=context)
- self.set_pending_send_note(cr, uid, ids, context)
+ message = _("Contract has been set as <b>pending</b>.")
+ self.message_append_note(cr, uid, ids, body=message, context=context)
return True
-
- def set_open_send_note(self, cr, uid, ids, context=None):
- message = _("Contract has been <b>opened</b>.")
- return self.message_append_note(cr, uid, ids, body=message, context=context)
-
- def set_close_send_note(self, cr, uid, ids, context=None):
- message = _("Contract has been <b>closed</b>.")
- return self.message_append_note(cr, uid, ids, body=message, context=context)
-
- def set_cancel_send_note(self, cr, uid, ids, context=None):
- message = _("Contract has been <b>cancelled</b>.")
- return self.message_append_note(cr, uid, ids, body=message, context=context)
-
- def set_pending_send_note(self, cr, uid, ids, context=None):
- message = _("Contract has been <b>pending</b>.")
- return self.message_append_note(cr, uid, ids, body=message, context=context)
account_analytic_account()