diff --git a/CHANGELOG b/CHANGELOG old mode 100644 new mode 100755 diff --git a/COPYRIGHT b/COPYRIGHT old mode 100644 new mode 100755 diff --git a/INSTALL b/INSTALL old mode 100644 new mode 100755 diff --git a/LICENSE b/LICENSE old mode 100644 new mode 100755 diff --git a/MANIFEST.in b/MANIFEST.in old mode 100644 new mode 100755 diff --git a/README b/README old mode 100644 new mode 100755 diff --git a/__init__.py b/__init__.py old mode 100644 new mode 100755 index ed1a014..5b999b9 --- a/__init__.py +++ b/__init__.py @@ -1,13 +1,14 @@ #This file is part product_purchase_sequence module for Tryton. #The COPYRIGHT file at the top level of this repository contains #the full copyright notices and license terms. + from trytond.pool import Pool from .product import * from .configuration import * - def register(): Pool.register( - Configuration, + ProductConfiguration, + ProductConfigurationCompany, Product, module='product_purchase_sequence', type_='model') diff --git a/configuration.py b/configuration.py index bb53627..deb596b 100644 --- a/configuration.py +++ b/configuration.py @@ -4,14 +4,24 @@ from trytond.model import fields from trytond.pool import PoolMeta -__all__ = ['Configuration'] +__all__ = [ + 'ProductConfiguration', + 'ProductConfigurationCompany', +] __metaclass__ = PoolMeta -class Configuration: +class ProductConfiguration: __name__ = 'product.configuration' - purchasable_sequence = fields.Property(fields.Many2One('ir.sequence', - 'Purchasable Sequence', domain=[ - ('code', '=', 'product.product'), - ], required=True)) + purchasable_sequence = fields.Function(fields.Many2One('ir.sequence', 'Purchasable Sequence', + domain=[ + ('code', '=', 'product.product'), + ]),'get_fields', setter='set_fields') + +class ProductConfigurationCompany: + __name__ = 'product.configuration.company' + purchasable_sequence = fields.Many2One('ir.sequence', 'Purchasable sequence', + domain=[ + ('code', '=', 'product.product'), + ]) diff --git a/doc/es/index.rst b/doc/es/index.rst old mode 100644 new mode 100755 diff --git a/doc/index.rst b/doc/index.rst old mode 100644 new mode 100755 diff --git a/locale/ca_ES.po b/locale/ca_ES.po index b66d551..fc96a2c 100644 --- a/locale/ca_ES.po +++ b/locale/ca_ES.po @@ -12,6 +12,10 @@ msgctxt "field:product.configuration,purchasable_sequence:" msgid "Purchasable Sequence" msgstr "Sequència productes de compra" +msgctxt "field:product.configuration.company,purchasable_sequence:" +msgid "Purchasable sequence" +msgstr "Sequència productes de compra" + msgctxt "model:ir.sequence,name:sequence_product_purchasable" msgid "Product Purchasable" msgstr "Producte de compra" diff --git a/locale/es_ES.po b/locale/es_ES.po index a18e649..5d5f59b 100644 --- a/locale/es_ES.po +++ b/locale/es_ES.po @@ -12,6 +12,10 @@ msgctxt "field:product.configuration,purchasable_sequence:" msgid "Purchasable Sequence" msgstr "Secuencia productos de compra" +msgctxt "field:product.configuration.company,purchasable_sequence:" +msgid "Purchasable sequence" +msgstr "Secuencia productos de compra" + msgctxt "model:ir.sequence,name:sequence_product_purchasable" msgid "Product Purchasable" msgstr "Producto de compra" diff --git a/setup.py b/setup.py old mode 100644 new mode 100755 diff --git a/tests/__init__.py b/tests/__init__.py old mode 100644 new mode 100755 diff --git a/tests/test_product_purchase_sequence.py b/tests/test_product_purchase_sequence.py old mode 100644 new mode 100755 diff --git a/view/product_configuration_form.xml b/view/product_configuration_form.xml index 37fb238..3a1a69b 100644 --- a/view/product_configuration_form.xml +++ b/view/product_configuration_form.xml @@ -1,9 +1,9 @@ - -