[IMP]: partner_infotab: Renamed partner_crm to partner_infotab, Made relation with timesheet lines and partner

bzr revid: rpa@tinyerp.com-20100512140535-cu62e5qzbiy1vvyp
This commit is contained in:
rpa (Open ERP) 2010-05-12 19:35:35 +05:30
parent ac53d556db
commit 78000800c3
6 changed files with 18 additions and 15 deletions

View File

@ -43,7 +43,8 @@ class hr_analytic_timesheet(osv.osv):
_inherits = {'account.analytic.line': 'line_id'}
_order = "id desc"
_columns = {
'line_id' : fields.many2one('account.analytic.line', 'Analytic line', ondelete='cascade'),
'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={}):

View File

@ -19,7 +19,7 @@
#
##############################################################################
import partner_crm
import partner_infotab
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -21,7 +21,7 @@
{
'name': 'Detailed info on partner form',
'name': 'Detailed information on partner form',
'version': '1.0',
'category': 'Generic Modules/Base',
'description': """
@ -44,7 +44,7 @@ It adds the following fields on the partner form:
'init_xml': [],
'update_xml': [
'security/ir.model.access.csv',
'partner_crm_view.xml'
'partner_infotab_view.xml'
],
'demo_xml': [],
'installable': True,

View File

@ -33,6 +33,8 @@ 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()

View File

@ -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">
<field name="opportunity_ids" colspan="4" nolabel="1" />
<field name="meeting_ids" colspan="4" nolabel="1" />
<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>