mirror of
https://github.com/NaN-tic/trytond-sale_opportunity_campaign-old.git
synced 2023-12-14 03:42:53 +01:00
add category to campaign
This commit is contained in:
parent
bd3bc1eb44
commit
98f109f687
|
@ -58,6 +58,10 @@ class Campaign(ModelSQL, ModelView):
|
||||||
'campaing', 'product', 'Products')
|
'campaing', 'product', 'Products')
|
||||||
parties = fields.Many2Many('sale.opportunity.campaign-party.party',
|
parties = fields.Many2Many('sale.opportunity.campaign-party.party',
|
||||||
'campaing', 'party', 'Parties')
|
'campaing', 'party', 'Parties')
|
||||||
|
category = fields.Many2One('sale.opportunity.category',
|
||||||
|
'Category')
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def __setup__(cls):
|
def __setup__(cls):
|
||||||
|
@ -127,6 +131,7 @@ class Campaign(ModelSQL, ModelView):
|
||||||
opportunity.campaign = self.id
|
opportunity.campaign = self.id
|
||||||
opportunity.description = self.rec_name
|
opportunity.description = self.rec_name
|
||||||
opportunity.state = 'lead'
|
opportunity.state = 'lead'
|
||||||
|
opportunity.category = self.category.id
|
||||||
return opportunity
|
return opportunity
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -2,5 +2,6 @@
|
||||||
version=3.4.0
|
version=3.4.0
|
||||||
depends:
|
depends:
|
||||||
sale_opportunity
|
sale_opportunity
|
||||||
|
sale_opportunity_category
|
||||||
xml:
|
xml:
|
||||||
opportunity.xml
|
opportunity.xml
|
||||||
|
|
|
@ -11,6 +11,8 @@ contains the full copyright notices and license terms. -->
|
||||||
<field name="start_date"/>
|
<field name="start_date"/>
|
||||||
<label name="end_date"/>
|
<label name="end_date"/>
|
||||||
<field name="end_date"/>
|
<field name="end_date"/>
|
||||||
|
<label name="category"/>
|
||||||
|
<field name="category"/>
|
||||||
<notebook>
|
<notebook>
|
||||||
<page name="description">
|
<page name="description">
|
||||||
<field name="description" colspan="4"/>
|
<field name="description" colspan="4"/>
|
||||||
|
|
Loading…
Reference in a new issue