[IMP/MERGE]improve code and merge with latest parent branch
bzr revid: sgo@tinyerp.com-20120529104150-a7q7s1v48949cupe bzr revid: sgo@tinyerp.com-20120529112009-lh2kom166hwkl12w
This commit is contained in:
commit
e886a135ed
|
@ -379,15 +379,15 @@ class account_analytic_account(osv.osv):
|
|||
'real_margin_rate': fields.function(_real_margin_rate_calc, type='float', string='Real Margin Rate (%)',
|
||||
help="Computes using the formula: (Real Margin / Total Costs) * 100.",
|
||||
digits_compute=dp.get_precision('Account')),
|
||||
'so_visible' : fields.boolean('sale order line visible'),
|
||||
'timsheet_visible' : fields.boolean("On timesheet"),
|
||||
'expense_visible' : fields.boolean('expense line visible'),
|
||||
'fix_price_invoices' : fields.boolean('Fix Price Invoices'),
|
||||
'invoice_on_timesheets' : fields.boolean("Invoice On Timesheets"),
|
||||
'charge_expenses' : fields.boolean('Charge Expenses'),
|
||||
'month_ids': fields.function(_analysis_all, multi='analytic_analysis', type='many2many', relation='account_analytic_analysis.summary.month', string='Month'),
|
||||
'user_ids': fields.function(_analysis_all, multi='analytic_analysis', type="many2many", relation='account_analytic_analysis.summary.user', string='User'),
|
||||
'template_id':fields.many2one('account.analytic.account', 'Template Of Contract'),
|
||||
'fix_exp_max' : fields.float('Max. amt'),
|
||||
'timesheet_max': fields.float('max_timesheet'),
|
||||
'expense_max': fields.float('expenses'),
|
||||
#'fix_exp_max' : fields.float('Max. amt'),
|
||||
#'timesheet_max': fields.float('max_timesheet'),
|
||||
#'expense_max': fields.float('expenses'),
|
||||
}
|
||||
def on_change_template(self, cr, uid, id, template_id):
|
||||
if not template_id:
|
||||
|
|
|
@ -34,6 +34,12 @@
|
|||
res_model="sale.order.line"
|
||||
src_model="account.analytic.account"
|
||||
/>
|
||||
<act_window
|
||||
id="action_timesheet_lines_tree"
|
||||
name="Timesheet Lines"
|
||||
res_model="account.analytic.line"
|
||||
src_model="account.analytic.account"
|
||||
/>
|
||||
|
||||
<record id="hr_timesheet.account_analytic_account_form_form" model="ir.ui.view">
|
||||
<field name="name">account.analytic.account.invoice.form.inherit</field>
|
||||
|
@ -51,8 +57,43 @@
|
|||
</group>
|
||||
</xpath>
|
||||
<xpath expr='//separator[@name="description"]' position='before'>
|
||||
<separator colspan="4" string="Invoicing" name="invoicing"/>
|
||||
<group colspan="4" name="contract_lines" class="oe_form_group_label_border">
|
||||
<separator colspan="4" string="Invoicing" name="invoicing"/>
|
||||
<group colspan="4">
|
||||
<group col="2" colspan="1" class="oe_form_group_label_border">
|
||||
<label string=" "/><label string=" "/>
|
||||
<field name="fix_price_invoices"/>
|
||||
<field name="invoice_on_timesheets"/>
|
||||
<field name="charge_expenses"/>
|
||||
</group>
|
||||
<group col="2" colspan="1">
|
||||
<label string="Est.Tot"/>
|
||||
<label string="Invoiced"/>
|
||||
<field name="amount_max" nolabel="1" attrs="{'invisible': [('fix_price_invoices','=',0)]}"/>
|
||||
<field name="ca_invoiced" nolabel="1" attrs="{'invisible': [('fix_price_invoices','=',0)]}"/>
|
||||
<field name="quantity_max" nolabel="1" attrs="{'invisible': [('invoice_on_timesheets','=',0)]}"/>
|
||||
<field name="hours_qtt_invoiced" nolabel="1" attrs="{'invisible': [('invoice_on_timesheets','=',0)]}"/>
|
||||
</group>
|
||||
<group col="2" colspan="1" class="oe_form_group_odd_border">
|
||||
<label string="Remaining"/>
|
||||
<label string="To Invoice"/>
|
||||
<field name="remaining_ca" nolabel="1" attrs="{'invisible': [('fix_price_invoices','=',0)]}"/>
|
||||
<field name="ca_to_invoice" nolabel="1" attrs="{'invisible': [('fix_price_invoices','=',0)]}"/>
|
||||
<field name="remaining_hours" nolabel="1" attrs="{'invisible': [('invoice_on_timesheets','=',0)]}"/>
|
||||
<field name="hours_qtt_non_invoiced" nolabel="1" attrs="{'invisible': [('invoice_on_timesheets','=',0)]}"/>
|
||||
</group>
|
||||
<group col="2" colspan="1">
|
||||
<label string=" "/><label string=" "/>
|
||||
<button name="%(action_sales_order_line)d" string="Sales" type="action" context="{'default_project_id': active_id,'search_default_project_id': active_id}" attrs="{'invisible': [('fix_price_invoices','=',0)]}"/>
|
||||
<button name="%(sale.action_order_line_tree2)d" string="Lines To Invoice" type="action" context="{'default_project_id': active_id,'search_default_project_id': active_id}" attrs="{'invisible': [('fix_price_invoices','=',0)]}"/>
|
||||
<button name="%(action_timesheet_lines_tree)d" string="Timesheets" type="action" attrs="{'invisible': [('invoice_on_timesheets','=',0)]}"/>
|
||||
<button name="%(hr_timesheet_invoice.act_acc_analytic_acc_2_report_acc_analytic_line_to_invoice)d" string="Invoice Timesheets" type="action" attrs="{'invisible': [('invoice_on_timesheets','=',0)]}"/>
|
||||
|
||||
</group>
|
||||
</group>
|
||||
|
||||
|
||||
|
||||
<!--<group colspan="4" name="contract_lines" class="oe_form_group_label_border">
|
||||
<table name="contract_data">
|
||||
<tr name="title" >
|
||||
<th ><div class="oe_field_label" ></div></th>
|
||||
|
@ -82,14 +123,14 @@
|
|||
<td><button class="oe_title_button_right" name="%(account.action_account_tree1)d" string="Timesheets" type="action" attrs="{'invisible': [('timsheet_visible','=',0)]}"/></td>
|
||||
<td><button class="oe_title_button_left" name="%(hr_timesheet_invoice.act_acc_analytic_acc_2_report_acc_analytic_line_to_invoice)d" string="Invoice Timesheets" type="action" attrs="{'invisible': [('timsheet_visible','=',0)]}"/></td>
|
||||
</tr>
|
||||
<!-- <tr>
|
||||
<tr>
|
||||
<th><div class="oe_field_label" >Charge Expenses</div></th>
|
||||
<td><div><field name="expense_visible" nolabel="1"/></div></td>
|
||||
<td><div class="oe_float_field_view" ><field name="expense_max" nolabel="1" attrs="{'invisible': [('expense_visible','=',0)]}"/></div></td>
|
||||
<td><div class="oe_field_view" ></div></td>
|
||||
<td><div class="oe_field_view" ></div></td>
|
||||
<td><div class="oe_float_field_view"></div></td>
|
||||
</tr> -->
|
||||
</tr>
|
||||
<tr name="total">
|
||||
<th><div class="oe_field_label" >Total</div></th>
|
||||
<td><div></div></td>
|
||||
|
@ -99,7 +140,7 @@
|
|||
<td><div class="oe_totals" ></div></td>
|
||||
</tr>
|
||||
</table>
|
||||
</group>
|
||||
</group>-->
|
||||
<group colspan="4" class="oe_form_group_label_border">
|
||||
<field name="pricelist_id" />
|
||||
<field name="to_invoice" widget="selection" />
|
||||
|
|
Loading…
Reference in New Issue