parent
6e1c612c40
commit
785963a596
|
@ -7,6 +7,7 @@ from . import action
|
|||
from . import translation
|
||||
from . import html
|
||||
from . import engine
|
||||
from . import product
|
||||
from . import invoice
|
||||
from . import production
|
||||
from . import purchase
|
||||
|
@ -30,6 +31,7 @@ def register():
|
|||
Pool.register_mixin(engine.HTMLReportMixin, Report,
|
||||
module=module)
|
||||
|
||||
product.register(module)
|
||||
invoice.register(module)
|
||||
production.register(module)
|
||||
purchase.register(module)
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
from trytond.pool import Pool
|
||||
from . import product
|
||||
|
||||
def register(module):
|
||||
Pool.register(
|
||||
product.Product,
|
||||
module=module, type_='model', depends=['product'])
|
|
@ -0,0 +1,12 @@
|
|||
from trytond.pool import PoolMeta
|
||||
from trytond.model import fields
|
||||
|
||||
|
||||
class Product(metaclass=PoolMeta):
|
||||
__name__ = 'product.product'
|
||||
|
||||
html_code = fields.Function(fields.Char(
|
||||
"HTML Code"), 'get_html_code')
|
||||
|
||||
def get_html_code(self, name):
|
||||
return self.code or ''
|
Loading…
Reference in New Issue