'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'),
'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'),
}
def on_change_template(self, cr, uid, id, template_id):
if not template_id:
<xpath expr='//field[@name="parent_id"]' position='after'>
<field name="template_id" on_change="on_change_template(template_id)" domain="[('type','=','template')]" attrs="{'invisible': [('type','in',['view', 'normal','template'])]}" context="{'default_type' : 'template'}"/>
</xpath>
- <xpath expr='//separator[@name="description"]' position='before'>
- <group colspan="4" class="oe_form_group_label_border">
- <field name="pricelist_id" />
- <field name="to_invoice" widget="selection" />
- </group>
- </xpath>
<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>
</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">
+ <table name="contract_data">
+ <tr name="title" >
+ <th ><div class="oe_field_label" ></div></th>
+ <td><div></div></td>
+ <th ><div class="oe_float_field_view" >Total Cost</div></th>
+ <th ><div class="oe_field_view" >Invoiced</div></th>
+ <th ><div class="oe_field_view" >Remaining</div></th>
+ <th ><div class="oe_float_field_view" >Ready to Invoice</div></th>
+ </tr>
+ <tr>
+ <th><div class="oe_field_label">Fix price Invoices</div></th>
+ <td><div><field name="so_visible" nolabel="1"/></div></td>
+ <td><div class="oe_float_field_view"><field name="fix_exp_max" nolabel="1" attrs="{'invisible': [('so_visible','=',0)]}"/></div></td>
+ <td><div class="oe_field_view"><field name="ca_invoiced" nolabel="1" attrs="{'invisible': [('so_visible','=',0)]}"/></div></td>
+ <td><div class="oe_field_view"></div></td>
+ <td><div class="oe_float_field_view"><field name="ca_to_invoice" nolabel="1" attrs="{'invisible': [('so_visible','=',0)]}"/></div></td>
+ <td><button class="oe_title_button_right" name="%(sale.action_order_form)d" string="Sales" type="action" context="{'default_project_id': active_id,'search_default_project_id': active_id}" attrs="{'invisible': [('so_visible','=',0)]}"/></td>
+ <td><button class="oe_title_button_left" 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': [('so_visible','=',0)]}"/></td>
+ </tr>
+ <tr>
+ <th><div class="oe_field_label">Invoice on timesheet</div></th>
+ <td><div><field name="timsheet_visible" nolabel="1"/></div></td>
+ <td><div class="oe_float_field_view" ><field name="timesheet_max" nolabel="1" attrs="{'invisible': [('timsheet_visible','=',0)]}"/></div></td>
+ <td><div class="oe_field_view" ><field name="hours_qtt_invoiced" nolabel="1" attrs="{'invisible': [('timsheet_visible','=',0)]}"/></div></td>
+ <td><div class="oe_field_view" ></div></td>
+ <td><div class="oe_float_field_view" ><field name="hours_qtt_non_invoiced" nolabel="1" attrs="{'invisible': [('timsheet_visible','=',0)]}"/></div></td>
+ <td><button class="oe_title_button_right" name="%(hr_timesheet_invoice.act_account_analytic_account_2_report_timehsheet_account)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>
+ <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 name="total">
+ <th><div class="oe_field_label" >Total</div></th>
+ <td><div></div></td>
+ <td><div class="oe_totals" ><field name="total_max" nolabel="1" /><field name="currency_symbol" nolabel="1" readonly="True"/></div></td>
+ <td><div class="oe_totals_view" ><field name="total_invoiced" nolabel="1" /><field name="currency_symbol" nolabel="1" readonly="True"/></div></td>
+ <td><div class="oe_totals_view" ><field name="total_remaining" nolabel="1" /></div></td>
+ <td><div class="oe_totals" ><field name="total_toinvoice" nolabel="1" ></field></div></td>
+ </tr> -->
+ </table>
+ </group>
+ <group colspan="4" class="oe_form_group_label_border">
+ <field name="pricelist_id" />
+ <field name="to_invoice" widget="selection" />
+ </group>
+ </xpath>
<!-- <notebook position="inside">
<page string="Invoice Analysis">
<separator colspan="4" string="Work Done Stats"/>