Register Product and define principal property

issue5087
This commit is contained in:
Cédric Krier committed 2016-01-02 10:26:12 +01:00
1 parent a29cdf05a7
commit 95daa34f62
2 files changed
+10 -1

No files matched your search

+1
View File
@@ -21,6 +21,7 @@ def register():
SaleLine,
Template,
Template_Agent,
Product,
module='commission', type_='model')
Pool.register(
CreateInvoice,
+9 -1
View File
@@ -6,7 +6,7 @@ from trytond.pool import PoolMeta
from trytond.model import ModelSQL, fields
__all__ = ['Template', 'Template_Agent']
__all__ = ['Template', 'Template_Agent', 'Product']
__metaclass__ = PoolMeta
@@ -34,3 +34,11 @@ class Template_Agent(ModelSQL):
domain=[
('type_', '=', 'principal'),
])
class Product:
__name__ = 'product.product'
@property
def principal(self):
return self.template.principal