add category to campaign
This commit is contained in:
parent
bd3bc1eb44
commit
98f109f687
|
@ -58,6 +58,10 @@ class Campaign(ModelSQL, ModelView):
|
|||
'campaing', 'product', 'Products')
|
||||
parties = fields.Many2Many('sale.opportunity.campaign-party.party',
|
||||
'campaing', 'party', 'Parties')
|
||||
category = fields.Many2One('sale.opportunity.category',
|
||||
'Category')
|
||||
|
||||
|
||||
|
||||
@classmethod
|
||||
def __setup__(cls):
|
||||
|
@ -127,6 +131,7 @@ class Campaign(ModelSQL, ModelView):
|
|||
opportunity.campaign = self.id
|
||||
opportunity.description = self.rec_name
|
||||
opportunity.state = 'lead'
|
||||
opportunity.category = self.category.id
|
||||
return opportunity
|
||||
|
||||
|
||||
|
|
|
@ -2,5 +2,6 @@
|
|||
version=3.4.0
|
||||
depends:
|
||||
sale_opportunity
|
||||
sale_opportunity_category
|
||||
xml:
|
||||
opportunity.xml
|
||||
|
|
|
@ -11,6 +11,8 @@ contains the full copyright notices and license terms. -->
|
|||
<field name="start_date"/>
|
||||
<label name="end_date"/>
|
||||
<field name="end_date"/>
|
||||
<label name="category"/>
|
||||
<field name="category"/>
|
||||
<notebook>
|
||||
<page name="description">
|
||||
<field name="description" colspan="4"/>
|
||||
|
|
Loading…
Reference in New Issue