[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"
|
||||
],
|
||||
'demo_xml': [],
|
||||
"css" : [
|
||||
"static/src/css/account_analytic.css",
|
||||
],
|
||||
# "css" : [
|
||||
# "static/src/css/account_analytic.css",
|
||||
# ],
|
||||
'installable': True,
|
||||
'auto_install': False,
|
||||
'certificate': '0042927202589',
|
||||
|
|
|
@ -23,23 +23,14 @@
|
|||
<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'}"/>
|
||||
</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 expr='//field[@name="date"]' position="after" version="7.0">
|
||||
<field name="quantity_max" class="oe_form_inline"/> / Remaining
|
||||
<field name="remaining_hours" class="oe_form_inline"/>
|
||||
</xpath>
|
||||
<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"/>
|
||||
<xpath expr='//group[@name="toinvoice"]' position='replace'>
|
||||
<group name="toinvoice" string="Invoicing" colspan="4">
|
||||
<div class="oe_field_label" />
|
||||
<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">Invoiced</div>
|
||||
<div class="oe_field_label_bold">Remaining</div>
|
||||
|
@ -48,9 +39,7 @@
|
|||
<div class="oe_btn_width"/>
|
||||
</group>
|
||||
|
||||
<!-- center -->
|
||||
<!--<group class="oe_group">-->
|
||||
<field class="oe_field_label" name="fix_price_invoices" />
|
||||
- <field class="oe_field_label" name="fix_price_invoices" />
|
||||
<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="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>
|
||||
</group>
|
||||
|
||||
<!-- footer -->
|
||||
|
||||
<div name="total" class="oe_field_label" colspan="2">Total </div>
|
||||
<group colspan="4" col="6" >
|
||||
|
@ -81,7 +69,8 @@
|
|||
<div class="oe_btn_width_small"/>
|
||||
<div class="oe_btn_width"/>
|
||||
</group>
|
||||
<!--</group>-->
|
||||
<field name="pricelist_id" attrs="{'invisible': [('invoice_on_timesheets','=',False)]}"/>
|
||||
<field name="to_invoice" attrs="{'invisible': [('invoice_on_timesheets','=',False)]}"/>
|
||||
</group>
|
||||
</xpath>
|
||||
</field>
|
||||
|
|
|
@ -19,17 +19,16 @@
|
|||
<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">
|
||||
<group col="4" colspan="4">
|
||||
<group colspan="2" col= "2" name="contract" class="oe_form_group_label_border">
|
||||
<separator colspan="2" string="Validity"/>
|
||||
<page string="Contract Information" name="contract_page" attrs="{'invisible':[('type','=','view')]}">
|
||||
<group>
|
||||
<group string="Validity" name="contract">
|
||||
<field name="date_start"/>
|
||||
<field name="date"/>
|
||||
</group>
|
||||
<group colspan="2" col="2" name="project" class="oe_form_group_label_border">
|
||||
<separator colspan="2" string="Project" name="project_sep" invisible="1"/>
|
||||
<group name="project">
|
||||
<separator colspan="2" string="Project Management" name="project_sep" invisible="1"/>
|
||||
</group>
|
||||
<group class="oe_form_group_label_border" name="toinvoice" colspan="4" col="4"></group>
|
||||
<group name="toinvoice"></group>
|
||||
</group>
|
||||
<separator string="Terms and Conditions" colspan="4" name="description"/>
|
||||
<field colspan="4" name="description" nolabel="1"/>
|
||||
|
|
|
@ -86,11 +86,11 @@
|
|||
<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="contract"]' position='after'>
|
||||
<group colspan="2" col="2" name="project" class="oe_form_group_label_border">
|
||||
<separator colspan="2" string="Project" name="project_sep"/>
|
||||
<field name="use_timesheets" />
|
||||
</group>
|
||||
<xpath expr='//separator[@name="project_sep"]' position='replace'>
|
||||
<separator name="project_sep" string="Project Management" colspan="4"/> <!-- removal of invisible attribute -->
|
||||
</xpath>
|
||||
<xpath expr='//separator[@name="project_sep"]' position='after'>
|
||||
<field name="use_timesheets"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
|
|
@ -77,7 +77,14 @@ class account_analytic_account(osv.osv):
|
|||
_defaults = {
|
||||
'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)
|
||||
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
|
||||
|
|
|
@ -5,12 +5,16 @@
|
|||
<field name="name">account.analytic.account.invoice.form</field>
|
||||
<field name="model">account.analytic.account</field>
|
||||
<field name="type">form</field>
|
||||
<field name="priority">30</field>
|
||||
<field name="inherit_id" ref="analytic.view_account_analytic_account_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr='//group[@name="toinvoice"]' position='inside'>
|
||||
<field name="pricelist_id" />
|
||||
<field name="to_invoice" widget="selection" />
|
||||
<field name="to_invoice" widget="selection"/>
|
||||
</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'>
|
||||
<header>
|
||||
<button name="set_pending" string="Pending" type="object" states="open"/>
|
||||
|
|
|
@ -236,6 +236,7 @@ class project(osv.osv):
|
|||
_order = "sequence"
|
||||
_defaults = {
|
||||
'active': True,
|
||||
'type': 'contract',
|
||||
'state': 'open',
|
||||
'priority': 1,
|
||||
'sequence': 10,
|
||||
|
|
|
@ -53,12 +53,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 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 name="use_attachment_row">
|
||||
<th/>
|
||||
<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>
|
||||
</table>
|
||||
</group>
|
||||
|
@ -636,9 +636,9 @@
|
|||
<field eval="18" name="priority"/>
|
||||
<field name="arch" type="xml">
|
||||
<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='//group[@name="project"]' position='inside'>
|
||||
<xpath expr='//separator[@name="project_sep"]' position='after'>
|
||||
<field name="use_tasks" />
|
||||
</xpath>
|
||||
</field>
|
||||
|
|
|
@ -387,11 +387,11 @@
|
|||
<field eval="18" name="priority"/>
|
||||
<field name="arch" type="xml">
|
||||
<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>
|
||||
<group name="project" position="inside">
|
||||
<field name="use_issues"/>
|
||||
</group>
|
||||
</field>
|
||||
</record>
|
||||
</data>
|
||||
|
|
|
@ -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 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>
|
||||
</xpath>
|
||||
</field>
|
||||
|
|
Loading…
Reference in New Issue