Revert product configuration simple class

This commit is contained in:
resteve 2014-02-20 18:29:05 +01:00
parent 1d4ef62c18
commit c6d10f0242
16 changed files with 30 additions and 11 deletions

0
CHANGELOG Normal file → Executable file
View file

0
COPYRIGHT Normal file → Executable file
View file

0
INSTALL Normal file → Executable file
View file

0
LICENSE Normal file → Executable file
View file

0
MANIFEST.in Normal file → Executable file
View file

0
README Normal file → Executable file
View file

5
__init__.py Normal file → Executable file
View file

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

View file

@ -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'),
])

0
doc/es/index.rst Normal file → Executable file
View file

0
doc/index.rst Normal file → Executable file
View file

View file

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

View file

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

0
setup.py Normal file → Executable file
View file

0
tests/__init__.py Normal file → Executable file
View file

0
tests/test_product_purchase_sequence.py Normal file → Executable file
View file

View file

@ -1,9 +1,9 @@
<?xml version="1.0"?>
<!-- This file is part product_purchase_sequence module for Tryton.
<!-- This file is part product_configuration module for Tryton.
The COPYRIGHT file at the top level of this repository contains the full copyright notices and license terms. -->
<data>
<xpath expr="/form" position="inside">
<label name="purchasable_sequence"/>
<field name="purchasable_sequence"/>
<label name="purchasable_sequence"/>
<field name="purchasable_sequence"/>
</xpath>
</data>