[IMP]: partner_crm hr_timesheet: Task -225 Improvement in partner_crm module
bzr revid: ksa@tinyerp.co.in-20100506122954-leluf2cvydnl27eu
This commit is contained in:
parent
d5ae9ca15a
commit
6df236b561
|
@ -44,6 +44,7 @@ class hr_analytic_timesheet(osv.osv):
|
|||
_order = "id desc"
|
||||
_columns = {
|
||||
'line_id' : fields.many2one('account.analytic.line', 'Analytic line', ondelete='cascade'),
|
||||
'partner_id': fields.related('account_id', 'partner_id', type='many2one', string='Partner Id',relation='account.analytic.account',store=True),
|
||||
}
|
||||
|
||||
def unlink(self, cr, uid, ids, context={}):
|
||||
|
@ -56,8 +57,7 @@ class hr_analytic_timesheet(osv.osv):
|
|||
|
||||
def on_change_unit_amount(self, cr, uid, id, prod_id, unit_amount, unit, context={}):
|
||||
res = {}
|
||||
# if prod_id and unit_amount:
|
||||
if prod_id:
|
||||
if prod_id and unit_amount:
|
||||
# find company
|
||||
company_id=self.pool.get('res.company')._company_default_get(cr, uid, 'account.analytic.line', context)
|
||||
res = self.pool.get('account.analytic.line').on_change_unit_amount(cr, uid, id, prod_id, unit_amount,company_id,unit, context)
|
||||
|
|
|
@ -33,6 +33,9 @@ class res_partner(osv.osv):
|
|||
'invoice_ids': fields.one2many('account.invoice.line', 'partner_id', 'Invoices'),
|
||||
'contract_ids': fields.one2many('account.analytic.account', \
|
||||
'partner_id', 'Contracts'),
|
||||
'account_line_ids': fields.one2many('hr.analytic.timesheet', \
|
||||
'partner_id', 'Anaylitic account lines '),
|
||||
|
||||
}
|
||||
|
||||
res_partner()
|
||||
|
|
|
@ -11,19 +11,19 @@
|
|||
<field name="inherit_id" ref="base.view_partner_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<notebook position="inside">
|
||||
<page string="Other Info">
|
||||
<group col="2" colspan="4">
|
||||
<page string="CRM Info">
|
||||
<field name="opportunity_ids" colspan="4" nolabel="1" />
|
||||
<field name="meeting_ids" colspan="4" nolabel="1" />
|
||||
<field name="phonecall_ids" colspan="4" nolabel="1" />
|
||||
</group>
|
||||
<group col="2" colspan="4">
|
||||
<field name="invoice_ids" colspan="4" nolabel="1" context="{'group_by':'product_id'}"/>
|
||||
</group>
|
||||
<group col="2" colspan="4">
|
||||
<field name="contract_ids" colspan="4" nolabel="1" />
|
||||
</group>
|
||||
</page>
|
||||
|
||||
<page string="Other Info">
|
||||
<field name="invoice_ids" colspan="4" nolabel="1" context="{'group_by':'product_id'}"/>
|
||||
<field name="contract_ids" colspan="4" nolabel="1"/>
|
||||
<field name="account_line_ids" colspan="4" nolabel="1" context="{'group_by':'date'}"/>
|
||||
|
||||
</page>
|
||||
|
||||
</notebook>
|
||||
</field>
|
||||
</record>
|
||||
|
|
Loading…
Reference in New Issue