add category to campaign

This commit is contained in:
?ngel ?lvarez 2014-12-11 16:24:13 +01:00
parent bd3bc1eb44
commit 98f109f687
3 changed files with 8 additions and 0 deletions

View File

@ -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

View File

@ -2,5 +2,6 @@
version=3.4.0
depends:
sale_opportunity
sale_opportunity_category
xml:
opportunity.xml

View File

@ -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"/>