change name 'equipment_available' to 'equipment_create'

This commit is contained in:
sinergia 2022-07-04 11:37:57 -05:00
parent 8cc60e6540
commit 2f92c8f74b
2 changed files with 4 additions and 9 deletions

View File

@ -14,14 +14,14 @@ from trytond.transaction import Transaction
class Purchase(metaclass=PoolMeta): class Purchase(metaclass=PoolMeta):
__name__ = 'purchase.purchase' __name__ = 'purchase.purchase'
equipment_available = fields.Boolean("Equipments Availables", readonly=True) equipment_create = fields.Boolean("Equipments Creates", readonly=True)
@classmethod @classmethod
def __setup__(cls): def __setup__(cls):
super(Purchase, cls).__setup__() super(Purchase, cls).__setup__()
cls._buttons.update({ cls._buttons.update({
'create_equipments': { 'create_equipments': {
'invisible': If(Bool(Eval('equipment_available')), True)}, 'invisible': If(Bool(Eval('equipment_createx')), True)},
}) })
@classmethod @classmethod
@ -72,11 +72,6 @@ class Line(metaclass=PoolMeta):
refurbish = fields.Boolean("Refurbish") refurbish = fields.Boolean("Refurbish")
product_equipment = fields.Boolean("Product Equipment") product_equipment = fields.Boolean("Product Equipment")
"""
def default_origin_country(self):
if self.product:
return self.product.origin_country
"""
def on_change_product(self): def on_change_product(self):
if not self.product: if not self.product:

View File

@ -4,8 +4,8 @@
<xpath <xpath
expr="/form/notebook/page[@id='info']/separator[@name='comment']" expr="/form/notebook/page[@id='info']/separator[@name='comment']"
position="before"> position="before">
<label name="equipment_available"/> <label name="equipment_create"/>
<field name="equipment_available"/> <field name="equipment_create"/>
</xpath> </xpath>
<xpath expr="//button[@name='process']" position="after"> <xpath expr="//button[@name='process']" position="after">
<button name="create_equipments"/> <button name="create_equipments"/>