[IMP] useability of project and contracts

bzr revid: fp@openerp.com-20121028082829-ito7d71piwc4iael
This commit is contained in:
Fabien Pinckaers 2012-10-28 09:28:29 +01:00
parent 80fb0f7f81
commit 59dec931a2
6 changed files with 68 additions and 46 deletions

View File

@ -30,18 +30,18 @@
<separator name="toinvoice" string="Invoicing"/> <separator name="toinvoice" string="Invoicing"/>
<table class="oe_form_analytic_account"> <table class="oe_form_analytic_account">
<tr> <tr>
<th class="oe_grey" width="160px"></th> <th class="oe_timesheet_grey" width="160px"></th>
<th class="oe_grey" width="25px"></th> <th class="oe_timesheet_grey" width="25px"></th>
<th class="oe_grey" width="100px"><label string="Expected"/></th> <th class="oe_timesheet_grey" width="100px"><label string="Expected"/></th>
<th class="oe_grey" width="100px"><label string="Invoiced"/></th> <th class="oe_timesheet_grey" width="100px"><label string="Invoiced"/></th>
<th class="oe_grey" width="100px"><label string="Remaining"/></th> <th class="oe_timesheet_grey" width="100px"><label string="Remaining"/></th>
<th class="oe_grey" width="100px"><label string="To Invoice"/></th> <th class="oe_timesheet_grey" width="100px"><label string="To Invoice"/></th>
<th width="30px"></th> <th width="30px"></th>
<th></th> <th></th>
</tr><tr> </tr><tr>
<td class="oe_grey"> <td class="oe_timesheet_grey">
<label for="fix_price_invoices"/> <label for="fix_price_invoices"/>
</td><td class="oe_grey"> </td><td class="oe_timesheet_grey">
<field name="fix_price_invoices" class="oe_inline"/> <field name="fix_price_invoices" class="oe_inline"/>
</td><td> </td><td>
<field class="oe_inline" name="amount_max" attrs="{'invisible': [('fix_price_invoices','=',False)]}"/> <field class="oe_inline" name="amount_max" attrs="{'invisible': [('fix_price_invoices','=',False)]}"/>
@ -51,23 +51,28 @@
<field class="oe_inline" name="remaining_ca" attrs="{'invisible': [('fix_price_invoices','=',False)]}"/> <field class="oe_inline" name="remaining_ca" attrs="{'invisible': [('fix_price_invoices','=',False)]}"/>
</td><td> </td><td>
<field class="oe_inline" name="fix_price_to_invoice" attrs="{'invisible': [('fix_price_invoices','=',False)]}"/> <field class="oe_inline" name="fix_price_to_invoice" attrs="{'invisible': [('fix_price_invoices','=',False)]}"/>
</td><td> </td><td attrs="{'invisible': [('fix_price_invoices','=',False)]}" class="oe_timesheet_action">
<button name="open_sale_order_lines" <span attrs="{'invisible': [('fix_price_to_invoice','=',0.0)]}" class="oe_grey">
class="oe_link oe_e" <button name="open_sale_order_lines"
string="/" type="object" class="oe_link"
context="{'default_partner_id': [partner_id],'default_project_id': active_id,'search_default_uninvoiced': 1,'search_default_project_id': active_id,'search_default_partner_id': [partner_id]}" string="⇒ Invoice" type="object"
attrs="{'invisible': [('fix_price_to_invoice','=',0)]}"/> context="{'default_partner_id': [partner_id],'default_project_id': active_id,'search_default_uninvoiced': 1,'search_default_project_id': active_id,'search_default_partner_id': [partner_id]}"/>
</td><td> or view
</span>
<span attrs="{'invisible': [('fix_price_to_invoice','&lt;&gt;',0.0)]}" class="oe_grey">
No order to invoice, view
</span>
<button name="%(action_sales_order)d" string="Sale Orders" <button name="%(action_sales_order)d" string="Sale Orders"
type="action" type="action"
class="oe_link" class="oe_link"
context="{'default_partner_id': [partner_id], 'search_default_partner_id': [partner_id],'search_default_project_id': [active_id],'default_project_id': [active_id]}" context="{'default_partner_id': [partner_id], 'search_default_partner_id': [partner_id],'search_default_project_id': [active_id],'default_project_id': [active_id]}"
attrs="{'invisible': [('fix_price_invoices','=',False)]}"/> />
</td> </td>
</tr><tr> </tr><tr>
<td class="oe_grey"> <td class="oe_timesheet_grey">
<label for="invoice_on_timesheets"/> <label for="invoice_on_timesheets"/>
</td><td class="oe_grey"> </td><td class="oe_timesheet_grey">
<field name="invoice_on_timesheets"/> <field name="invoice_on_timesheets"/>
</td><td> </td><td>
<field class="oe_inline" name="hours_qtt_est" attrs="{'invisible': [('invoice_on_timesheets','=',False)]}"/> <field class="oe_inline" name="hours_qtt_est" attrs="{'invisible': [('invoice_on_timesheets','=',False)]}"/>
@ -77,31 +82,34 @@
<field class="oe_inline" name="remaining_hours_to_invoice" attrs="{'invisible': [('invoice_on_timesheets','=',False)]}"/> <field class="oe_inline" name="remaining_hours_to_invoice" attrs="{'invisible': [('invoice_on_timesheets','=',False)]}"/>
</td><td> </td><td>
<field class="oe_inline" name="ca_to_invoice" attrs="{'invisible': [('invoice_on_timesheets','=',False)]}"/> <field class="oe_inline" name="ca_to_invoice" attrs="{'invisible': [('invoice_on_timesheets','=',False)]}"/>
</td><td> </td><td class="oe_timesheet_action" attrs="{'invisible': [('invoice_on_timesheets','=',False)]}">
<button name="%(hr_timesheet_invoice.act_acc_analytic_acc_2_report_acc_analytic_line_to_invoice)d" <span attrs="{'invisible': [('ca_to_invoice','=',0.0)]}" class="oe_grey">
type="action" <button name="%(hr_timesheet_invoice.act_acc_analytic_acc_2_report_acc_analytic_line_to_invoice)d"
class="oe_link oe_e" type="action"
string="/" class="oe_link"
attrs="{'invisible': [('ca_to_invoice','=',0.0)]}"/> string="⇒ Invoice"/>
or view
</span>
<div attrs="{'invisible': [('ca_to_invoice','&lt;&gt;',0.0)]}" class="oe_grey">
No hours to invoice, create
</div>
</td><td>
<button name="%(hr_timesheet.act_hr_timesheet_line_evry1_all_form)d" <button name="%(hr_timesheet.act_hr_timesheet_line_evry1_all_form)d"
string="Timesheets" type="action" string="Timesheets" type="action"
class="oe_link" class="oe_link"
attrs="{'invisible': [('invoice_on_timesheets','=',False)]}"
context="{'default_account_id': active_id,'search_default_account_id': active_id}"/> context="{'default_account_id': active_id,'search_default_account_id': active_id}"/>
</td> </td>
</tr><tr name='total'> </tr><tr name='total'>
<th class="oe_grey"> <th class="oe_timesheet_grey">
<label string="Total"/> <label string="Total"/>
</th><td class="oe_grey"> </th><td class="oe_timesheet_grey">
</td><td class="oe_grey"> </td><td class="oe_timesheet_grey">
<field name="est_total" class="oe_inline" attrs="{'invisible': [('invoice_on_timesheets','=',False)]}"/> <field name="est_total" class="oe_inline" attrs="{'invisible': [('invoice_on_timesheets','=',False)]}"/>
</td><td class="oe_grey"> </td><td class="oe_timesheet_grey">
<field name="invoiced_total" class="oe_inline"/> <field name="invoiced_total" class="oe_inline"/>
</td><td class="oe_grey"> </td><td class="oe_timesheet_grey">
<field name="remaining_total" class="oe_inline"/> <field name="remaining_total" class="oe_inline"/>
</td><td class="oe_grey"> </td><td class="oe_timesheet_grey">
<field name="toinvoice_total" class="oe_inline"/> <field name="toinvoice_total" class="oe_inline"/>
</td><td> </td><td>
</td> </td>

View File

@ -9,7 +9,11 @@
float: right; float: right;
width: auto !important; width: auto !important;
} }
.openerp .oe_form table.oe_form_analytic_account .oe_grey { .openerp .oe_form table.oe_form_analytic_account tr td.oe_timesheet_action {
width: 250px;
padding-left: 7px;
}
.openerp .oe_form table.oe_form_analytic_account .oe_timesheet_grey {
background-color: #eeeeee; background-color: #eeeeee;
color: #404040; color: #404040;
} }

View File

@ -9,7 +9,10 @@
.oe_form_field_float .oe_form_field_float
float: right float: right
width: auto !important width: auto !important
.oe_grey td.oe_timesheet_action
width: 250px
padding-left: 7px
.oe_timesheet_grey
background-color: #eeeeee background-color: #eeeeee
color: #404040 color: #404040

View File

@ -21,7 +21,7 @@
<group name="main"> <group name="main">
<group> <group>
<field name="partner_id" on_change="on_change_partner_id(partner_id, name)" attrs="{'required':[('type','=','contract')]}"/> <field name="partner_id" on_change="on_change_partner_id(partner_id, name)"/>
<field name="manager_id"/> <field name="manager_id"/>
<field name="code"/> <field name="code"/>
<field name="currency_id" attrs="{'invisible': ['|',('type', '&lt;&gt;', 'view'), ('company_id', '&lt;&gt;', False)]}"/> <field name="currency_id" attrs="{'invisible': ['|',('type', '&lt;&gt;', 'view'), ('company_id', '&lt;&gt;', False)]}"/>

View File

@ -9,9 +9,9 @@
<field name="arch" type="xml"> <field name="arch" type="xml">
<xpath expr='//tr[@name="total"]' position='before'> <xpath expr='//tr[@name="total"]' position='before'>
<tr> <tr>
<td class="oe_grey"> <td class="oe_timesheet_grey">
<label for="charge_expenses"/> <label for="charge_expenses"/>
</td><td class="oe_grey"> </td><td class="oe_timesheet_grey">
<field name="charge_expenses"/> <field name="charge_expenses"/>
</td><td> </td><td>
<field class="oe_form_inline" name="est_expenses" attrs="{'invisible': [('charge_expenses','=',False)]}"/> <field class="oe_form_inline" name="est_expenses" attrs="{'invisible': [('charge_expenses','=',False)]}"/>
@ -21,17 +21,22 @@
<field class="oe_form_inline" name="remaining_expense" attrs="{'invisible': [('charge_expenses','=',False)]}"/> <field class="oe_form_inline" name="remaining_expense" attrs="{'invisible': [('charge_expenses','=',False)]}"/>
</td><td> </td><td>
<field class="oe_form_inline" name="expense_to_invoice" attrs="{'invisible': [('charge_expenses','=',False)]}"/> <field class="oe_form_inline" name="expense_to_invoice" attrs="{'invisible': [('charge_expenses','=',False)]}"/>
</td><td> </td><td attrs="{'invisible': [('charge_expenses','=',False)]}" class="oe_timesheet_action">
<button <span attrs="{'invisible': [('expense_to_invoice','=',0)]}" class="oe_grey">
name="hr_to_invoice_expense" <button
class="oe_link oe_e" name="hr_to_invoice_expense"
string="/" type="object" class="oe_link"
attrs="{'invisible': [('expense_to_invoice','=',0)]}"/> string="⇒ Invoice" type="object"
</td><td> />
of view
</span>
<span attrs="{'invisible': [('expense_to_invoice','&lt;&gt;',0)]}" class="oe_grey">
None to invoice, create
</span>
<button <button
name="open_hr_expense" name="open_hr_expense"
class="oe_link" class="oe_link"
string="Expenses" type="object" attrs="{'invisible': [('charge_expenses','=',False)]}"/> string="Expenses" type="object"/>
</td> </td>
</tr> </tr>
</xpath> </xpath>

View File

@ -97,7 +97,9 @@
</group> </group>
<group> <group>
<field name="partner_id" on_change="onchange_partner_id(partner_id)"/> <field name="partner_id" on_change="onchange_partner_id(partner_id)"/>
<field name="analytic_account_id" readonly="1" required="0" attrs="{'invisible': [('analytic_account_id','=',False)]}"/> <p colspan="2" attrs="{'invisible': [('analytic_account_id','=',False)]}">
To invoice or setup invoicing and renewal options, go to the related contract: <field name="analytic_account_id" readonly="1" required="0" class="oe_inline"/>.
</p>
</group> </group>
</group> </group>
<notebook> <notebook>