[Merge]with : lp:~openerp-dev/openobject-addons/trunk-contract-apa
bzr revid: dbr@tinyerp.com-20120608092012-hsesste41lz5ifx2
This commit is contained in:
commit
11d714eb0e
|
@ -432,7 +432,7 @@ class account_analytic_account(osv.osv):
|
|||
'toinvoice_total' : fields.function(_sum_of_fields, type="float",multi="sum_of_all"),
|
||||
}
|
||||
|
||||
def on_change_template(self, cr, uid, id, template_id, context=None):
|
||||
def on_change_template(self, cr, uid, ids, template_id, context=None):
|
||||
if not template_id:
|
||||
return {}
|
||||
res = {'value':{}}
|
||||
|
|
|
@ -51,8 +51,8 @@
|
|||
<td class="oe_th_110px oe_border_right"><field name="remaining_ca" nolabel="1" attrs="{'invisible': [('fix_price_invoices','=',0)]}"/></td>
|
||||
<td class="oe_th_110px"><field name="ca_to_invoice" nolabel="1" attrs="{'invisible': [('fix_price_invoices','=',0)]}"/></td>
|
||||
<td width="10px"></td>
|
||||
<td><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><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>
|
||||
<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>
|
||||
<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>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="oe_border_right">Invoice On Timesheets</th>
|
||||
|
@ -62,8 +62,8 @@
|
|||
<td class="oe_th_110px oe_border_right"><field name="remaining_hours" nolabel="1" attrs="{'invisible': [('invoice_on_timesheets','=',0)]}"/></td>
|
||||
<td class="oe_th_110px"><field name="hours_qtt_non_invoiced" nolabel="1" attrs="{'invisible': [('invoice_on_timesheets','=',0)]}"/></td>
|
||||
<td width="10px"></td>
|
||||
<td><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><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>
|
||||
<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>
|
||||
<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>
|
||||
<div name="end_of_tabl_hook"/>
|
||||
<tr>
|
||||
|
|
|
@ -31,13 +31,10 @@ class analytic_account(report_sxw.rml_parse):
|
|||
})
|
||||
def get_lines(self, analytic_account):
|
||||
res = []
|
||||
res.insert(0,('Fix Price Invoices',analytic_account.amount_max,analytic_account.ca_invoiced,analytic_account.remaining_ca,analytic_account.ca_to_invoice))
|
||||
res.insert(1,('Invoice On Timesheets',analytic_account.hours_qtt_est,analytic_account.hours_qtt_invoiced,analytic_account.remaining_hours,analytic_account.hours_qtt_non_invoiced))
|
||||
res.append(('Fix Price Invoices',analytic_account.amount_max,analytic_account.ca_invoiced,analytic_account.remaining_ca,analytic_account.ca_to_invoice))
|
||||
res.append(('Invoice On Timesheets',analytic_account.hours_qtt_est,analytic_account.hours_qtt_invoiced,analytic_account.remaining_hours,analytic_account.hours_qtt_non_invoiced))
|
||||
res.append(('Total',analytic_account.est_total,analytic_account.invoiced_total,analytic_account.remaining_total,analytic_account.toinvoice_total))
|
||||
return res
|
||||
#return res.append(
|
||||
# ('Fix Price Invoices',analytic_account.amount_max,analytic_account.ca_invoiced,analytic_account.remaining_ca,analytic_account.ca_to_invoice),
|
||||
# ('Invoice On Timesheets',analytic_account.hours_qtt_est,analytic_account.hours_qtt_invoiced,analytic_account.remaining_hours,analytic_account.hours_qtt_non_invoiced)
|
||||
#)
|
||||
|
||||
report_sxw.report_sxw(
|
||||
'report.analytic.account',
|
||||
|
|
|
@ -17,11 +17,34 @@
|
|||
<td class="oe_th_110px oe_border_right"><field name="remaining_expense" nolabel="1" attrs="{'invisible': [('charge_expenses','=',0)]}"/></td>
|
||||
<td class="oe_th_110px"><field name="expense_to_invoice" nolabel="1" attrs="{'invisible': [('charge_expenses','=',0)]}"/></td>
|
||||
<td width="10px"></td>
|
||||
<td><button class= "oe_btn_width" name="open_hr_expense" string="Expenses" type="object" attrs="{'invisible': [('charge_expenses','=',0)]}"/></td>
|
||||
<td><button class= "oe_btn_width" name="hr_to_invoiced_expense" string="Invoice Expenses" type="object" attrs="{'invisible': [('charge_expenses','=',0)]}"/></td>
|
||||
<td><button icon="gtk-select-all" class= "oe_btn_width" name="open_hr_expense" string="Expenses" type="object" attrs="{'invisible': [('charge_expenses','=',0)]}"/></td>
|
||||
<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>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!--<record id="project_form_expense_form" model="ir.ui.view">
|
||||
<field name="name">project.project.form.expense.inherit</field>
|
||||
<field name="model">project.project</field>
|
||||
<field name="type">form</field>
|
||||
<field name="inherit_id" ref="analytic_contract_project.project_account_analytic_account_form"/>
|
||||
<field eval="20" name="priority"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr='//div[@name="end_of_tabl_hook"]' position='before'>
|
||||
<tr>
|
||||
<th class="oe_border_right">Charge Expenses</th>
|
||||
<td><field name="charge_expenses" nolabel="1"/></td>
|
||||
<td><field class="oe_th_110px" name="est_expenses" nolabel="1" attrs="{'invisible': [('charge_expenses','=',0)]}"/></td>
|
||||
<td class="oe_th_110px"><field name="expense_invoiced" nolabel="1" attrs="{'invisible': [('charge_expenses','=',0)]}"/></td>
|
||||
<td class="oe_th_110px oe_border_right"><field name="remaining_expense" nolabel="1" attrs="{'invisible': [('charge_expenses','=',0)]}"/></td>
|
||||
<td class="oe_th_110px"><field name="expense_to_invoice" nolabel="1" attrs="{'invisible': [('charge_expenses','=',0)]}"/></td>
|
||||
<td width="10px"></td>
|
||||
<td><button icon="gtk-select-all" class= "oe_btn_width" name="open_hr_expense" string="Expenses" type="object" attrs="{'invisible': [('charge_expenses','=',0)]}"/></td>
|
||||
<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>
|
||||
</field>
|
||||
</record>-->
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
|
@ -50,8 +50,8 @@
|
|||
<td class="oe_th_110px oe_border_right"><field name="remaining_ca" nolabel="1" attrs="{'invisible': [('fix_price_invoices','=',0)]}"/></td>
|
||||
<td class="oe_th_110px"><field name="ca_to_invoice" nolabel="1" attrs="{'invisible': [('fix_price_invoices','=',0)]}"/></td>
|
||||
<td width="10px"></td>
|
||||
<td><button 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>
|
||||
<td><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>
|
||||
<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>
|
||||
<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>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="oe_border_right">Invoice On Timesheets</th>
|
||||
|
@ -61,20 +61,10 @@
|
|||
<td class="oe_th_110px oe_border_right"><field name="remaining_hours" nolabel="1" attrs="{'invisible': [('invoice_on_timesheets','=',0)]}"/></td>
|
||||
<td class="oe_th_110px"><field name="hours_qtt_non_invoiced" nolabel="1" attrs="{'invisible': [('invoice_on_timesheets','=',0)]}"/></td>
|
||||
<td width="10px"></td>
|
||||
<td><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><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>
|
||||
<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>
|
||||
<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>
|
||||
<!-- <tr>
|
||||
<th class="oe_border_right">Charge Expenses</th>
|
||||
<td><field name="charge_expenses" nolabel="1"/></td>
|
||||
<td><field class="oe_th_110px" name="expense_max" nolabel="1" attrs="{'invisible': [('charge_expenses','=',0)]}"/></td>
|
||||
<td class="oe_th_110px"><field name="expense_invoiced" nolabel="1" attrs="{'invisible': [('charge_expenses','=',0)]}"/></td>
|
||||
<td class="oe_th_110px oe_border_right"><field name="remaining_expense" nolabel="1" attrs="{'invisible': [('charge_expenses','=',0)]}"/></td>
|
||||
<td class="oe_th_110px"><field name="expense_to_invoice" nolabel="1" attrs="{'invisible': [('charge_expenses','=',0)]}"/></td>
|
||||
<td width="10px"></td>
|
||||
<td><button class= "oe_btn_width" name="account_analytic_analysis.open_hr_expense" string="Expenses" type="object" attrs="{'invisible': [('charge_expenses','=',0)]}"/></td>
|
||||
<td><button class= "oe_btn_width" name="account_analytic_analysis.hr_to_invoiced_expense" string="Invoice Expenses" type="object" attrs="{'invisible': [('charge_expenses','=',0)]}"/></td>
|
||||
</tr>-->
|
||||
<div name="end_of_tabl_hook"/>
|
||||
<tr>
|
||||
<th class="oe_border_right">Total</th>
|
||||
<td width="10px"></td>
|
||||
|
|
|
@ -221,6 +221,7 @@ class project(osv.osv):
|
|||
'task_count': fields.function(_task_count, type='integer', string="Open Tasks"),
|
||||
'color': fields.integer('Color Index'),
|
||||
'privacy_visibility': fields.selection([('public','Public'), ('follower','Followers Only')], 'Privacy / Visibility', select=True),
|
||||
'state': fields.selection([('template', 'Template'),('draft','New'),('open','In Progress'), ('cancelled', 'Cancelled'),('pending','Pending'),('close','Closed')], 'Status', required=True,),
|
||||
}
|
||||
|
||||
def dummy(self, cr, uid, ids, context):
|
||||
|
@ -241,6 +242,7 @@ class project(osv.osv):
|
|||
_order = "sequence"
|
||||
_defaults = {
|
||||
'active': True,
|
||||
'state': 'open',
|
||||
'priority': 1,
|
||||
'sequence': 10,
|
||||
'type_ids': _get_type_common,
|
||||
|
|
|
@ -56,12 +56,12 @@
|
|||
<tr name="use_tasks_row">
|
||||
<th style="border-right:1px solid #DDD;" width="140px">Tasks Management</th>
|
||||
<td><field name="use_tasks" nolabel="1"/></td>
|
||||
<td style="text-align:right;" width="110px"><button class="oe_btn_width" name="%(act_project_project_2_project_task_all)d" string="Tasks" type="action" attrs="{'invisible':[('use_tasks','=', 0)]}"/></td>
|
||||
<td style="text-align:right;" width="110px"><button icon="terp-stock_align_left_24" class="oe_btn_width" name="%(act_project_project_2_project_task_all)d" string="Tasks" type="action" attrs="{'invisible':[('use_tasks','=', 0)]}"/></td>
|
||||
</tr>
|
||||
<tr name="use_attachment_row">
|
||||
<th/>
|
||||
<td/>
|
||||
<td style="text-align:right;" width="110px"><button class="oe_btn_width" name="%(base.action_attachment)d" string="Documents" type="action" /></td>
|
||||
<td style="text-align:right;" width="110px"><button icon="gtk-dnd-multiple" class="oe_btn_width" name="%(base.action_attachment)d" string="Documents" type="action" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
</group>
|
||||
|
|
|
@ -352,7 +352,7 @@
|
|||
<tr name="use_issues_row">
|
||||
<th style="border-right:1px solid #DDD;" width="140px">Issues Tracking</th>
|
||||
<td><field name="use_issues" nolabel="1"/></td>
|
||||
<td style="text-align:right;" width="110px"><button class="oe_btn_width" name="%(act_project_project_2_project_issue_all)d" string="Issues" type="action" attrs="{'invisible':[('use_issues','=', 0)]}"/></td>
|
||||
<td style="text-align:right;" width="110px"><button icon="terp-stock_symbol-selection" class="oe_btn_width" name="%(act_project_project_2_project_issue_all)d" string="Issues" type="action" attrs="{'invisible':[('use_issues','=', 0)]}"/></td>
|
||||
</tr>
|
||||
</xpath>
|
||||
<field name="priority" position="before">
|
||||
|
|
|
@ -115,7 +115,7 @@
|
|||
<tr name="use_phases_row">
|
||||
<th style="border-right:1px solid #DDD;" width="140px">Phases Planing</th>
|
||||
<td><field name="use_phases" nolabel="1"/></td>
|
||||
<td style="text-align:right;"><button class="oe_btn_width" name="%(act_project_phases)d" string="Phases" type="action" attrs="{'invisible':[('use_phases','=', 0)]}"/></td>
|
||||
<td style="text-align:right;"><button icon=" terp-emblem-important" class="oe_btn_width" name="%(act_project_phases)d" string="Phases" type="action" attrs="{'invisible':[('use_phases','=', 0)]}"/></td>
|
||||
</tr>
|
||||
</xpath>
|
||||
</field>
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
<tr name="use_timesheets_row">
|
||||
<th style="border-right:1px solid #DDD;" width="140px">Timesheets</th>
|
||||
<td><field name="use_timesheets" nolabel="1"/></td>
|
||||
<td style="text-align:right;"><button class="oe_btn_width" name="open_timesheets" string="Timesheets" type="object" attrs="{'invisible':[('use_timesheets','=', 0)]}"/></td>
|
||||
<td style="text-align:right;"><button icon="terp-go-week" class="oe_btn_width" name="open_timesheets" string="Timesheets" type="object" attrs="{'invisible':[('use_timesheets','=', 0)]}"/></td>
|
||||
</tr>
|
||||
</xpath>
|
||||
</field>
|
||||
|
|
Loading…
Reference in New Issue