traslate pending
This commit is contained in:
parent
61473998d2
commit
b19e096c94
28
locale/es.po
28
locale/es.po
@ -334,6 +334,34 @@ msgctxt "model:ir.sequence,name:sequence_equipment"
|
||||
msgid "Equipment"
|
||||
msgstr "Equipos"
|
||||
|
||||
msgctxt "field:purchase.line,product_equipment:"
|
||||
msgid "Product Equipment"
|
||||
msgstr "Es Equipo"
|
||||
|
||||
msgctxt "field:purchase.line,software_version:"
|
||||
msgid "Software version"
|
||||
msgstr "Versión Software"
|
||||
|
||||
msgctxt "field:purchase.line,refurbish:"
|
||||
msgid "Refurbish"
|
||||
msgstr "Restaurado"
|
||||
|
||||
msgctxt "view:purchase.line:"
|
||||
msgid "Equipment"
|
||||
msgstr "Equipo"
|
||||
|
||||
msgctxt "field:purchase.line,health_register:"
|
||||
msgid "Health Register"
|
||||
msgstr "Registro Invima"
|
||||
|
||||
msgctxt "field:sale.line,product_equipment:"
|
||||
msgid "Product Equipment"
|
||||
msgstr "Es Equipo"
|
||||
|
||||
msgctxt "field:sale.line,equipment:"
|
||||
msgid "Equipment"
|
||||
msgstr "Equipo"
|
||||
|
||||
|
||||
|
||||
msgctxt "field:sale.configuration,subscription_sequence:"
|
||||
|
@ -87,7 +87,7 @@ class Line(metaclass=PoolMeta):
|
||||
product_equipment = fields.Boolean("Product Equipment",
|
||||
states={'readonly': True})
|
||||
software_version = fields.Char("Software version")
|
||||
health_register = fields.Char("Registro Medico")
|
||||
health_register = fields.Char("Health Register")
|
||||
|
||||
|
||||
@classmethod
|
||||
|
9
sale.py
9
sale.py
@ -18,7 +18,6 @@ class Sale(metaclass=PoolMeta):
|
||||
'Sale'
|
||||
__name__ = 'sale.sale'
|
||||
|
||||
|
||||
@classmethod
|
||||
@ModelView.button
|
||||
@Workflow.transition('confirmed')
|
||||
@ -56,7 +55,8 @@ class SaleLine(metaclass=PoolMeta):
|
||||
product_equipment = fields.Boolean("Product Equipment")
|
||||
equipment = fields.Many2One('optical_equipment.equipment', "Equipment",
|
||||
domain=[('state', '=', 'registred'),
|
||||
('product','=', Eval('product'))],
|
||||
('product','=', Eval('product'))
|
||||
],
|
||||
states={'invisible': If(~Eval('product_equipment'), True)},)
|
||||
equipment_serial = fields.Char('Serial',states={'readonly': True,
|
||||
'invisible': If(~Eval('product_equipment'), True)},
|
||||
@ -74,10 +74,8 @@ class SaleLine(metaclass=PoolMeta):
|
||||
@fields.depends('product_equipment','equipment')
|
||||
def get_serial_equipment(self):
|
||||
if self.product_equipment:
|
||||
raise UserError(str(self.equipment.serial))
|
||||
return self.equipment.serial
|
||||
else:
|
||||
raise UserError(str(self.equipment.serial))
|
||||
return None
|
||||
|
||||
def on_change_with_unit_digits(self, name=None):
|
||||
@ -85,12 +83,13 @@ class SaleLine(metaclass=PoolMeta):
|
||||
return self.unit.digits
|
||||
return 2
|
||||
|
||||
@fields.depends('equipment', 'sale', '_parent_sale.shipment_address', methods=['on_change_product'])
|
||||
@fields.depends('equipment', 'sale', 'quantity', '_parent_sale.shipment_address', methods=['on_change_product'])
|
||||
def on_change_equipment(self):
|
||||
if self.equipment:
|
||||
self.product = self.equipment.product.id
|
||||
self.address_equipment = self.sale.shipment_address.id
|
||||
self.equipment_serial = self.equipment.serial
|
||||
self.quantity = 1
|
||||
self.on_change_product()
|
||||
else:
|
||||
self.address_equipment = None
|
||||
|
Loading…
Reference in New Issue
Block a user