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. #This file is part product_purchase_sequence module for Tryton.
#The COPYRIGHT file at the top level of this repository contains #The COPYRIGHT file at the top level of this repository contains
#the full copyright notices and license terms. #the full copyright notices and license terms.
from trytond.pool import Pool from trytond.pool import Pool
from .product import * from .product import *
from .configuration import * from .configuration import *
def register(): def register():
Pool.register( Pool.register(
Configuration, ProductConfiguration,
ProductConfigurationCompany,
Product, Product,
module='product_purchase_sequence', type_='model') module='product_purchase_sequence', type_='model')

View file

@ -4,14 +4,24 @@
from trytond.model import fields from trytond.model import fields
from trytond.pool import PoolMeta from trytond.pool import PoolMeta
__all__ = ['Configuration'] __all__ = [
'ProductConfiguration',
'ProductConfigurationCompany',
]
__metaclass__ = PoolMeta __metaclass__ = PoolMeta
class Configuration: class ProductConfiguration:
__name__ = 'product.configuration' __name__ = 'product.configuration'
purchasable_sequence = fields.Property(fields.Many2One('ir.sequence', purchasable_sequence = fields.Function(fields.Many2One('ir.sequence', 'Purchasable Sequence',
'Purchasable Sequence', domain=[ domain=[
('code', '=', 'product.product'), ('code', '=', 'product.product'),
], required=True)) ]),'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" msgid "Purchasable Sequence"
msgstr "Sequència productes de compra" 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" msgctxt "model:ir.sequence,name:sequence_product_purchasable"
msgid "Product Purchasable" msgid "Product Purchasable"
msgstr "Producte de compra" msgstr "Producte de compra"

View file

@ -12,6 +12,10 @@ msgctxt "field:product.configuration,purchasable_sequence:"
msgid "Purchasable Sequence" msgid "Purchasable Sequence"
msgstr "Secuencia productos de compra" 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" msgctxt "model:ir.sequence,name:sequence_product_purchasable"
msgid "Product Purchasable" msgid "Product Purchasable"
msgstr "Producto de compra" 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,5 +1,5 @@
<?xml version="1.0"?> <?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. --> The COPYRIGHT file at the top level of this repository contains the full copyright notices and license terms. -->
<data> <data>
<xpath expr="/form" position="inside"> <xpath expr="/form" position="inside">