[MERGE/IMP]:merged sgo's branch for view improvements.

bzr revid: apa@tinyerp.com-20120614123738-5bxxfndd424imm7e
This commit is contained in:
Amit Patel (OpenERP) 2012-06-14 18:07:38 +05:30
commit eb5a048493
6 changed files with 138 additions and 121 deletions

View File

@ -29,53 +29,62 @@
<field name="quantity_max"/><label string="/"/> <label string="Remaining"/> <field name="remaining_hours" nolabel="1"/> <field name="quantity_max"/><label string="/"/> <label string="Remaining"/> <field name="remaining_hours" nolabel="1"/>
</group> </group>
</xpath> </xpath>
<xpath expr='//field[@name="pricelist_id"]' position='before'> <xpath expr='//group[@name="toinvoice"]' position='replace'>
<group class="oe_form_group_label_border" name="toinvoice" col="4" colspan="4" attrs="{'invisible': [('invoice_on_timesheets','=',False)]}">
<field name="pricelist_id"/>
<field name="to_invoice"/>
</group>
</xpath>
<xpath expr='//group[@name="toinvoice"]' position='before'>
<separator colspan="4" string="Invoicing" name="invoicing"/> <separator colspan="4" string="Invoicing" name="invoicing"/>
<table border="0" colspan="4"> <group colspan="4" col="6">
<tr> <!-- header -->
<th class="oe_th_160px" height="20px"></th> <div class="oe_field_label" colspan="2"/>
<th width="10px"></th> <group colspan="4" col="6">
<th class="oe_th_110px">Est.Tot</th> <div class="oe_field_label_bold">Est.Tot</div>
<th class="oe_th_110px">Invoiced</th> <div class="oe_field_label_bold">Invoiced</div>
<th class="oe_th_110px">Remaining</th> <div class="oe_field_label_bold">Remaining</div>
<th class="oe_th_110px">Ready To Invoice</th> <div class="oe_field_label_bold">To Invoice</div>
<th width="10px"></th> <div class="oe_btn_width_small"/>
<th></th> <div class="oe_btn_width"/>
<th></th> </group>
</tr>
<tr> <!-- center -->
<th class="oe_border_right">Fix Price Invoices</th> <!--<group class="oe_group">-->
<td><field name="fix_price_invoices" nolabel="1"/></td> <field class="oe_field_label" name="fix_price_invoices" />
<td><field class="oe_th_110px" name="amount_max" nolabel="1" attrs="{'invisible': [('fix_price_invoices','=',0)]}"/></td> <group colspan="4" col="6" attrs="{'invisible': [('fix_price_invoices','=',False)]}">
<td class="oe_th_110px"><field name="ca_invoiced" nolabel="1" attrs="{'invisible': [('fix_price_invoices','=',0)]}"/></td> <field class="oe_float_field" name="amount_max" nolabel="1" />
<td class="oe_th_110px oe_border_right"><field name="remaining_ca" nolabel="1" attrs="{'invisible': [('fix_price_invoices','=',0)]}"/></td> <field class="oe_float_field" name="ca_invoiced" nolabel="1" />
<td class="oe_th_110px"><field name="ca_to_invoice" nolabel="1" attrs="{'invisible': [('fix_price_invoices','=',0)]}"/></td> <field class="oe_float_field" name="remaining_ca" nolabel="1" />
<td width="10px"></td> <field class="oe_float_field" name="ca_to_invoice" nolabel="1" />
<td><button icon="terp-check" class= "oe_btn_width" 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)]}"/></td> <div><button class="oe_btn_width_small" icon="terp-check" name="%(action_sales_order_line)d" string="Sales" type="action" context="{'default_project_id': active_id,'search_default_project_id': active_id}"/></div>
<td><button icon="terp-dolar_ok!" class= "oe_btn_width" 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)]}"/></td> <div><button class="oe_btn_width" icon="terp-dolar_ok!" 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}"/></div>
</tr> </group>
<tr>
<th class="oe_border_right">Invoice On Timesheets</th> <field class="oe_field_label" name="invoice_on_timesheets"/>
<td><field name="invoice_on_timesheets" nolabel="1"/></td> <group colspan="4" col="6" attrs="{'invisible': [('invoice_on_timesheets','=',False)]}">
<td><field class="oe_th_110px" name="hours_qtt_est" nolabel="1" attrs="{'invisible': [('invoice_on_timesheets','=',0)]}"/></td> <field class="oe_float_field" name="hours_qtt_est" nolabel="1" />
<td class="oe_th_110px"><field name="hours_qtt_invoiced" nolabel="1" attrs="{'invisible': [('invoice_on_timesheets','=',0)]}"/></td> <field class="oe_float_field" name="hours_qtt_invoiced" nolabel="1"/>
<td class="oe_th_110px oe_border_right"><field name="remaining_hours_to_invoice" nolabel="1" attrs="{'invisible': [('invoice_on_timesheets','=',0)]}"/></td> <field class="oe_float_field" name="remaining_hours_to_invoice" nolabel="1" />
<td class="oe_th_110px"><field name="hours_qtt_non_invoiced" nolabel="1" attrs="{'invisible': [('invoice_on_timesheets','=',0)]}"/></td> <field class="oe_float_field" name="hours_qtt_non_invoiced" nolabel="1" />
<td width="10px"></td> <div><button class="oe_btn_width_small" icon="terp-go-week" name="%(hr_timesheet.act_hr_timesheet_line_evry1_all_form)d" string="Timesheets" type="action" /></div>
<td><button icon="terp-go-week" class= "oe_btn_width" name="%(hr_timesheet.act_hr_timesheet_line_evry1_all_form)d" string="Timesheets" type="action" attrs="{'invisible': [('invoice_on_timesheets','=',0)]}"/></td> <div><button class="oe_btn_width" icon="terp-dolar" name="%(hr_timesheet_invoice.act_acc_analytic_acc_2_report_acc_analytic_line_to_invoice)d" string="Invoice Timesheets" type="action"/></div>
<td><button icon="terp-dolar" class= "oe_btn_width" 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)]}"/></td> </group>
</tr>
<div name="end_of_tabl_hook"/> <!-- footer -->
<tr>
<th class="oe_border_right">Total</th> <div name="total" class="oe_field_label" colspan="2">Total </div>
<td width="10px"></td> <group colspan="4" col="6" >
<td class="oe_th_110px oe_border_top"><field name="est_total" nolabel="1"/></td> <field name="est_total" nolabel="1" class="oe_field_label_bold oe_border_top"/>
<td class="oe_th_110px oe_border_top"><field name="invoiced_total" nolabel="1"/></td> <field name="invoiced_total" nolabel="1" class="oe_field_label_bold oe_border_top"/>
<td class="oe_th_110px oe_border_right oe_border_top"><field name="remaining_total" nolabel="1"/></td> <field name="remaining_total" nolabel="1" class="oe_field_label_bold oe_border_top"/>
<td class="oe_th_110px oe_border_top"><field name="toinvoice_total" nolabel="1"/></td> <field name="toinvoice_total" nolabel="1" class="oe_field_label_bold oe_border_top"/>
</tr> <div class="oe_btn_width_small"/>
</table> <div class="oe_btn_width"/>
</xpath> </group>
<!--</group>-->
</group>
</xpath>
</field> </field>
</record> </record>

View File

@ -1,18 +1,28 @@
.oe_th_110px{ .oe_float_field{
width:110px !important; width: 120px !important;
text-align: center !important; text-align: right !important;
vertical-align: middle; vertical-align: middle;
} }
.oe_th_160px{ .oe_field_label{
width:160px; font-weight:bold;
} }
.oe_btn_width{ .oe_btn_width{
width: 150px !important; width: 150px !important;
} }
.oe_border_right{
border-right: 1px solid #DDD;
padding-left: 6px !important;
}
.oe_border_top{ .oe_border_top{
border-top: 1px solid #000000; border-top: 1px solid #000000;
} }
.oe_btn_width_small{
width: 110px !important;
}
.oe_field_label_bold{
width:120px !important;
/*padding-left: 30px !important;*/
vertical-align: middle;
text-align: right !important;
font-weight:bold;
}
.oe_form_field_float {
width: 100% !important;
}

View File

@ -15,11 +15,11 @@
<field name="code"/> <field name="code"/>
<field name="manager_id"/> <field name="manager_id"/>
<field name="company_id" on_change="on_change_company(company_id)" select="2" widget="selection" groups="base.group_multi_company" attrs="{'required': [('type','&lt;&gt;','view')]}"/> <field name="company_id" on_change="on_change_company(company_id)" select="2" widget="selection" groups="base.group_multi_company" attrs="{'required': [('type','&lt;&gt;','view')]}"/>
<field name="type" select="2"/> <field name="type"/>
<field name="parent_id" on_change="on_change_parent(parent_id)" attrs="{'invisible': [('type','in',['contract','template'])]}"/> <field name="parent_id" on_change="on_change_parent(parent_id)" attrs="{'invisible': [('type','in',['contract','template'])]}"/>
</group> </group>
<notebook colspan="4"> <notebook colspan="4">
<page string="Contract Information" name="contract_page" col="4"> <page string="Contract Information" name="contract_page">
<group col="4" colspan="4"> <group col="4" colspan="4">
<group colspan="2" col= "2" name="contract" class="oe_form_group_label_border"> <group colspan="2" col= "2" name="contract" class="oe_form_group_label_border">
<separator colspan="2" string="Validity"/> <separator colspan="2" string="Validity"/>
@ -29,8 +29,8 @@
<group colspan="2" col="2" name="project" class="oe_form_group_label_border"> <group colspan="2" col="2" name="project" class="oe_form_group_label_border">
<separator colspan="2" string="Project" name="project_sep" invisible="1"/> <separator colspan="2" string="Project" name="project_sep" invisible="1"/>
</group> </group>
<group class="oe_form_group_label_border" name="toinvoice" colspan="4" col="4"></group>
</group> </group>
<group name="toinvoice" colspan="4" col="4"></group>
<separator string="Terms and Conditions" colspan="4" name="description"/> <separator string="Terms and Conditions" colspan="4" name="description"/>
<field colspan="4" name="description" nolabel="1"/> <field colspan="4" name="description" nolabel="1"/>
</page> </page>

View File

@ -8,18 +8,16 @@
<field name="inherit_id" ref="analytic.view_account_analytic_account_form"/> <field name="inherit_id" ref="analytic.view_account_analytic_account_form"/>
<field eval="20" name="priority"/> <field eval="20" name="priority"/>
<field name="arch" type="xml"> <field name="arch" type="xml">
<xpath expr='//div[@name="end_of_tabl_hook"]' position='before'> <xpath expr='//div[@name="total"]' position='before'>
<tr> <field class="oe_field_label" name="charge_expenses"/>
<th class="oe_border_right">Charge Expenses</th> <group colspan="4" col="6" attrs="{'invisible': [('charge_expenses','=',False)]}">
<td><field name="charge_expenses" nolabel="1"/></td> <field class="oe_float_field" name="est_expenses" nolabel="1" />
<td><field class="oe_th_110px" name="est_expenses" nolabel="1" attrs="{'invisible': [('charge_expenses','=',0)]}"/></td> <field class="oe_float_field" name="expense_invoiced" nolabel="1"/>
<td class="oe_th_110px"><field name="expense_invoiced" nolabel="1" attrs="{'invisible': [('charge_expenses','=',0)]}"/></td> <field class="oe_float_field" name="remaining_expense" nolabel="1" />
<td class="oe_th_110px oe_border_right"><field name="remaining_expense" nolabel="1" attrs="{'invisible': [('charge_expenses','=',0)]}"/></td> <field class="oe_float_field" name="expense_to_invoice" nolabel="1" />
<td class="oe_th_110px"><field name="expense_to_invoice" nolabel="1" attrs="{'invisible': [('charge_expenses','=',0)]}"/></td> <div><button class="oe_btn_width_small" icon="gtk-select-all" name="open_hr_expense" string="Expenses" type="object" /></div>
<td width="10px"></td> <div><button class="oe_btn_width" icon="terp-dolar" name="hr_to_invoiced_expense" string="Invoice Expenses" type="object"/></div>
<td><button icon="gtk-select-all" class= "oe_btn_width" name="open_hr_expense" string="Expenses" type="object" attrs="{'invisible': [('charge_expenses','=',0)]}"/></td> </group>
<td><button icon="terp-dolar" class= "oe_btn_width" name="hr_to_invoiced_expense" string="Invoice Expenses" type="object" attrs="{'invisible': [('charge_expenses','=',0)]}"/></td>
</tr>
</xpath> </xpath>
</field> </field>
</record> </record>

View File

@ -29,52 +29,52 @@
</group> </group>
</group> </group>
<separator colspan="4" string="Invoicing"/> <separator colspan="4" string="Invoicing"/>
<group col="1" colspan="4"> <group colspan="4" col="6">
<table border="0"> <!-- header -->
<tr> <div class="oe_field_label" colspan="2"/>
<th class="oe_th_160px" height="20px"></th> <group colspan="4" col="6">
<th width="10px"></th> <div class="oe_field_label_bold">Est.Tot</div>
<th class="oe_th_110px">Est.Tot</th> <div class="oe_field_label_bold">Invoiced</div>
<th class="oe_th_110px">Invoiced</th> <div class="oe_field_label_bold">Remaining</div>
<th class="oe_th_110px">Remaining</th> <div class="oe_field_label_bold">To Invoice</div>
<th class="oe_th_110px">Ready To Invoice</th> <div class="oe_btn_width_small"/>
<th width="10px"></th> <div class="oe_btn_width"/>
<th></th> </group>
<th></th>
</tr> <!-- center -->
<tr>
<th class="oe_border_right">Fix Price Invoices</th> <field class="oe_field_label" name="fix_price_invoices" />
<td><field name="fix_price_invoices" nolabel="1"/></td> <group colspan="4" col="6" attrs="{'invisible': [('fix_price_invoices','=',False)]}">
<td><field class="oe_th_110px" name="amount_max" nolabel="1" attrs="{'invisible': [('fix_price_invoices','=',0)]}"/></td> <field class="oe_float_field" name="amount_max" nolabel="1" />
<td class="oe_th_110px"><field name="ca_invoiced" nolabel="1" attrs="{'invisible': [('fix_price_invoices','=',0)]}"/></td> <field class="oe_float_field" name="ca_invoiced" nolabel="1" />
<td class="oe_th_110px oe_border_right"><field name="remaining_ca" nolabel="1" attrs="{'invisible': [('fix_price_invoices','=',0)]}"/></td> <field class="oe_float_field" name="remaining_ca" nolabel="1" />
<td class="oe_th_110px"><field name="ca_to_invoice" nolabel="1" attrs="{'invisible': [('fix_price_invoices','=',0)]}"/></td> <field class="oe_float_field" name="ca_to_invoice" nolabel="1" />
<td width="10px"></td> <div><button class="oe_btn_width_small" icon="terp-check" name="%(account_analytic_analysis.action_sales_order_line)d" string="Sales" type="action" context="{'default_project_id': active_id,'search_default_project_id': active_id}"/></div>
<td><button icon="terp-check" class= "oe_btn_width" name="%(account_analytic_analysis.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)]}"/></td> <div><button class="oe_btn_width" icon="terp-dolar_ok!" 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}"/></div>
<td><button icon="terp-dolar_ok!" class= "oe_btn_width" 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)]}"/></td> </group>
</tr>
<tr> <field class="oe_field_label" name="invoice_on_timesheets"/>
<th class="oe_border_right">Invoice On Timesheets</th> <group colspan="4" col="6" attrs="{'invisible': [('invoice_on_timesheets','=',False)]}">
<td><field name="invoice_on_timesheets" nolabel="1"/></td> <field class="oe_float_field" name="hours_qtt_est" nolabel="1" />
<td><field class="oe_th_110px" name="quantity_max" nolabel="1" attrs="{'invisible': [('invoice_on_timesheets','=',0)]}"/></td> <field class="oe_float_field" name="hours_qtt_invoiced" nolabel="1"/>
<td class="oe_th_110px"><field name="hours_qtt_invoiced" nolabel="1" attrs="{'invisible': [('invoice_on_timesheets','=',0)]}"/></td> <field class="oe_float_field" name="remaining_hours_to_invoice" nolabel="1" />
<td class="oe_th_110px oe_border_right"><field name="remaining_hours" nolabel="1" attrs="{'invisible': [('invoice_on_timesheets','=',0)]}"/></td> <field class="oe_float_field" name="hours_qtt_non_invoiced" nolabel="1" />
<td class="oe_th_110px"><field name="hours_qtt_non_invoiced" nolabel="1" attrs="{'invisible': [('invoice_on_timesheets','=',0)]}"/></td> <div><button class="oe_btn_width_small" icon="terp-go-week" name="%(hr_timesheet.act_hr_timesheet_line_evry1_all_form)d" string="Timesheets" type="action" /></div>
<td width="10px"></td> <div><button class="oe_btn_width" icon="terp-dolar" name="%(hr_timesheet_invoice.act_acc_analytic_acc_2_report_acc_analytic_line_to_invoice)d" string="Invoice Timesheets" type="action"/></div>
<td><button icon="terp-go-week" class= "oe_btn_width" name="%(hr_timesheet.act_hr_timesheet_line_evry1_all_form)d" string="Timesheets" type="action" attrs="{'invisible': [('invoice_on_timesheets','=',0)]}"/></td> </group>
<td><button icon="terp-dolar" class= "oe_btn_width" 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)]}"/></td>
</tr> <!-- footer -->
<div name="end_of_tabl_hook"/>
<tr> <div class="oe_field_label oe_border_right" style="max-width:200px;" colspan="2">Total </div>
<th class="oe_border_right">Total</th> <group colspan="4" col="6" >
<td width="10px"></td> <field name="est_total" nolabel="1" class="oe_float_field oe_border_top"/>
<td class="oe_th_110px oe_border_top"><field name="est_total" nolabel="1"/></td> <field name="invoiced_total" nolabel="1" class="oe_float_field oe_border_top"/>
<td class="oe_th_110px oe_border_top"><field name="invoiced_total" nolabel="1"/></td> <field name="remaining_total" nolabel="1" class="oe_float_field oe_border_top"/>
<td class="oe_th_110px oe_border_right oe_border_top"><field name="remaining_total" nolabel="1"/></td> <field name="toinvoice_total" nolabel="1" class="oe_float_field oe_border_top"/>
<td class="oe_th_110px oe_border_top"><field name="toinvoice_total" nolabel="1"/></td> <div class="oe_btn_width_small"/>
</tr> <div class="oe_btn_width"/>
</table> </group>
</group> </group>
<separator string="Terms and Conditions" colspan="4" name="description"/> <separator string="Terms and Conditions" colspan="4" name="description"/>
<field colspan="4" name="description" nolabel="1"/> <field colspan="4" name="description" nolabel="1"/>
</page> </page>

View File

@ -7,9 +7,9 @@
<field name="type">form</field> <field name="type">form</field>
<field name="inherit_id" ref="analytic.view_account_analytic_account_form"/> <field name="inherit_id" ref="analytic.view_account_analytic_account_form"/>
<field name="arch" type="xml"> <field name="arch" type="xml">
<xpath expr='//group[@name="toinvoice"]' position='inside'> <xpath expr='//group[@name="toinvoice"]' position='inside'>
<field name="pricelist_id" attrs="{'invisible': [('invoice_on_timesheets','=',0)]}"/> <field name="pricelist_id" />
<field name="to_invoice" widget="selection" attrs="{'invisible': [('invoice_on_timesheets','=',0)]}"/> <field name="to_invoice" widget="selection" />
</xpath> </xpath>
<xpath expr="/form/sheet" position='before'> <xpath expr="/form/sheet" position='before'>
<header> <header>