[IMP] analytic: misc imp related to project and contract mangement task

bzr revid: qdp-launchpad@openerp.com-20120606153629-jlk1k0ze09b7pu6s
This commit is contained in:
Quentin (OpenERP) 2012-06-06 17:36:29 +02:00
parent 317a25b34e
commit 0125e320c9
5 changed files with 134 additions and 148 deletions

View File

@ -42,72 +42,70 @@
<field name="inherit_id" ref="analytic.view_account_analytic_account_form"/>
<field eval="18" name="priority"/>
<field name="arch" type="xml">
<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='//group[@name="project"]' position="after">
<group col="6" colspan="3" class="oe_form_group_label_border">
<xpath expr='//field[@name="partner_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='//field[@name="date"]' position="after">
<group col="6" colspan="2" 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='//group[@name="toinvoice"]' position='before'>
<separator colspan="4" string="Invoicing" name="invoicing"/>
<group col="1" colspan="4">
<table border="0">
<tr>
<th class="oe_th_137px" height="20px"></th>
<th width="10px"></th>
<th class="oe_th_110px">Est.Tot</th>
<th class="oe_th_110px">Invoiced</th>
<th class="oe_th_110px">Remaining</th>
<th class="oe_th_110px">Ready To Invoice</th>
<th width="10px"></th>
<th class="oe_th_150px"></th>
<th class="oe_th_150px"></th>
</tr>
<tr>
<th class="oe_border_right">Fix Price Invoices</th>
<td><field name="fix_price_invoices" nolabel="1"/></td>
<td class="oe_amount_center oe_th_110px"><field name="amount_max" nolabel="1" attrs="{'invisible': [('fix_price_invoices','=',0)]}"/></td>
<td class="oe_amount_center oe_th_110px"><field name="ca_invoiced" nolabel="1" attrs="{'invisible': [('fix_price_invoices','=',0)]}"/></td>
<td class="oe_amount_center oe_th_110px oe_border_right"><field name="remaining_ca" nolabel="1" attrs="{'invisible': [('fix_price_invoices','=',0)]}"/></td>
<td class="oe_amount_center oe_th_110px"><field name="ca_to_invoice" nolabel="1" attrs="{'invisible': [('fix_price_invoices','=',0)]}"/></td>
<td width="10px"></td>
<td class="oe_th_150px"><button 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>
<td class="oe_th_150px"><button 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>
</tr>
<tr>
<th class="oe_border_right">Invoice On Timesheets</th>
<td><field name="invoice_on_timesheets" nolabel="1"/></td>
<td class="oe_amount_center oe_th_110px"><field name="quantity_max" nolabel="1" attrs="{'invisible': [('invoice_on_timesheets','=',0)]}"/></td>
<td class="oe_amount_center oe_th_110px"><field name="hours_qtt_invoiced" nolabel="1" attrs="{'invisible': [('invoice_on_timesheets','=',0)]}"/></td>
<td class="oe_amount_center oe_th_110px oe_border_right"><field name="remaining_hours" nolabel="1" attrs="{'invisible': [('invoice_on_timesheets','=',0)]}"/></td>
<td class="oe_amount_center oe_th_110px"><field name="hours_qtt_non_invoiced" nolabel="1" attrs="{'invisible': [('invoice_on_timesheets','=',0)]}"/></td>
<td width="10px"></td>
<td class="oe_th_150px"><button 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>
<td class="oe_th_150px"><button 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>
<tr>
<th class="oe_border_right">Charge Expenses</th>
<td><field name="charge_expenses" nolabel="1"/></td>
<td class="oe_amount_center oe_th_110px"><field name="expense_max" nolabel="1" attrs="{'invisible': [('charge_expenses','=',0)]}"/></td>
<td class="oe_amount_center oe_th_110px"><field name="expense_invoiced" nolabel="1" attrs="{'invisible': [('charge_expenses','=',0)]}"/></td>
<td class="oe_amount_center oe_th_110px oe_border_right"><field name="remaining_expense" nolabel="1" attrs="{'invisible': [('charge_expenses','=',0)]}"/></td>
<td class="oe_amount_center oe_th_110px"><field name="expense_to_invoice" nolabel="1" attrs="{'invisible': [('charge_expenses','=',0)]}"/></td>
<td width="10px"></td>
<td class="oe_th_150px"><button class= "oe_btn_width" name="open_hr_expense" string="Expenses" type="object" attrs="{'invisible': [('charge_expenses','=',0)]}"/></td>
<td class="oe_th_150px"><button class= "oe_btn_width" name="hr_to_invoiced_expense" string="Invoice Expenses" type="object" attrs="{'invisible': [('charge_expenses','=',0)]}"/></td>
</tr>
<tr>
<th class="oe_border_right">Total</th>
<td width="10px"></td>
<td class="oe_amount_center oe_th_110px oe_border_top"><field name="est_total" nolabel="1"/></td>
<td class="oe_amount_center oe_th_110px oe_border_top"><field name="invoiced_total" nolabel="1"/></td>
<td class="oe_amount_center oe_th_110px oe_border_right oe_border_top"><field name="remaining_total" nolabel="1"/></td>
<td class="oe_amount_center oe_th_110px oe_border_top"><field name="toinvoice_total" nolabel="1"/></td>
</tr>
</table>
</group>
<xpath expr='//field[@name="pricelist_id"]' position='before'>
<separator colspan="4" string="Invoicing" name="invoicing"/>
<table border="0" colspan="4">
<tr>
<th class="oe_th_137px" height="20px"></th>
<th width="10px"></th>
<th class="oe_th_110px">Est.Tot</th>
<th class="oe_th_110px">Invoiced</th>
<th class="oe_th_110px">Remaining</th>
<th class="oe_th_110px">Ready To Invoice</th>
<th width="10px"></th>
<th class="oe_th_150px"></th>
<th class="oe_th_150px"></th>
</tr>
<tr>
<th class="oe_border_right">Fix Price Invoices</th>
<td><field name="fix_price_invoices" nolabel="1"/></td>
<td class="oe_amount_center oe_th_110px"><field name="amount_max" nolabel="1" attrs="{'invisible': [('fix_price_invoices','=',0)]}"/></td>
<td class="oe_amount_center oe_th_110px"><field name="ca_invoiced" nolabel="1" attrs="{'invisible': [('fix_price_invoices','=',0)]}"/></td>
<td class="oe_amount_center oe_th_110px oe_border_right"><field name="remaining_ca" nolabel="1" attrs="{'invisible': [('fix_price_invoices','=',0)]}"/></td>
<td class="oe_amount_center oe_th_110px"><field name="ca_to_invoice" nolabel="1" attrs="{'invisible': [('fix_price_invoices','=',0)]}"/></td>
<td width="10px"></td>
<td class="oe_th_150px"><button 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>
<td class="oe_th_150px"><button 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>
</tr>
<tr>
<th class="oe_border_right">Invoice On Timesheets</th>
<td><field name="invoice_on_timesheets" nolabel="1"/></td>
<td class="oe_amount_center oe_th_110px"><field name="quantity_max" nolabel="1" attrs="{'invisible': [('invoice_on_timesheets','=',0)]}"/></td>
<td class="oe_amount_center oe_th_110px"><field name="hours_qtt_invoiced" nolabel="1" attrs="{'invisible': [('invoice_on_timesheets','=',0)]}"/></td>
<td class="oe_amount_center oe_th_110px oe_border_right"><field name="remaining_hours" nolabel="1" attrs="{'invisible': [('invoice_on_timesheets','=',0)]}"/></td>
<td class="oe_amount_center oe_th_110px"><field name="hours_qtt_non_invoiced" nolabel="1" attrs="{'invisible': [('invoice_on_timesheets','=',0)]}"/></td>
<td width="10px"></td>
<td class="oe_th_150px"><button 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>
<td class="oe_th_150px"><button 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>
<tr>
<th class="oe_border_right">Charge Expenses</th>
<td><field name="charge_expenses" nolabel="1"/></td>
<td class="oe_amount_center oe_th_110px"><field name="expense_max" nolabel="1" attrs="{'invisible': [('charge_expenses','=',0)]}"/></td>
<td class="oe_amount_center oe_th_110px"><field name="expense_invoiced" nolabel="1" attrs="{'invisible': [('charge_expenses','=',0)]}"/></td>
<td class="oe_amount_center oe_th_110px oe_border_right"><field name="remaining_expense" nolabel="1" attrs="{'invisible': [('charge_expenses','=',0)]}"/></td>
<td class="oe_amount_center oe_th_110px"><field name="expense_to_invoice" nolabel="1" attrs="{'invisible': [('charge_expenses','=',0)]}"/></td>
<td width="10px"></td>
<td class="oe_th_150px"><button class= "oe_btn_width" name="open_hr_expense" string="Expenses" type="object" attrs="{'invisible': [('charge_expenses','=',0)]}"/></td>
<td class="oe_th_150px"><button class= "oe_btn_width" name="hr_to_invoiced_expense" string="Invoice Expenses" type="object" attrs="{'invisible': [('charge_expenses','=',0)]}"/></td>
</tr>
<tr>
<th class="oe_border_right">Total</th>
<td width="10px"></td>
<td class="oe_amount_center oe_th_110px oe_border_top"><field name="est_total" nolabel="1"/></td>
<td class="oe_amount_center oe_th_110px oe_border_top"><field name="invoiced_total" nolabel="1"/></td>
<td class="oe_amount_center oe_th_110px oe_border_right oe_border_top"><field name="remaining_total" nolabel="1"/></td>
<td class="oe_amount_center oe_th_110px oe_border_top"><field name="toinvoice_total" nolabel="1"/></td>
</tr>
</table>
</xpath>
</field>
</record>
@ -119,80 +117,78 @@
<field name="inherit_id" ref="project.edit_project"/>
<field eval="18" name="priority"/>
<field name="arch" type="xml">
<xpath expr='//page[@name="team"]' position='after'>
<page string="Contract Data">
<xpath expr='//page[@name="team"]' position='after'>
<page string="Contract Data">
<group colspan="2" col= "2" class="oe_form_group_label_border">
<separator colspan="2" string="Validity"/>
<field name="date_start"/>
<field name="date"/>
</group>
<group colspan="2" col= "2" class="oe_form_group_label_border">
<group colspan="2" col= "2" class="oe_form_group_label_border">
<separator colspan="2" string="Invoice Rate"/>
<field name="pricelist_id" attrs="{'invisible': ['|',('invoice_on_timesheets','=',0),('charge_expenses','=',0)]}"/>
<field name="to_invoice" widget="selection" attrs="{'invisible': [('invoice_on_timesheets','=',0)]}"/>
<field name="to_invoice" widget="selection" attrs="{'invisible': [('invoice_on_timesheets','=',0)]}"/>
</group>
<group col="6" colspan="2" class="oe_form_group_label_border">
<group col="6" colspan="2" class="oe_form_group_label_border">
<field name="quantity_max"/><field name="company_uom_id" nolabel="1" readonly="1"/><field name="remaining_hours" string="/ Remaining"/>
</group>
<separator colspan="4" string="Invoicing"/>
<group col="1" colspan="4">
<table border="0">
<tr>
<th class="oe_th_137px" height="20px"></th>
<th width="10px"></th>
<th class="oe_th_110px">Est.Tot</th>
<th class="oe_th_110px">Invoiced</th>
<th class="oe_th_110px">Remaining</th>
<th class="oe_th_110px">Ready To Invoice</th>
<th width="10px"></th>
<th class="oe_th_150px"></th>
<th class="oe_th_150px"></th>
</tr>
<tr>
<th class="oe_border_right">Fix Price Invoices</th>
<td><field name="fix_price_invoices" nolabel="1"/></td>
<td class="oe_amount_center oe_th_110px"><field name="amount_max" nolabel="1" attrs="{'invisible': [('fix_price_invoices','=',0)]}"/></td>
<td class="oe_amount_center oe_th_110px"><field name="ca_invoiced" nolabel="1" attrs="{'invisible': [('fix_price_invoices','=',0)]}"/></td>
<td class="oe_amount_center oe_th_110px oe_border_right"><field name="remaining_ca" nolabel="1" attrs="{'invisible': [('fix_price_invoices','=',0)]}"/></td>
<td class="oe_amount_center oe_th_110px"><field name="ca_to_invoice" nolabel="1" attrs="{'invisible': [('fix_price_invoices','=',0)]}"/></td>
<td width="10px"></td>
<td class="oe_th_150px"><button 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>
<td class="oe_th_150px"><button 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>
</tr>
<tr>
<th class="oe_border_right">Inv. On Timesheets</th>
<td><field name="invoice_on_timesheets" nolabel="1"/></td>
<td class="oe_amount_center oe_th_110px"><field name="quantity_max" nolabel="1" attrs="{'invisible': [('invoice_on_timesheets','=',0)]}"/></td>
<td class="oe_amount_center oe_th_110px"><field name="hours_qtt_invoiced" nolabel="1" attrs="{'invisible': [('invoice_on_timesheets','=',0)]}"/></td>
<td class="oe_amount_center oe_th_110px oe_border_right"><field name="remaining_hours" nolabel="1" attrs="{'invisible': [('invoice_on_timesheets','=',0)]}"/></td>
<td class="oe_amount_center oe_th_110px"><field name="hours_qtt_non_invoiced" nolabel="1" attrs="{'invisible': [('invoice_on_timesheets','=',0)]}"/></td>
<td width="10px"></td>
<td class="oe_th_150px"><button 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>
<td class="oe_th_150px"><button 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>
<tr>
<th class="oe_border_right">Charge Expenses</th>
<td><field name="charge_expenses" nolabel="1"/></td>
<td class="oe_amount_center oe_th_110px"><field name="expense_max" nolabel="1" attrs="{'invisible': [('charge_expenses','=',0)]}"/></td>
<td class="oe_amount_center oe_th_110px"><field name="expense_invoiced" nolabel="1" attrs="{'invisible': [('charge_expenses','=',0)]}"/></td>
<td class="oe_amount_center oe_th_110px oe_border_right"><field name="remaining_expense" nolabel="1" attrs="{'invisible': [('charge_expenses','=',0)]}"/></td>
<td class="oe_amount_center oe_th_110px"><field name="expense_to_invoice" nolabel="1" attrs="{'invisible': [('charge_expenses','=',0)]}"/></td>
<td width="10px"></td>
<td class="oe_th_150px"><button class= "oe_btn_width" name="open_hr_expense" string="Expenses" type="object" attrs="{'invisible': [('charge_expenses','=',0)]}"/></td>
<td class="oe_th_150px"><button class= "oe_btn_width" name="hr_to_invoiced_expense" string="Invoice Expenses" type="object" attrs="{'invisible': [('charge_expenses','=',0)]}"/></td>
</tr>
<tr>
<th class="oe_border_right">Total</th>
<td width="10px"></td>
<td class="oe_amount_center oe_th_110px oe_border_top"><field name="est_total" nolabel="1"/></td>
<td class="oe_amount_center oe_th_110px oe_border_top"><field name="invoiced_total" nolabel="1"/></td>
<td class="oe_amount_center oe_th_110px oe_border_right oe_border_top"><field name="remaining_total" nolabel="1"/></td>
<td class="oe_amount_center oe_th_110px oe_border_top"><field name="toinvoice_total" nolabel="1"/></td>
</tr>
</table>
</group>
<separator string="Terms and Condition" colspan="4"/>
<field colspan="4" name="description" nolabel="1"/>
<separator colspan="4" string="Invoicing"/>
<group col="1" colspan="4">
<table border="0">
<tr>
<th class="oe_th_137px" height="20px"></th>
<th width="10px"></th>
<th class="oe_th_110px">Est.Tot</th>
<th class="oe_th_110px">Invoiced</th>
<th class="oe_th_110px">Remaining</th>
<th class="oe_th_110px">Ready To Invoice</th>
<th width="10px"></th>
<th class="oe_th_150px"></th>
<th class="oe_th_150px"></th>
</tr>
<tr>
<th class="oe_border_right">Fix Price Invoices</th>
<td><field name="fix_price_invoices" nolabel="1"/></td>
<td class="oe_amount_center oe_th_110px"><field name="amount_max" nolabel="1" attrs="{'invisible': [('fix_price_invoices','=',0)]}"/></td>
<td class="oe_amount_center oe_th_110px"><field name="ca_invoiced" nolabel="1" attrs="{'invisible': [('fix_price_invoices','=',0)]}"/></td>
<td class="oe_amount_center oe_th_110px oe_border_right"><field name="remaining_ca" nolabel="1" attrs="{'invisible': [('fix_price_invoices','=',0)]}"/></td>
<td class="oe_amount_center oe_th_110px"><field name="ca_to_invoice" nolabel="1" attrs="{'invisible': [('fix_price_invoices','=',0)]}"/></td>
<td width="10px"></td>
<td class="oe_th_150px"><button 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>
<td class="oe_th_150px"><button 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>
</tr>
<tr>
<th class="oe_border_right">Inv. On Timesheets</th>
<td><field name="invoice_on_timesheets" nolabel="1"/></td>
<td class="oe_amount_center oe_th_110px"><field name="quantity_max" nolabel="1" attrs="{'invisible': [('invoice_on_timesheets','=',0)]}"/></td>
<td class="oe_amount_center oe_th_110px"><field name="hours_qtt_invoiced" nolabel="1" attrs="{'invisible': [('invoice_on_timesheets','=',0)]}"/></td>
<td class="oe_amount_center oe_th_110px oe_border_right"><field name="remaining_hours" nolabel="1" attrs="{'invisible': [('invoice_on_timesheets','=',0)]}"/></td>
<td class="oe_amount_center oe_th_110px"><field name="hours_qtt_non_invoiced" nolabel="1" attrs="{'invisible': [('invoice_on_timesheets','=',0)]}"/></td>
<td width="10px"></td>
<td class="oe_th_150px"><button 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>
<td class="oe_th_150px"><button 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>
<tr>
<th class="oe_border_right">Charge Expenses</th>
<td><field name="charge_expenses" nolabel="1"/></td>
<td class="oe_amount_center oe_th_110px"><field name="expense_max" nolabel="1" attrs="{'invisible': [('charge_expenses','=',0)]}"/></td>
<td class="oe_amount_center oe_th_110px"><field name="expense_invoiced" nolabel="1" attrs="{'invisible': [('charge_expenses','=',0)]}"/></td>
<td class="oe_amount_center oe_th_110px oe_border_right"><field name="remaining_expense" nolabel="1" attrs="{'invisible': [('charge_expenses','=',0)]}"/></td>
<td class="oe_amount_center oe_th_110px"><field name="expense_to_invoice" nolabel="1" attrs="{'invisible': [('charge_expenses','=',0)]}"/></td>
<td width="10px"></td>
<td class="oe_th_150px"><button class= "oe_btn_width" name="open_hr_expense" string="Expenses" type="object" attrs="{'invisible': [('charge_expenses','=',0)]}"/></td>
<td class="oe_th_150px"><button class= "oe_btn_width" name="hr_to_invoiced_expense" string="Invoice Expenses" type="object" attrs="{'invisible': [('charge_expenses','=',0)]}"/></td>
</tr>
<tr>
<th class="oe_border_right">Total</th>
<td width="10px"></td>
<td class="oe_amount_center oe_th_110px oe_border_top"><field name="est_total" nolabel="1"/></td>
<td class="oe_amount_center oe_th_110px oe_border_top"><field name="invoiced_total" nolabel="1"/></td>
<td class="oe_amount_center oe_th_110px oe_border_right oe_border_top"><field name="remaining_total" nolabel="1"/></td>
<td class="oe_amount_center oe_th_110px oe_border_top"><field name="toinvoice_total" nolabel="1"/></td>
</tr>
</table>
</group>
</page>
</xpath>
</field>

View File

@ -171,13 +171,7 @@ class account_analytic_account(osv.osv):
'date_start': fields.date('Date Start'),
'date': fields.date('Date End', select=True),
'company_id': fields.many2one('res.company', 'Company', required=False), #not required because we want to allow different companies to use the same chart of account, except for leaf accounts.
'state': fields.selection([('template', 'Template'),('draft','New'),('open','Open'), ('cancelled', 'Cancelled'),('pending','Pending'),('close','Closed')], 'Status', required=True,
help='* When an account is created its in \'Draft\' state.\
\n* If any associated partner is there, it can be in \'Open\' state.\
\n* If any pending balance is there it can be in \'Pending\'. \
\n* And finally when all the transactions are over, it can be in \'Close\' state. \
\n* The project can be in either if the states \'Template\' and \'Running\'.\n If it is template then we can make projects based on the template projects. If its in \'Running\' state it is a normal project.\
\n If it is to be reviewed then the state is \'Pending\'.\n When the project is completed the state is set to \'Done\'.'),
'state': fields.selection([('template', 'Template'),('draft','New'),('open','In Progress'), ('cancelled', 'Cancelled'),('pending','To Renew'),('close','Closed')], 'Status', required=True,),
'currency_id': fields.function(_currency, fnct_inv=_set_company_currency,
store = {
'res.company': (_get_analytic_account, ['currency_id'], 10),

View File

@ -19,7 +19,7 @@
<field name="parent_id" on_change="on_change_parent(parent_id)" attrs="{'invisible': [('type','in',['contract','template'])]}"/>
</group>
<notebook colspan="4">
<page string="Contract Information" name="contract_page">
<page string="Contract Information" name="contract_page" col="4">
<group colspan="2" col= "2" name="contract" class="oe_form_group_label_border">
<separator colspan="2" string="Validity"/>
<field name="date_start"/>
@ -28,8 +28,8 @@
<group colspan="2" col="2" name="project" class="oe_form_group_label_border">
<separator colspan="2" string="Project" name="project_sep" invisible="1"/>
</group>
<group name="toinvoice" invisible="1"></group>
<separator string="Terms and Condition" colspan="4" name="description"/>
<group name="toinvoice" colspan="4" col="4"></group>
<separator string="Terms and Conditions" colspan="4" name="description"/>
<field colspan="4" name="description" nolabel="1"/>
</page>
</notebook>

View File

@ -7,12 +7,10 @@
<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="toinvoice"]' position='replace'>
<group colspan="4" class="oe_form_group_label_border" name="toinvoice">
<field name="pricelist_id" />
<field name="to_invoice" widget="selection" />
</group>
</xpath>
<xpath expr='//group[@name="toinvoice"]' position='inside'>
<field name="pricelist_id" />
<field name="to_invoice" widget="selection" />
</xpath>
<xpath expr="/form/sheet" position='before'>
<header>
<button name="set_pending" string="Pending" type="object" states="open"/>
@ -97,7 +95,7 @@
<field name="inherit_id" ref="account.view_account_analytic_line_tree"/>
<field name="arch" type="xml">
<field name="account_id" position="replace">
<field name="account_id" context="{'search_default_use_timesheets': 1, 'default_use_timesheets': 1}"/>
<field name="account_id" context="{'search_default_use_timesheets': 1, 'default_use_timesheets': 1}"/>
<field name="to_invoice"/>
</field>
</field>

View File

@ -190,8 +190,8 @@ class project(osv.osv):
'priority': fields.integer('Sequence', help="Gives the sequence order when displaying the list of projects"),
'warn_manager': fields.boolean('Notify Manager', help="If you check this field, the project manager will receive an email each time a task is completed by his team.", states={'close':[('readonly',True)], 'cancelled':[('readonly',True)]}),
#'members': fields.many2many('res.users', 'project_user_rel', 'project_id', 'uid', 'Project Members',
# help="Project's members are users who can have an access to the tasks related to this project.", states={'close':[('readonly',True)], 'cancelled':[('readonly',True)]}),
'members': fields.many2many('res.users', 'project_user_rel', 'project_id', 'uid', 'Project Members',
help="Project's members are users who can have an access to the tasks related to this project.", states={'close':[('readonly',True)], 'cancelled':[('readonly',True)]}),
'tasks': fields.one2many('project.task', 'project_id', "Task Activities"),
'planned_hours': fields.function(_progress_rate, multi="progress", string='Planned Time', help="Sum of planned hours of all tasks related to this project and its child projects.",
store = {
@ -1247,8 +1247,6 @@ class account_analytic_account(osv.osv):
_columns = {
'use_tasks': fields.boolean('Tasks Management'),
'company_uom_id': fields.related('company_id', 'project_time_mode_id', type='many2one', relation='product.uom'),
'members': fields.many2many('res.users', 'project_user_rel', 'project_id', 'uid', 'Project Members',
states={'close':[('readonly',True)], 'cancelled':[('readonly',True)]}),
}
# _defaults = {
# 'use_tasks': True,