[IMP]GOLEM Activity : product category accounts now required

This commit is contained in:
Fabien BOURGEOIS 2018-08-03 10:34:36 +02:00
parent 26d8e1c5f4
commit cf4a804038
2 changed files with 11 additions and 1 deletions

View File

@ -19,7 +19,7 @@
'name': 'GOLEM activities', 'name': 'GOLEM activities',
'summary': 'Extends Odoo products for multi-activity', 'summary': 'Extends Odoo products for multi-activity',
'description': 'Extends Odoo products for multi-activity', 'description': 'Extends Odoo products for multi-activity',
'version': '10.0.2.4.1', 'version': '10.0.2.5.0',
'category': 'GOLEM', 'category': 'GOLEM',
'author': 'Fabien Bourgeois, Michel Dessenne', 'author': 'Fabien Bourgeois, Michel Dessenne',
'license': 'AGPL-3', 'license': 'AGPL-3',

View File

@ -17,7 +17,9 @@
""" GOLEM activities related models """ """ GOLEM activities related models """
import logging
from odoo import models, fields, api, _ from odoo import models, fields, api, _
_LOGGER = logging.getLogger(__name__)
class GolemActivityType(models.Model): class GolemActivityType(models.Model):
""" GOLEM Activity Type """ """ GOLEM Activity Type """
@ -201,3 +203,11 @@ class ProductTemplate(models.Model):
type = fields.Selection(default='service') type = fields.Selection(default='service')
default_code = fields.Char(copy=True) default_code = fields.Char(copy=True)
categ_id = fields.Many2one(copy=True) categ_id = fields.Many2one(copy=True)
class ProductCategory(models.Model):
""" Product Category adaptations """
_inherit = 'product.category'
property_account_income_categ_id = fields.Many2one(required=True)
property_account_expense_categ_id = fields.Many2one(required=True)