change in class 'Measurements' to 'Template'

This commit is contained in:
sinergia 2022-06-27 15:43:43 -05:00
parent 87639119e4
commit ff34a02dd5
4 changed files with 8 additions and 9 deletions

View File

@ -14,5 +14,5 @@ def register():
equipment.OpticalEquipment, equipment.OpticalEquipment,
subscription.Subscription, subscription.Subscription,
subscription.SubscriptionEquipment, subscription.SubscriptionEquipment,
measurements.Measurements, measurements.Template,
module='optical_equipment', type_='model') module='optical_equipment', type_='model')

View File

@ -8,4 +8,4 @@ class Address(metaclass=PoolMeta):
campus = fields.Boolean("Campus") campus = fields.Boolean("Campus")
party_related = fields.Many2One('party.party', "Party Related", party_related = fields.Many2One('party.party', "Party Related",
states ={ 'invisible': (Eval("campus"))}) states ={ 'invisible': (~Eval("campus"))})

View File

@ -1,10 +1,11 @@
# This file is part of Tryton. The COPYRIGHT file at the top level of # This file is part of Tryton. The COPYRIGHT file at the top level of
# this repository contains the full copyright notices and license terms. # this repository contains the full copyright notices and license terms.
from trytond.model import fields from trytond.model import fields
from trytond.pool import PoolMeta from trytond.pool import Pool, PoolMeta
from trytond.pyson import Id from trytond.pyson import Id
from trytond.exceptions import UserError
class Measurements(metaclass=PoolMeta): class Template(metaclass=PoolMeta):
__name__ = 'product.template' __name__ = 'product.template'
temperature = fields.Float("Temperature") temperature = fields.Float("Temperature")
@ -21,6 +22,3 @@ class Measurements(metaclass=PoolMeta):
voltageDC = fields.Float("Voltage DC") voltageDC = fields.Float("Voltage DC")
voltageDC_uom = fields.Many2One('product.uom', "Voltage DC UOM") voltageDC_uom = fields.Many2One('product.uom', "Voltage DC UOM")
#,domain = [('category', '=', Id('product', 'uom_cat_electrical_tension'))]) #,domain = [('category', '=', Id('product', 'uom_cat_electrical_tension'))])

View File

@ -2,7 +2,8 @@
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of <!-- This file is part of Tryton. The COPYRIGHT file at the top level of
this repository contains the full copyright notices and license terms. --> this repository contains the full copyright notices and license terms. -->
<data> <data>
<xpath expr="/form" position="inside"> <xpath expr="/form/field[@name='party_name']" position="after">
<newline/>
<label name="party_related"/> <label name="party_related"/>
<field name="party_related"/> <field name="party_related"/>
</xpath> </xpath>