change propietary cross-propietary
This commit is contained in:
parent
4df3df99aa
commit
6274e72221
@ -16,6 +16,7 @@ def register():
|
|||||||
equipment.EquipmentMaintenance,
|
equipment.EquipmentMaintenance,
|
||||||
equipment.EquipmentParty,
|
equipment.EquipmentParty,
|
||||||
equipment.ChangePropietary,
|
equipment.ChangePropietary,
|
||||||
|
equipment.ChangeEquipment,
|
||||||
configuration_equipment.Configuration,
|
configuration_equipment.Configuration,
|
||||||
maintenance.Calibration,
|
maintenance.Calibration,
|
||||||
maintenance.CreateContractInitial,
|
maintenance.CreateContractInitial,
|
||||||
|
12
equipment.py
12
equipment.py
@ -324,7 +324,9 @@ class ChangePropietary(ModelView):
|
|||||||
'Change of Propietary Equipment'
|
'Change of Propietary Equipment'
|
||||||
__name__ = 'optical_equipment.change_propietary.form'
|
__name__ = 'optical_equipment.change_propietary.form'
|
||||||
|
|
||||||
equipment = fields.Many2One('optical_equipment.equipment', "Equipment")
|
old_propietary = fields.Many2One('party.party', 'Old Propietary')
|
||||||
|
equipments = fields.Many2Many('optical_equipment.equipment-change_propietary.form', 'equipment', 'change', "Equipments")
|
||||||
|
#equipment = fields.Many2One('optical_equipment.equipment', "Equipment")
|
||||||
new_propietary = fields.Many2One('party.party', "New Propietary")
|
new_propietary = fields.Many2One('party.party', "New Propietary")
|
||||||
new_address = fields.Many2One('party.address', "New Address", required=True,
|
new_address = fields.Many2One('party.address', "New Address", required=True,
|
||||||
domain=[('party', '=', Eval('new_propietary'))],)
|
domain=[('party', '=', Eval('new_propietary'))],)
|
||||||
@ -358,3 +360,11 @@ class NewPropietary(Wizard):
|
|||||||
equipment.propietary_address = new_address
|
equipment.propietary_address = new_address
|
||||||
equipment.maintenance_frequency = "6" if new_propietary.client_type == 'ips' else "12"
|
equipment.maintenance_frequency = "6" if new_propietary.client_type == 'ips' else "12"
|
||||||
equipment.save()
|
equipment.save()
|
||||||
|
|
||||||
|
|
||||||
|
class ChangeEquipment(ModelSQL):
|
||||||
|
'Change Equipment'
|
||||||
|
__name__ = 'optical_equipment.equipment-change_propietary.form'
|
||||||
|
|
||||||
|
equipment = fields.Many2One('optical_equipment.equipment', 'Equipment')
|
||||||
|
change = fields.Many2One('optical_equipment.change_propietary.form', 'Change')
|
||||||
|
@ -2,8 +2,10 @@
|
|||||||
<!-- This file is part of Tryton. The COPYRIGHT file at the top level
|
<!-- This file is part of Tryton. The COPYRIGHT file at the top level
|
||||||
this repository contains the full copyright notices and license terms. -->
|
this repository contains the full copyright notices and license terms. -->
|
||||||
<form>
|
<form>
|
||||||
<label name="equipment"/>
|
<label name="old_propietary"/>
|
||||||
<field name="equipment" colspan="3"/>
|
<field name="old_propietary"/>
|
||||||
|
<label name="equipments"/>
|
||||||
|
<field name="equipments" colspan="3"/>
|
||||||
<label name="new_propietary"/>
|
<label name="new_propietary"/>
|
||||||
<field name="new_propietary" colspan="3"/>
|
<field name="new_propietary" colspan="3"/>
|
||||||
<label name="new_address"/>
|
<label name="new_address"/>
|
||||||
|
Loading…
Reference in New Issue
Block a user