[IMP]create view for contract lines and add field which needed
bzr revid: sgo@tinyerp.com-20120529065713-bokhp0ng21muadvo
This commit is contained in:
parent
536ebb6ac0
commit
d29971eb7e
|
@ -44,6 +44,9 @@ user-wise as well as month wise.
|
|||
"account_analytic_analysis_cron.xml",
|
||||
],
|
||||
'demo_xml': [],
|
||||
"css" : [
|
||||
"static/src/css/account_analytic.css",
|
||||
],
|
||||
'installable': True,
|
||||
'auto_install': False,
|
||||
'certificate': '0042927202589',
|
||||
|
|
|
@ -379,9 +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'),
|
||||
'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:
|
||||
|
|
|
@ -39,17 +39,66 @@
|
|||
<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='//page[@name="contract_page"]' position='inside'>
|
||||
<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="term"]' 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"/>
|
||||
|
|
|
@ -0,0 +1,34 @@
|
|||
.oe_field_view {
|
||||
width: 80px;
|
||||
text-align: center;
|
||||
}
|
||||
.oe_float_field_view {
|
||||
width: 110px;
|
||||
text-align: center;
|
||||
}
|
||||
.oe_title_button_left {
|
||||
min-width: 140px;
|
||||
text-align: left;
|
||||
margin-left: 5px !important;
|
||||
}
|
||||
|
||||
.oe_title_button_right {
|
||||
min-width: 110px;
|
||||
text-align: right;
|
||||
margin-left: 55px !important;
|
||||
}
|
||||
|
||||
.oe_field_label {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.oe_totals {
|
||||
width: 110px;
|
||||
text-align: center;
|
||||
border-top: groove;
|
||||
}
|
||||
.oe_totals_view {
|
||||
width: 80px;
|
||||
text-align: center;
|
||||
border-top: groove;
|
||||
}
|
|
@ -28,7 +28,7 @@
|
|||
<group colspan="2" col="2" name="project" class="oe_form_group_label_border">
|
||||
<separator colspan="2" string="Project" name="project_sep" invisible="1"/>
|
||||
</group>
|
||||
<separator string="Terms and Condition" colspan="4"/>
|
||||
<separator name="term" string="Terms and Condition" colspan="4"/>
|
||||
<field colspan="4" name="description" nolabel="1"/>
|
||||
</page>
|
||||
</notebook>
|
||||
|
|
|
@ -7,12 +7,6 @@
|
|||
<field name="type">form</field>
|
||||
<field name="inherit_id" ref="analytic.view_account_analytic_account_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr='//group[@name="contract"]' position='after'>
|
||||
<group colspan="2" col="2" name="project" class="oe_form_group_label_border">
|
||||
<separator colspan="2" string="Project" name="project_sep"/>
|
||||
<field name="use_timesheets" />
|
||||
</group>
|
||||
</xpath>
|
||||
<!-- <group name="contract" position="after">
|
||||
<group colspan="2" col="2" name="invoice_data">
|
||||
<separator colspan="2" string="Invoicing Data"/>
|
||||
|
|
Loading…
Reference in New Issue