add '.gitignore', rm model machine, add new fields
This commit is contained in:
parent
b0a60c7e3e
commit
f1371f19c4
@ -8,7 +8,6 @@ __all__ = ['register']
|
|||||||
def register():
|
def register():
|
||||||
Pool.register(
|
Pool.register(
|
||||||
product.Product,
|
product.Product,
|
||||||
machine.Machine,
|
|
||||||
module='optical_equipment', type_='model')
|
module='optical_equipment', type_='model')
|
||||||
Pool.register(
|
Pool.register(
|
||||||
module='optical_equipment', type_='wizard')
|
module='optical_equipment', type_='wizard')
|
||||||
|
39
machine.py
39
machine.py
@ -1,39 +0,0 @@
|
|||||||
from trytond.model import ModelView, ModelSql
|
|
||||||
from trytond.model import fields
|
|
||||||
from trytond.pyson import Eval
|
|
||||||
|
|
||||||
|
|
||||||
class Machine(ModelView, ModelSql):
|
|
||||||
'Machine'
|
|
||||||
|
|
||||||
__name__ = 'product.machine'
|
|
||||||
|
|
||||||
trade_mark = fields.Char("Trade Mark", size=None, required=True)
|
|
||||||
model = fields.Char("Model", size=None, required=True)
|
|
||||||
reference = fields.Char("Reference", size=None, required=True)
|
|
||||||
origin_country = fields.Char(
|
|
||||||
"Origin country", size=None, required=True)
|
|
||||||
software_version = fields.Char(
|
|
||||||
"Origin country", size=None, required=True)
|
|
||||||
useful_life = fields.Char(
|
|
||||||
"Useful life", size=None, required=True)
|
|
||||||
warranty = fields.Char(
|
|
||||||
"Warranty", size=None, required=True)
|
|
||||||
serial = fields.Char(
|
|
||||||
"Serial", size=None, required=True)
|
|
||||||
health_register = fields.Char(
|
|
||||||
"Serial", size=None, required=True)
|
|
||||||
|
|
||||||
class Properties(ModelView, ModelSql):
|
|
||||||
'Properties'
|
|
||||||
|
|
||||||
__name__ = 'product.machine.property'
|
|
||||||
|
|
||||||
"""Medidas del producto, Modúlo Tryton 'product_measurements'.
|
|
||||||
[Lenght, Height, Width].
|
|
||||||
|
|
||||||
Caracteristicas Técnicas, Modúlo Tryton 'product_attribute'.
|
|
||||||
aplica sobre la variante del producto."""
|
|
||||||
|
|
||||||
|
|
||||||
|
|
29
product.py
29
product.py
@ -4,13 +4,36 @@ from trytond.model import fields
|
|||||||
|
|
||||||
__all__ = [Product]
|
__all__ = [Product]
|
||||||
|
|
||||||
|
_RISK = [(None, '')]
|
||||||
|
_USE = [(None, '')]
|
||||||
|
_BIOMEDICAL_CLASS = [(None, '')]
|
||||||
|
_MAIN_TECNOLOGY = [(None, '')]
|
||||||
|
|
||||||
class Product(metaclass=PoolMeta):
|
class Product(metaclass=PoolMeta):
|
||||||
'Product'
|
'Product'
|
||||||
|
|
||||||
__name__ = 'product.template'
|
__name__ = 'product.template'
|
||||||
|
|
||||||
risk = fields.Char("Risk", size=None, required=True)
|
machine = fields.Boolean('It is machine')
|
||||||
use = fields.Char("Risk", size=None, required=True)
|
risk = fields.Selection(_RISK, 'Type risk')
|
||||||
main_tecnology = fields.Char("Risk", size=None, required=True)
|
use = fields.Selection(_USE, 'Use')
|
||||||
|
biomedical_class = fields.Selection(_BIOMEDICAL_CLASS, 'Biomedical Class')
|
||||||
|
main_tecnology = fields.Selection(_MAIN_TECNOLOGY, 'Main tecnology')
|
||||||
calibration = fields.Boolean("Apply calibration")
|
calibration = fields.Boolean("Apply calibration")
|
||||||
observation = fields.Text(size=None)
|
observation = fields.Text(size=None)
|
||||||
|
trade_mark = fields.Char("Trade Mark", size=None, required=True)
|
||||||
|
model = fields.Char("Model", size=None, required=True)
|
||||||
|
reference = fields.Char("Reference", size=None, required=True)
|
||||||
|
origin_country = fields.Char(
|
||||||
|
"Origin country", size=None, required=True)
|
||||||
|
software_version = fields.Char(
|
||||||
|
"Origin country", size=None, required=True)
|
||||||
|
useful_life = fields.Char(
|
||||||
|
"Useful life", size=None, required=True)
|
||||||
|
warranty = fields.Char(
|
||||||
|
"Warranty", size=None, required=True)
|
||||||
|
serial = fields.Char(
|
||||||
|
"Serial", size=None, required=True)
|
||||||
|
health_register = fields.Char(
|
||||||
|
"Serial", size=None, required=True)
|
||||||
|
refurbish = fields.Boolean('Refurbish')
|
||||||
|
Loading…
Reference in New Issue
Block a user