[IMP] contract management: misc improvements
bzr revid: qdp-launchpad@openerp.com-20120615081254-rhh9nwmz3bqn7e9d
This commit is contained in:
parent
3fbff8ae21
commit
66c3093fee
|
@ -45,9 +45,9 @@ user-wise as well as month wise.
|
||||||
"account_analytic_analysis_report.xml"
|
"account_analytic_analysis_report.xml"
|
||||||
],
|
],
|
||||||
'demo_xml': [],
|
'demo_xml': [],
|
||||||
"css" : [
|
# "css" : [
|
||||||
"static/src/css/account_analytic.css",
|
# "static/src/css/account_analytic.css",
|
||||||
],
|
# ],
|
||||||
'installable': True,
|
'installable': True,
|
||||||
'auto_install': False,
|
'auto_install': False,
|
||||||
'certificate': '0042927202589',
|
'certificate': '0042927202589',
|
||||||
|
|
|
@ -23,23 +23,14 @@
|
||||||
<xpath expr='//field[@name="type"]' position='after'>
|
<xpath expr='//field[@name="type"]' position='after'>
|
||||||
<field name="template_id" on_change="on_change_template(template_id,context)" domain="[('type','=','template')]" attrs="{'invisible': [('type','in',['view', 'normal','template'])]}" context="{'default_type' : 'template'}"/>
|
<field name="template_id" on_change="on_change_template(template_id,context)" domain="[('type','=','template')]" attrs="{'invisible': [('type','in',['view', 'normal','template'])]}" context="{'default_type' : 'template'}"/>
|
||||||
</xpath>
|
</xpath>
|
||||||
<xpath expr='//field[@name="date"]' position="after">
|
<xpath expr='//field[@name="date"]' position="after" version="7.0">
|
||||||
<group col="6" colspan="2" class="oe_form_group_label_border">
|
<field name="quantity_max" class="oe_form_inline"/> / Remaining
|
||||||
<field name="quantity_max"/><label string="/"/> <label string="Remaining"/> <field name="remaining_hours" nolabel="1"/>
|
<field name="remaining_hours" class="oe_form_inline"/>
|
||||||
</group>
|
|
||||||
</xpath>
|
</xpath>
|
||||||
<xpath expr='//group[@name="toinvoice"]' position='replace'>
|
<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)]}">
|
<group name="toinvoice" string="Invoicing" colspan="4">
|
||||||
<field name="pricelist_id"/>
|
<div class="oe_field_label" />
|
||||||
<field name="to_invoice"/>
|
|
||||||
</group>
|
|
||||||
</xpath>
|
|
||||||
<xpath expr='//group[@name="toinvoice"]' position='before'>
|
|
||||||
<separator colspan="4" string="Invoicing" name="invoicing"/>
|
|
||||||
<group colspan="4" col="6">
|
<group colspan="4" col="6">
|
||||||
<!-- header -->
|
|
||||||
<div class="oe_field_label" colspan="2"/>
|
|
||||||
<group colspan="4" col="6">
|
|
||||||
<div class="oe_field_label_bold">Est.Tot</div>
|
<div class="oe_field_label_bold">Est.Tot</div>
|
||||||
<div class="oe_field_label_bold">Invoiced</div>
|
<div class="oe_field_label_bold">Invoiced</div>
|
||||||
<div class="oe_field_label_bold">Remaining</div>
|
<div class="oe_field_label_bold">Remaining</div>
|
||||||
|
@ -48,9 +39,7 @@
|
||||||
<div class="oe_btn_width"/>
|
<div class="oe_btn_width"/>
|
||||||
</group>
|
</group>
|
||||||
|
|
||||||
<!-- center -->
|
- <field class="oe_field_label" name="fix_price_invoices" />
|
||||||
<!--<group class="oe_group">-->
|
|
||||||
<field class="oe_field_label" name="fix_price_invoices" />
|
|
||||||
<group colspan="4" col="6" attrs="{'invisible': [('fix_price_invoices','=',False)]}">
|
<group colspan="4" col="6" attrs="{'invisible': [('fix_price_invoices','=',False)]}">
|
||||||
<field class="oe_float_field" name="amount_max" nolabel="1" />
|
<field class="oe_float_field" name="amount_max" nolabel="1" />
|
||||||
<field class="oe_float_field" name="ca_invoiced" nolabel="1" />
|
<field class="oe_float_field" name="ca_invoiced" nolabel="1" />
|
||||||
|
@ -70,7 +59,6 @@
|
||||||
<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>
|
<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>
|
||||||
</group>
|
</group>
|
||||||
|
|
||||||
<!-- footer -->
|
|
||||||
|
|
||||||
<div name="total" class="oe_field_label" colspan="2">Total </div>
|
<div name="total" class="oe_field_label" colspan="2">Total </div>
|
||||||
<group colspan="4" col="6" >
|
<group colspan="4" col="6" >
|
||||||
|
@ -81,7 +69,8 @@
|
||||||
<div class="oe_btn_width_small"/>
|
<div class="oe_btn_width_small"/>
|
||||||
<div class="oe_btn_width"/>
|
<div class="oe_btn_width"/>
|
||||||
</group>
|
</group>
|
||||||
<!--</group>-->
|
<field name="pricelist_id" attrs="{'invisible': [('invoice_on_timesheets','=',False)]}"/>
|
||||||
|
<field name="to_invoice" attrs="{'invisible': [('invoice_on_timesheets','=',False)]}"/>
|
||||||
</group>
|
</group>
|
||||||
</xpath>
|
</xpath>
|
||||||
</field>
|
</field>
|
||||||
|
|
|
@ -19,17 +19,16 @@
|
||||||
<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">
|
<page string="Contract Information" name="contract_page" attrs="{'invisible':[('type','=','view')]}">
|
||||||
<group col="4" colspan="4">
|
<group>
|
||||||
<group colspan="2" col= "2" name="contract" class="oe_form_group_label_border">
|
<group string="Validity" name="contract">
|
||||||
<separator colspan="2" string="Validity"/>
|
|
||||||
<field name="date_start"/>
|
<field name="date_start"/>
|
||||||
<field name="date"/>
|
<field name="date"/>
|
||||||
</group>
|
</group>
|
||||||
<group colspan="2" col="2" name="project" class="oe_form_group_label_border">
|
<group name="project">
|
||||||
<separator colspan="2" string="Project" name="project_sep" invisible="1"/>
|
<separator colspan="2" string="Project Management" name="project_sep" invisible="1"/>
|
||||||
</group>
|
</group>
|
||||||
<group class="oe_form_group_label_border" name="toinvoice" colspan="4" col="4"></group>
|
<group name="toinvoice"></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"/>
|
||||||
|
|
|
@ -86,11 +86,11 @@
|
||||||
<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="contract"]' position='after'>
|
<xpath expr='//separator[@name="project_sep"]' position='replace'>
|
||||||
<group colspan="2" col="2" name="project" class="oe_form_group_label_border">
|
<separator name="project_sep" string="Project Management" colspan="4"/> <!-- removal of invisible attribute -->
|
||||||
<separator colspan="2" string="Project" name="project_sep"/>
|
</xpath>
|
||||||
<field name="use_timesheets" />
|
<xpath expr='//separator[@name="project_sep"]' position='after'>
|
||||||
</group>
|
<field name="use_timesheets"/>
|
||||||
</xpath>
|
</xpath>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
|
@ -77,7 +77,14 @@ class account_analytic_account(osv.osv):
|
||||||
_defaults = {
|
_defaults = {
|
||||||
'pricelist_id': lambda self, cr, uid, ctx: ctx.get('pricelist_id', False),
|
'pricelist_id': lambda self, cr, uid, ctx: ctx.get('pricelist_id', False),
|
||||||
}
|
}
|
||||||
def on_change_partner_id(self, cr, uid, ids,partner_id, name, context={}):
|
|
||||||
|
def on_change_use_timesheets(self, cr, uid, ids, use_timesheets, context=None):
|
||||||
|
res = {'value': {}}
|
||||||
|
if use_timesheets:
|
||||||
|
ir_model_obj = self.pool.get('ir.model.data')
|
||||||
|
res['value']['to_invoice'] = ir_model_obj.get_reference(cr, uid, 'hr_timesheet_invoice', 'timesheet_invoice_factor1')[1]
|
||||||
|
return res
|
||||||
|
def on_change_partner_id(self, cr, uid, ids,partner_id, name, context=None):
|
||||||
res = super(account_analytic_account,self).on_change_partner_id(cr, uid, ids,partner_id, name, context=context)
|
res = super(account_analytic_account,self).on_change_partner_id(cr, uid, ids,partner_id, name, context=context)
|
||||||
part = self.pool.get('res.partner').browse(cr, uid, partner_id,context=context)
|
part = self.pool.get('res.partner').browse(cr, uid, partner_id,context=context)
|
||||||
pricelist = part.property_product_pricelist and part.property_product_pricelist.id or False
|
pricelist = part.property_product_pricelist and part.property_product_pricelist.id or False
|
||||||
|
|
|
@ -5,12 +5,16 @@
|
||||||
<field name="name">account.analytic.account.invoice.form</field>
|
<field name="name">account.analytic.account.invoice.form</field>
|
||||||
<field name="model">account.analytic.account</field>
|
<field name="model">account.analytic.account</field>
|
||||||
<field name="type">form</field>
|
<field name="type">form</field>
|
||||||
|
<field name="priority">30</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" />
|
<field name="pricelist_id" />
|
||||||
<field name="to_invoice" widget="selection" />
|
<field name="to_invoice" widget="selection"/>
|
||||||
</xpath>
|
</xpath>
|
||||||
|
<xpath expr="//field[@name='use_timesheets']" position="replace">
|
||||||
|
<field name="use_timesheets" on_change="on_change_use_timesheets(use_timesheets, context)" string="USE TIMESHEETS blablabla"/>
|
||||||
|
</xpath>
|
||||||
<xpath expr="/form/sheet" position='before'>
|
<xpath expr="/form/sheet" position='before'>
|
||||||
<header>
|
<header>
|
||||||
<button name="set_pending" string="Pending" type="object" states="open"/>
|
<button name="set_pending" string="Pending" type="object" states="open"/>
|
||||||
|
|
|
@ -236,6 +236,7 @@ class project(osv.osv):
|
||||||
_order = "sequence"
|
_order = "sequence"
|
||||||
_defaults = {
|
_defaults = {
|
||||||
'active': True,
|
'active': True,
|
||||||
|
'type': 'contract',
|
||||||
'state': 'open',
|
'state': 'open',
|
||||||
'priority': 1,
|
'priority': 1,
|
||||||
'sequence': 10,
|
'sequence': 10,
|
||||||
|
|
|
@ -53,12 +53,12 @@
|
||||||
<tr name="use_tasks_row">
|
<tr name="use_tasks_row">
|
||||||
<th style="border-right:1px solid #DDD;" width="140px">Tasks Management</th>
|
<th style="border-right:1px solid #DDD;" width="140px">Tasks Management</th>
|
||||||
<td><field name="use_tasks" nolabel="1"/></td>
|
<td><field name="use_tasks" nolabel="1"/></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>
|
<td style="text-align:right;" width="110px"><button icon="terp-gtk-go-back-rtl" 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>
|
||||||
<tr name="use_attachment_row">
|
<tr name="use_attachment_row">
|
||||||
<th/>
|
<th/>
|
||||||
<td/>
|
<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>
|
<td style="text-align:right;" width="110px"><button icon="terp-gtk-go-back-rtl" class="oe_btn_width" name="%(base.action_attachment)d" string="Documents" type="action" /></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</group>
|
</group>
|
||||||
|
@ -636,9 +636,9 @@
|
||||||
<field eval="18" name="priority"/>
|
<field eval="18" name="priority"/>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<xpath expr='//separator[@name="project_sep"]' position='replace'>
|
<xpath expr='//separator[@name="project_sep"]' position='replace'>
|
||||||
<separator colspan="2" string="Project" name="project_sep"/>
|
<separator colspan="2" string="Project Management" name="project_sep"/> <!-- removal of invisible attribute -->
|
||||||
</xpath>
|
</xpath>
|
||||||
<xpath expr='//group[@name="project"]' position='inside'>
|
<xpath expr='//separator[@name="project_sep"]' position='after'>
|
||||||
<field name="use_tasks" />
|
<field name="use_tasks" />
|
||||||
</xpath>
|
</xpath>
|
||||||
</field>
|
</field>
|
||||||
|
|
|
@ -387,11 +387,11 @@
|
||||||
<field eval="18" name="priority"/>
|
<field eval="18" name="priority"/>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<xpath expr='//separator[@name="project_sep"]' position='replace'>
|
<xpath expr='//separator[@name="project_sep"]' position='replace'>
|
||||||
<separator colspan="2" string="Project" name="project_sep"/>
|
<separator colspan="2" string="Project Management" name="project_sep"/> <!-- removal of invisible attribute -->
|
||||||
|
</xpath>
|
||||||
|
<xpath expr='//separator[@name="project_sep"]' position='after'>
|
||||||
|
<field name="use_issuess" />
|
||||||
</xpath>
|
</xpath>
|
||||||
<group name="project" position="inside">
|
|
||||||
<field name="use_issues"/>
|
|
||||||
</group>
|
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
</data>
|
</data>
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
<tr name="use_timesheets_row">
|
<tr name="use_timesheets_row">
|
||||||
<th style="border-right:1px solid #DDD;" width="140px">Timesheets</th>
|
<th style="border-right:1px solid #DDD;" width="140px">Timesheets</th>
|
||||||
<td><field name="use_timesheets" nolabel="1"/></td>
|
<td><field name="use_timesheets" nolabel="1"/></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>
|
<td style="text-align:right;"><button icon="terp-gtk-go-back-rtl" class="oe_btn_width" name="open_timesheets" string="Timesheets" type="object" attrs="{'invisible':[('use_timesheets','=', 0)]}"/></td>
|
||||||
</tr>
|
</tr>
|
||||||
</xpath>
|
</xpath>
|
||||||
</field>
|
</field>
|
||||||
|
|
Loading…
Reference in New Issue