create model maintenance_service
This commit is contained in:
parent
8cd2cf17bf
commit
9736b1baf3
@ -15,10 +15,13 @@ def register():
|
|||||||
equipment.EquipmentMaintenance,
|
equipment.EquipmentMaintenance,
|
||||||
configuration_equipment.Configuration,
|
configuration_equipment.Configuration,
|
||||||
maintenance.Maintenance,
|
maintenance.Maintenance,
|
||||||
|
maintenance.MaintenanceService,
|
||||||
maintenance.MaintenanceActivity,
|
maintenance.MaintenanceActivity,
|
||||||
maintenance.MaintenanceLine,
|
maintenance.MaintenanceLine,
|
||||||
move.Move,
|
move.Move,
|
||||||
move.ShipmentOut,
|
move.ShipmentOut,
|
||||||
|
sale.Sale,
|
||||||
|
sale.SaleLine,
|
||||||
subscription.Contract,
|
subscription.Contract,
|
||||||
subscription.Subscription,
|
subscription.Subscription,
|
||||||
subscription.CreateInitialContract,
|
subscription.CreateInitialContract,
|
||||||
|
@ -2,6 +2,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. -->
|
||||||
<tryton>
|
<tryton>
|
||||||
|
<record model="ir.ui.view" id="address_view_tree">
|
||||||
|
<field name="model">party.address</field>
|
||||||
|
<field name="inherit" ref="party.address_view_tree"/>
|
||||||
|
<field name="name">address_tree</field>
|
||||||
|
</record>
|
||||||
<record model="ir.ui.view" id="address_view_form">
|
<record model="ir.ui.view" id="address_view_form">
|
||||||
<field name="model">party.address</field>
|
<field name="model">party.address</field>
|
||||||
<field name="inherit" ref="party.address_view_form"/>
|
<field name="inherit" ref="party.address_view_form"/>
|
||||||
|
@ -392,6 +392,11 @@ msgctxt "field:sale.subscription.line,subscription_end_date:"
|
|||||||
msgid "Subscription End Date"
|
msgid "Subscription End Date"
|
||||||
msgstr "Fecha final del Contrato"
|
msgstr "Fecha final del Contrato"
|
||||||
|
|
||||||
|
msgctxt ""
|
||||||
|
"model:ir.action.act_window.domain,name:act_subscription_form_domain_closed"
|
||||||
|
msgid "Closed"
|
||||||
|
msgstr "Vencidas"
|
||||||
|
|
||||||
msgctxt "model:ir.ui.menu,name:menu_contracts"
|
msgctxt "model:ir.ui.menu,name:menu_contracts"
|
||||||
msgid "Contracts Management"
|
msgid "Contracts Management"
|
||||||
msgstr "Gestión de Contratos"
|
msgstr "Gestión de Contratos"
|
||||||
|
101
maintenance.py
101
maintenance.py
@ -4,6 +4,7 @@ from trytond.model import (
|
|||||||
Workflow, ModelSQL, ModelView, Unique, fields, sequence_ordered)
|
Workflow, ModelSQL, ModelView, Unique, fields, sequence_ordered)
|
||||||
from trytond.transaction import Transaction
|
from trytond.transaction import Transaction
|
||||||
from trytond.pyson import Eval, If, Id
|
from trytond.pyson import Eval, If, Id
|
||||||
|
from trytond.pool import Pool
|
||||||
import math as mt
|
import math as mt
|
||||||
import numpy as np
|
import numpy as np
|
||||||
|
|
||||||
@ -13,6 +14,8 @@ class Maintenance(Workflow, ModelSQL, ModelView):
|
|||||||
__name__ = 'optical_equipment.maintenance'
|
__name__ = 'optical_equipment.maintenance'
|
||||||
|
|
||||||
|
|
||||||
|
service_maintenance = fields.Many2One('optical_equipment.maintenance.service', "Maintenance Service",
|
||||||
|
ondelete='CASCADE', select=True)
|
||||||
code = fields.Char(
|
code = fields.Char(
|
||||||
"Code", select=True,states={'readonly': True })
|
"Code", select=True,states={'readonly': True })
|
||||||
|
|
||||||
@ -69,10 +72,9 @@ class Maintenance(Workflow, ModelSQL, ModelView):
|
|||||||
('in_progress', 'finished')
|
('in_progress', 'finished')
|
||||||
})
|
})
|
||||||
cls._buttons.update({
|
cls._buttons.update({
|
||||||
'draft': {},
|
'agended': {'invisible': Eval('state').in_(['agended', 'in_progress', 'finished'])},
|
||||||
'agended': {},
|
'in_progress': {'invisible': Eval('state').in_(['draft', 'in_progress', 'finished'])},
|
||||||
'in_progress': {},
|
'finished': {'invisible': Eval('state').in_(['draft', 'agended', 'finished'])},
|
||||||
'finished': {},
|
|
||||||
})
|
})
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
@ -91,11 +93,6 @@ class Maintenance(Workflow, ModelSQL, ModelView):
|
|||||||
def default_state_agended(cls):
|
def default_state_agended(cls):
|
||||||
return 'no_agenda'
|
return 'no_agenda'
|
||||||
|
|
||||||
@classmethod
|
|
||||||
@ModelView.button
|
|
||||||
@Workflow.transition('draft')
|
|
||||||
def draft(cls, maintenances):
|
|
||||||
pass
|
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
@ModelView.button
|
@ModelView.button
|
||||||
@ -106,7 +103,7 @@ class Maintenance(Workflow, ModelSQL, ModelView):
|
|||||||
@classmethod
|
@classmethod
|
||||||
@ModelView.button
|
@ModelView.button
|
||||||
@Workflow.transition('in_progress')
|
@Workflow.transition('in_progress')
|
||||||
def inProgress(cls, maintenances):
|
def in_progress(cls, maintenances):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
@ -127,6 +124,90 @@ class Maintenance(Workflow, ModelSQL, ModelView):
|
|||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
class MaintenanceService(ModelSQL, ModelView):
|
||||||
|
'Equipment Maintenance Service'
|
||||||
|
__name__ = 'optical_equipment.maintenance.service'
|
||||||
|
|
||||||
|
code = fields.Char(
|
||||||
|
"Code", select=True,states={'readonly': True })
|
||||||
|
reference = fields.Char(
|
||||||
|
"Reference", select=True,
|
||||||
|
help="The identification of an external origin.")
|
||||||
|
description = fields.Char("Description",
|
||||||
|
states={
|
||||||
|
'readonly': Eval('state') != 'draft',
|
||||||
|
})
|
||||||
|
#sale_date = fields.Function(fields.Char("Sale Date"), 'get_sale_date')
|
||||||
|
sale_origin = fields.Reference("Sale Origin", selection='get_origin', select=True,
|
||||||
|
states={'readonly': True})
|
||||||
|
company = fields.Many2One('company.company', "Company", readonly=True)
|
||||||
|
maintenance_type = fields.Selection([('preventive', 'Preventive'),
|
||||||
|
('corrective', 'Corrective')
|
||||||
|
], "Maintenance Type")
|
||||||
|
propietary = fields.Many2One('party.party', "Propietary", required=True)
|
||||||
|
propietary_address = fields.Many2One('party.address', "Propietary Address", required=True,
|
||||||
|
domain=[('party', '=', Eval('propietary'))]
|
||||||
|
)
|
||||||
|
lines = fields.One2Many('optical_equipment.maintenance', 'service_maintenance', "Lines")
|
||||||
|
estimated_agended = fields.DateTime("Date Maintenance")
|
||||||
|
state_agended = fields.Selection([('no_agenda', "No agenda"),
|
||||||
|
('agended', "Agended"),
|
||||||
|
('in_progress', "In progress"),
|
||||||
|
('finish', "Finish"),
|
||||||
|
('failed', "Failed")], "State Agenda")
|
||||||
|
technical = fields.Many2One('company.employee', "Technical")
|
||||||
|
|
||||||
|
state = fields.Selection([('draft', "Draft"),
|
||||||
|
('agended', "Agended"),
|
||||||
|
('in_progress', "In Progress"),
|
||||||
|
('failed', "Failed"),
|
||||||
|
('finished', "Finished")
|
||||||
|
], "State",required=True, readonly=True, sort=False)
|
||||||
|
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def default_state(self):
|
||||||
|
return 'draft'
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def get_sale_date(self):
|
||||||
|
pass
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def _get_origin(cls):
|
||||||
|
'Return list of Model names for origin Reference'
|
||||||
|
pool = Pool()
|
||||||
|
Sale = pool.get('sale.line')
|
||||||
|
|
||||||
|
return [Sale.__name__]
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def get_origin(cls):
|
||||||
|
Model = Pool().get('ir.model')
|
||||||
|
get_name = Model.get_name
|
||||||
|
models = cls._get_origin()
|
||||||
|
|
||||||
|
return [(None, '')] + [(m, get_name(m)) for m in models]
|
||||||
|
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
@ModelView.button
|
||||||
|
@Workflow.transition('agended')
|
||||||
|
def agended(cls, maintenances):
|
||||||
|
pass
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
@ModelView.button
|
||||||
|
@Workflow.transition('in_progress')
|
||||||
|
def in_progress(cls, maintenances):
|
||||||
|
pass
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
@ModelView.button
|
||||||
|
@Workflow.transition('finished')
|
||||||
|
def finished(cls, maintenances):
|
||||||
|
pass
|
||||||
|
|
||||||
class MaintenanceActivity(ModelSQL):
|
class MaintenanceActivity(ModelSQL):
|
||||||
'Maintenance - Products'
|
'Maintenance - Products'
|
||||||
__name__ = 'optical_equipment.maintenance-product.product'
|
__name__ = 'optical_equipment.maintenance-product.product'
|
||||||
|
125
maintenance.xml
125
maintenance.xml
@ -18,6 +18,23 @@
|
|||||||
<field name="type">form</field>
|
<field name="type">form</field>
|
||||||
<field name="name">maintenance_form</field>
|
<field name="name">maintenance_form</field>
|
||||||
</record>
|
</record>
|
||||||
|
<record model="ir.action.act_window" id="act_maintenance_service_form">
|
||||||
|
<field name="name">Services Maintenance</field>
|
||||||
|
<field name="res_model">optical_equipment.maintenance.service</field>
|
||||||
|
<field name="search_value"></field>
|
||||||
|
</record>
|
||||||
|
<record model="ir.ui.view" id= "maintenance_service_view_tree">
|
||||||
|
<field name="model">optical_equipment.maintenance.service</field>
|
||||||
|
<field name="type">tree</field>
|
||||||
|
<field name="name">maintenance_service_tree</field>
|
||||||
|
</record>
|
||||||
|
<record model="ir.ui.view" id="maintenance_service_view_form">
|
||||||
|
<field name="model">optical_equipment.maintenance.service</field>
|
||||||
|
<field name="type">form</field>
|
||||||
|
<field name="name">maintenance_service_form</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
|
||||||
<record model="ir.ui.view" id= "maintenance_equipment_view_form">
|
<record model="ir.ui.view" id= "maintenance_equipment_view_form">
|
||||||
<field name="model">optical_equipment.maintenance-optical_equipment.equipment</field>
|
<field name="model">optical_equipment.maintenance-optical_equipment.equipment</field>
|
||||||
<field name="inherit" ref="maintenance_view_form"/>
|
<field name="inherit" ref="maintenance_view_form"/>
|
||||||
@ -84,30 +101,80 @@
|
|||||||
<field name="domain"></field>
|
<field name="domain"></field>
|
||||||
<field name="act_window" ref="act_maintenance_form"/>
|
<field name="act_window" ref="act_maintenance_form"/>
|
||||||
</record>
|
</record>
|
||||||
<record model="ir.model.button" id="maintenance_draft_button">
|
|
||||||
|
<record model="ir.model.button" id="maintenance_service_draft_button">
|
||||||
<field name="name">draft</field>
|
<field name="name">draft</field>
|
||||||
<field name="string">Draft</field>
|
<field name="string">Draft</field>
|
||||||
<field name="model" search="[('model', '=', 'optical_equipment.maintenance')]"/>
|
<field name="model" search="[('model', '=', 'optical_equipment.maintenance.service')]"/>
|
||||||
</record>
|
</record>
|
||||||
<record model="ir.model.button" id="maintenance_agended_button">
|
<record model="ir.model.button" id="maintenance_service_agended_button">
|
||||||
<field name="name">agended</field>
|
<field name="name">agended</field>
|
||||||
<field name="string">Agended</field>
|
<field name="string">Agended</field>
|
||||||
<field name="model" search="[('model', '=', 'optical_equipment.maintenance')]"/>
|
<field name="model" search="[('model', '=', 'optical_equipment.maintenance.service')]"/>
|
||||||
</record>
|
</record>
|
||||||
<record model="ir.model.button" id="maintenance_in_progress_button">
|
<record model="ir.model.button" id="maintenance_service_in_progress_button">
|
||||||
<field name="name">in_progress</field>
|
<field name="name">in_progress</field>
|
||||||
<field name="string">In progress</field>
|
<field name="string">In progress</field>
|
||||||
<field name="model" search="[('model', '=', 'optical_equipment.maintenance')]"/>
|
<field name="model" search="[('model', '=', 'optical_equipment.maintenance.service')]"/>
|
||||||
</record>
|
</record>
|
||||||
<record model="ir.model.button" id="maintenance_finished_button">
|
<record model="ir.model.button" id="maintenance_service_finished_button">
|
||||||
<field name="name">finished</field>
|
<field name="name">finished</field>
|
||||||
<field name="string">Finished</field>
|
<field name="string">Finished</field>
|
||||||
<field name="model" search="[('model', '=', 'optical_equipment.maintenance')]"/>
|
<field name="model" search="[('model', '=', 'optical_equipment.maintenance.service')]"/>
|
||||||
</record>
|
</record>
|
||||||
<menuitem parent="menu_equipment"
|
|
||||||
action="act_maintenance_form"
|
<record model="ir.action.act_window.domain" id="act_maintenance_service_form_domain_draft">
|
||||||
sequence="40"
|
<field name="name">Draft</field>
|
||||||
id="menu_maintenance_form"/>
|
<field name="sequence" eval="10"/>
|
||||||
|
<field name="domain"
|
||||||
|
eval="[('state', '=', 'draft')]"
|
||||||
|
pyson="1"/>
|
||||||
|
<field name="count" eval="True"/>
|
||||||
|
<field name="act_window" ref="act_maintenance_service_form"/>
|
||||||
|
</record>
|
||||||
|
<record model="ir.action.act_window.domain" id="act_maintenance_service_form_domain_agended">
|
||||||
|
<field name="name">Agended</field>
|
||||||
|
<field name="sequence" eval="20"/>
|
||||||
|
<field name="domain"
|
||||||
|
eval="[('state', '=', 'agended')]"
|
||||||
|
pyson="1"/>
|
||||||
|
<field name="count" eval="True"/>
|
||||||
|
<field name="act_window" ref="act_maintenance_service_form"/>
|
||||||
|
</record>
|
||||||
|
<record model="ir.action.act_window.domain" id="act_maintenance_service_form_domain_in_progress">
|
||||||
|
<field name="name">In progress</field>
|
||||||
|
<field name="sequence" eval="30"/>
|
||||||
|
<field name="domain"
|
||||||
|
eval="[('state', '=', 'in_progress')]"
|
||||||
|
pyson="1"/>
|
||||||
|
<field name="count" eval="True"/>
|
||||||
|
<field name="act_window" ref="act_maintenance_service_form"/>
|
||||||
|
</record>
|
||||||
|
<record model="ir.action.act_window.domain" id="act_maintenance_service_form_domain_failed">
|
||||||
|
<field name="name">Failed</field>
|
||||||
|
<field name="sequence" eval="30"/>
|
||||||
|
<field name="domain"
|
||||||
|
eval="[('state', '=', 'failed')]"
|
||||||
|
pyson="1"/>
|
||||||
|
<field name="count" eval="True"/>
|
||||||
|
<field name="act_window" ref="act_maintenance_service_form"/>
|
||||||
|
</record>
|
||||||
|
<record model="ir.action.act_window.domain" id="act_maintenance_service_form_domain_finished">
|
||||||
|
<field name="name">Finished</field>
|
||||||
|
<field name="sequence" eval="40"/>
|
||||||
|
<field name="domain"
|
||||||
|
eval="[('state', '=', 'finished')]"
|
||||||
|
pyson="1"/>
|
||||||
|
<field name="count" eval="True"/>
|
||||||
|
<field name="act_window" ref="act_maintenance_service_form"/>
|
||||||
|
</record>
|
||||||
|
<record model="ir.action.act_window.domain" id="act_maintenance_service_form_domain_all">
|
||||||
|
<field name="name">All</field>
|
||||||
|
<field name="sequence" eval="9999"/>
|
||||||
|
<field name="domain"></field>
|
||||||
|
<field name="act_window" ref="act_maintenance_service_form"/>
|
||||||
|
</record>
|
||||||
|
|
||||||
<record model="ir.ui.view" id="maintenance_line_view_tree">
|
<record model="ir.ui.view" id="maintenance_line_view_tree">
|
||||||
<field name="model">optical_equipment.maintenance.line</field>
|
<field name="model">optical_equipment.maintenance.line</field>
|
||||||
<field name="type">form</field>
|
<field name="type">form</field>
|
||||||
@ -124,5 +191,39 @@
|
|||||||
<field name="priority" eval="10"/>
|
<field name="priority" eval="10"/>
|
||||||
<field name="name">maintenance_calibration_tree</field>
|
<field name="name">maintenance_calibration_tree</field>
|
||||||
</record>
|
</record>
|
||||||
|
<record model="ir.ui.view" id="maintenance_service_view_calendar">
|
||||||
|
<field name="model">optical_equipment.maintenance.service</field>
|
||||||
|
<field name="type">calendar</field>
|
||||||
|
<field name="name">maintenance_calendar</field>
|
||||||
|
</record>
|
||||||
|
<record model="ir.action.act_window" id="act_maintenance_service_calendar">
|
||||||
|
<field name="name">Agenda</field>
|
||||||
|
<field name="res_model">optical_equipment.maintenance.service</field>
|
||||||
|
</record>
|
||||||
|
<record model="ir.action.act_window.view"
|
||||||
|
id="act_maintenance_calendar_view1">
|
||||||
|
<field name="sequence" eval="10"/>
|
||||||
|
<field name="view" ref="maintenance_service_view_calendar"/>
|
||||||
|
<field name="act_window" ref="act_maintenance_service_calendar"/>
|
||||||
|
</record>
|
||||||
|
<record model="ir.action.act_window.view"
|
||||||
|
id="act_maintenance_calendar_view2">
|
||||||
|
<field name="sequence" eval="20"/>
|
||||||
|
<field name="view" ref="maintenance_service_view_form"/>
|
||||||
|
<field name="act_window" ref="act_maintenance_service_calendar"/>
|
||||||
|
</record>
|
||||||
|
<menuitem parent="menu_equipment"
|
||||||
|
action="act_maintenance_service_calendar"
|
||||||
|
sequence="10"
|
||||||
|
id="menu_agenda_form"/>
|
||||||
|
<menuitem parent="menu_equipment"
|
||||||
|
action="act_maintenance_service_form"
|
||||||
|
sequence="10"
|
||||||
|
id="menu_maintenance_service_form"/>
|
||||||
|
<menuitem parent="menu_maintenance_service_form"
|
||||||
|
action="act_maintenance_form"
|
||||||
|
sequence="40"
|
||||||
|
id="menu_maintenance_form"/>
|
||||||
|
|
||||||
</data>
|
</data>
|
||||||
</tryton>
|
</tryton>
|
||||||
|
143
sale.py
143
sale.py
@ -18,7 +18,11 @@ class Sale(metaclass=PoolMeta):
|
|||||||
'Sale'
|
'Sale'
|
||||||
__name__ = 'sale.sale'
|
__name__ = 'sale.sale'
|
||||||
|
|
||||||
"""
|
agended = fields.Boolean("Scheduling")
|
||||||
|
sale_type = fields.Selection([('maintenance', 'Maintenance'),
|
||||||
|
('equipments', 'Equipos'),
|
||||||
|
('replaces', 'Replaces')], "Sale Type", required=True)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
@ModelView.button
|
@ModelView.button
|
||||||
@Workflow.transition('confirmed')
|
@Workflow.transition('confirmed')
|
||||||
@ -26,31 +30,33 @@ class Sale(metaclass=PoolMeta):
|
|||||||
def confirm(cls, sales):
|
def confirm(cls, sales):
|
||||||
pool = Pool()
|
pool = Pool()
|
||||||
Configuration = pool.get('sale.configuration')
|
Configuration = pool.get('sale.configuration')
|
||||||
|
transaction = Transaction()
|
||||||
|
context = transaction.context
|
||||||
cls.set_sale_date(sales)
|
cls.set_sale_date(sales)
|
||||||
cls.store_cache(sales)
|
cls.store_cache(sales)
|
||||||
config = Configuration(1)
|
config = Configuration(1)
|
||||||
|
|
||||||
pool = Pool()
|
MaintenanceService = pool.get('optical_equipment.maintenance.service')
|
||||||
Equipments = pool.get('optical_equipment.equipment')
|
|
||||||
|
|
||||||
for sale in sales:
|
for sale in sales:
|
||||||
for line in sale.lines:
|
for line in sale.lines:
|
||||||
if line.equipment:
|
maintenanceService = MaintenanceService(
|
||||||
equipment=line.equipment
|
maintenance_type='preventive',
|
||||||
equipment.propietary=sale.party.id
|
state_agended='no_agenda',
|
||||||
equipment.propietary_address=sale.shipment_address.id
|
propietary=cls.party,
|
||||||
equipment.state="uncontrated"
|
propietary_address=cls.shipment_address,
|
||||||
equipment.sale_destination = line
|
state="draft"
|
||||||
equipment.maintenance_frequency = "6" if sale.party.client_type == "ips" else "12"
|
)
|
||||||
equipment.save()
|
#raise UserError(str(dir(maintenanceService)))
|
||||||
|
maintenanceService.save()
|
||||||
|
cls.agended = True
|
||||||
|
sale.save()
|
||||||
|
|
||||||
with Transaction().set_context(
|
with transaction.set_context(
|
||||||
queue_name='sale',
|
queue_scheduled_at=config.sale_process_after,
|
||||||
queue_scheduled_at=config.sale_process_after):
|
queue_batch=context.get('queue_batch', True)):
|
||||||
cls.__queue__.process(sales)
|
cls.__queue__.process(sales)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class SaleLine(metaclass=PoolMeta):
|
class SaleLine(metaclass=PoolMeta):
|
||||||
'SaleLine'
|
'SaleLine'
|
||||||
__name__ = 'sale.line'
|
__name__ = 'sale.line'
|
||||||
@ -69,10 +75,15 @@ class SaleLine(metaclass=PoolMeta):
|
|||||||
'on_change_with_unit_digits')
|
'on_change_with_unit_digits')
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def __setup__(cls):
|
def __setup__(cls):
|
||||||
super(SaleLine, cls).__setup__()
|
super(SaleLine, cls).__setup__()
|
||||||
cls.quantity.states['readonly'] = If(Eval('product_equipment') == True, True)
|
cls.quantity.states['readonly'] = If(Eval('product_equipment') == True, True)
|
||||||
|
#raise UserError(str(Eval('_parent_sale', {}).get('sale_type')))
|
||||||
|
if Eval('_parent_sale', {}).get('sale_type') == 'maintenance':
|
||||||
|
cls.product.domain + [('type', '=', 'service'),
|
||||||
|
('maintenance_activity', '=', True)]
|
||||||
|
|
||||||
@fields.depends('product_equipment','equipment')
|
@fields.depends('product_equipment','equipment')
|
||||||
def get_serial_equipment(self):
|
def get_serial_equipment(self):
|
||||||
@ -239,103 +250,3 @@ class SaleLine(metaclass=PoolMeta):
|
|||||||
('//page[@id="equipment"]', 'states', {
|
('//page[@id="equipment"]', 'states', {
|
||||||
'invisible': ~Eval('product_equipment', True),
|
'invisible': ~Eval('product_equipment', True),
|
||||||
})]
|
})]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class CreateSubscriptionStart(ModelView):
|
|
||||||
'Create Subscription Start'
|
|
||||||
__name__ = 'sale.create.subscription.start'
|
|
||||||
|
|
||||||
start_date = fields.Date("Start Date", required=True)
|
|
||||||
end_date = fields.Date("End Date", required=True)
|
|
||||||
invoice_recurrence = fields.Many2One('sale.subscription.recurrence.rule.set',
|
|
||||||
"Invoice Recurrence",required=True)
|
|
||||||
invoice_start_date = fields.Date("Invoice Start Date",
|
|
||||||
help='Billing start date')
|
|
||||||
service = fields.Many2One('sale.subscription.service', "Service")
|
|
||||||
quantity = fields.Float("Quantity", digits='unit')
|
|
||||||
unit_price = Monetary("Unit Price", currency='currency',
|
|
||||||
digits=price_digits,
|
|
||||||
)
|
|
||||||
|
|
||||||
@classmethod
|
|
||||||
def default_start_date(cls):
|
|
||||||
pool = Pool()
|
|
||||||
Date = pool.get('ir.date')
|
|
||||||
return Date.today()
|
|
||||||
|
|
||||||
@classmethod
|
|
||||||
@fields.depends(methods=['default_start_date'])
|
|
||||||
def default_invoice_start_date(self):
|
|
||||||
invoice_start_date = self.default_start_date()
|
|
||||||
|
|
||||||
return invoice_start_date
|
|
||||||
|
|
||||||
class CreateSubscription(Wizard):
|
|
||||||
'Create Subscription'
|
|
||||||
__name__ = 'sale.create.subscription'
|
|
||||||
|
|
||||||
start = StateView('sale.create.subscription.start',
|
|
||||||
'optical_equipment.create_subscription_view_form',[
|
|
||||||
Button('Cancel', 'end', 'tryton-cancel'),
|
|
||||||
Button('Create', 'create_subscription', 'tryton-ok', default=True),
|
|
||||||
])
|
|
||||||
create_subscription = StateAction('sale_subscription.act_subscription_form')
|
|
||||||
|
|
||||||
done_ = StateView('sale.create.subscription.start',
|
|
||||||
'optical_equipment.create_subscription_view_form',[
|
|
||||||
Button('Done', 'end', 'tryton-cancel'),
|
|
||||||
])
|
|
||||||
@property
|
|
||||||
def _subscription_start(self):
|
|
||||||
return dict(start_date=self.start.start_date,
|
|
||||||
end_date=self.start.end_date,
|
|
||||||
invoice_recurrence=self.start.invoice_recurrence,
|
|
||||||
invoice_start_date=self.start.invoice_start_date,
|
|
||||||
service=self.start.service,
|
|
||||||
quantity=self.start.quantity,
|
|
||||||
unit_price=self.start.unit_price)
|
|
||||||
|
|
||||||
def _equipments_to_subscription(self):
|
|
||||||
sale = self.records[0]
|
|
||||||
equipments_to_subscription = []
|
|
||||||
for line in sale.lines:
|
|
||||||
if line.product_equipment:
|
|
||||||
equipments_to_subscription.append(line.equipment)
|
|
||||||
|
|
||||||
return equipments_to_subscription
|
|
||||||
|
|
||||||
def do_create_subscription(self, action):
|
|
||||||
pool = Pool()
|
|
||||||
Subscription = pool.get('sale.subscription')
|
|
||||||
SubscriptionLine = pool.get('sale.subscription.line')
|
|
||||||
|
|
||||||
sale = self.records[0]
|
|
||||||
a = self._subscription_start
|
|
||||||
|
|
||||||
equipments_to_subscription=self._equipments_to_subscription()
|
|
||||||
subscription_lines = [SubscriptionLine(
|
|
||||||
start_date=a['start_date'],
|
|
||||||
end_date=a['end_date'],
|
|
||||||
consumption_recurrence=a['invoice_recurrence'],
|
|
||||||
service=a['service'],
|
|
||||||
unit=a['service'].product.default_uom,
|
|
||||||
quantity=a['quantity'],
|
|
||||||
unit_price=a['unit_price']
|
|
||||||
)]
|
|
||||||
|
|
||||||
subscription = Subscription(
|
|
||||||
start_date=a['start_date'],
|
|
||||||
end_date=a['end_date'],
|
|
||||||
invoice_recurrence=a['invoice_recurrence'],
|
|
||||||
invoice_start_date=a['invoice_start_date'],
|
|
||||||
party=sale.party.id,
|
|
||||||
contact=sale.contact.id if sale.contact else None,
|
|
||||||
invoice_party=sale.invoice_party.id if sale.invoice_party else None,
|
|
||||||
invoice_address=sale.invoice_address.id,
|
|
||||||
payment_term=sale.payment_term.id if sale.payment_term else None,
|
|
||||||
lines=subscription_lines,
|
|
||||||
equipments=equipments_to_subscription,
|
|
||||||
)
|
|
||||||
subscription.save()
|
|
||||||
"""
|
|
||||||
|
11
sale.xml
11
sale.xml
@ -1,7 +1,11 @@
|
|||||||
<?xml version="1.0"?>
|
<?xml version="1.0"?>
|
||||||
<!--This file file is part of Tryton. The COPYRIGHT file at the top level of this repository contains the full copyright notices and license terms. -->
|
<!--This file file is part of Tryton. The COPYRIGHT file at the top level of this repository contains the full copyright notices and license terms. -->
|
||||||
<tryton>
|
<tryton>
|
||||||
<!--
|
<record model="ir.ui.view" id="sale_view_form">
|
||||||
|
<field name="model">sale.sale</field>
|
||||||
|
<field name="inherit" ref="sale.sale_view_form"/>
|
||||||
|
<field name="name">sale_form</field>
|
||||||
|
</record>
|
||||||
<record model="ir.ui.view" id="sale_line_view_form">
|
<record model="ir.ui.view" id="sale_line_view_form">
|
||||||
<field name="model">sale.line</field>
|
<field name="model">sale.line</field>
|
||||||
<field name="inherit" ref="sale.sale_line_view_form"/>
|
<field name="inherit" ref="sale.sale_line_view_form"/>
|
||||||
@ -17,7 +21,7 @@
|
|||||||
<field name="inherit" ref="sale.sale_line_view_tree_sequence"/>
|
<field name="inherit" ref="sale.sale_line_view_tree_sequence"/>
|
||||||
<field name="name">sale_line_tree_sequence</field>
|
<field name="name">sale_line_tree_sequence</field>
|
||||||
</record>
|
</record>
|
||||||
|
<!--
|
||||||
<record model="ir.ui.view" id="create_subscription_view_form">
|
<record model="ir.ui.view" id="create_subscription_view_form">
|
||||||
<field name="model">sale.create.subscription.start</field>
|
<field name="model">sale.create.subscription.start</field>
|
||||||
<field name="type">form</field>
|
<field name="type">form</field>
|
||||||
@ -32,6 +36,5 @@
|
|||||||
<field name="keyword">form_action</field>
|
<field name="keyword">form_action</field>
|
||||||
<field name="model">sale.sale,-1</field>
|
<field name="model">sale.sale,-1</field>
|
||||||
<field name="action" ref="create_subscription"/>
|
<field name="action" ref="create_subscription"/>
|
||||||
</record>
|
</record>-->
|
||||||
-->
|
|
||||||
</tryton>
|
</tryton>
|
||||||
|
116
subscription.py
116
subscription.py
@ -75,7 +75,13 @@ class Contract(ModelSQL, ModelView):
|
|||||||
('state', '=', 'uncontrated')]
|
('state', '=', 'uncontrated')]
|
||||||
])
|
])
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def __setup__(cls):
|
||||||
|
super(Contract, cls).__setup__()
|
||||||
|
cls._buttons.update({
|
||||||
|
'quotation': {'invisible': Eval('state').in_(['quotation', 'running', 'closed', 'cancelled'])},
|
||||||
|
'run': {'invisible': Eval('state').in_(['draft', 'running', 'closed', 'cancelled'])}
|
||||||
|
})
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def default_company():
|
def default_company():
|
||||||
@ -85,17 +91,58 @@ class Contract(ModelSQL, ModelView):
|
|||||||
def default_state():
|
def default_state():
|
||||||
return 'draft'
|
return 'draft'
|
||||||
|
|
||||||
# @classmethod
|
@classmethod
|
||||||
# @ModelView.button
|
@ModelView.button
|
||||||
# def run(cls, subscription):
|
def quotation(self, contract):
|
||||||
# for equipment in cls.equipments:
|
#raise UserError(str(self))
|
||||||
# if equipment.state == "contrated":
|
pool = Pool()
|
||||||
# #aise UserError(str("El equipo"+str(equipment.number)
|
Subscription = pool.get('sale.subscription')
|
||||||
# # +"No puede pertencer a este contrato porque
|
#raise UserError(str((subscription[0].equipments)))
|
||||||
# # ya se encuentra en un contrato"))
|
for equipment in contract[0].equipments:
|
||||||
# else:
|
if equipment.state == "contrated":
|
||||||
# continue
|
raise UserError(str("El equipo"+str(equipment.number) +
|
||||||
|
"No puede pertencer a este contrato porque ya se encuentra en un contrato"))
|
||||||
|
else:
|
||||||
|
continue
|
||||||
|
|
||||||
|
#raise UserError(str((contract[0].prorogues)))
|
||||||
|
if contract[0].contract and contract[0].prorogues == ():
|
||||||
|
#raise UserError(str(contract[0].contract))
|
||||||
|
Subscription.quote([contract[0].contract])
|
||||||
|
Subscription.run([contract[0].contract])
|
||||||
|
else:
|
||||||
|
IdProrogues = set()
|
||||||
|
for ide in contract[0].prorogues:
|
||||||
|
IdProrogues.add(ide.id)
|
||||||
|
|
||||||
|
subscription = Subscription.search([('state', '=', 'draft'),
|
||||||
|
('id', 'in', IdProrogues)])
|
||||||
|
|
||||||
|
raise UserError(str(subscription))
|
||||||
|
#raise UserError(str(list(contract[0].prorogues)))
|
||||||
|
raise UserError(str(list(contract[0].prorogues).find(['state', '=', 'draft'])))
|
||||||
|
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
@ModelView.button
|
||||||
|
def run(cls, subscription):
|
||||||
|
pool = Pool()
|
||||||
|
Subscription = pool.get('sale.subscription')
|
||||||
|
|
||||||
|
if subscription.state == 'quotation':
|
||||||
|
Subscription.run(subscription)
|
||||||
|
elif subscription.state == 'draft':
|
||||||
|
for equipment in cls.equipments:
|
||||||
|
if equipment.state == "contrated":
|
||||||
|
raise UserError(str("El equipo"+str(equipment.number) +
|
||||||
|
"No puede pertencer a este contrato porque ya se encuentra en un contrato"))
|
||||||
|
else:
|
||||||
|
continue
|
||||||
|
|
||||||
|
Subscription.quotation(subscription)
|
||||||
|
Subscription.run(subscription)
|
||||||
|
|
||||||
|
Subscription.quotation(subscription)
|
||||||
|
|
||||||
|
|
||||||
class CreateInitialContract(ModelView):
|
class CreateInitialContract(ModelView):
|
||||||
@ -142,7 +189,8 @@ class CreateInitialContract(ModelView):
|
|||||||
'equipment', "Equipments", required=True,
|
'equipment', "Equipments", required=True,
|
||||||
domain=[['OR',
|
domain=[['OR',
|
||||||
('state', '=', 'registred'),
|
('state', '=', 'registred'),
|
||||||
('state', '=', 'uncontrated')]
|
('state', '=', 'uncontrated')],
|
||||||
|
('propietary', '=', Eval('party'))
|
||||||
])
|
])
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
@ -276,10 +324,13 @@ class CreateNextProrogue(ModelView):
|
|||||||
__name__ = 'optical_equipment_prorogue.next'
|
__name__ = 'optical_equipment_prorogue.next'
|
||||||
|
|
||||||
party = fields.Many2One('party.party', "Party", required=True,
|
party = fields.Many2One('party.party', "Party", required=True,
|
||||||
domain=[('party', '=', Eval('party'))],
|
|
||||||
help="The party who subscribes.")
|
help="The party who subscribes.")
|
||||||
initial_contract = fields.Many2One('optical_equipment.contract', "Initial Contract")
|
initial_contract = fields.Many2One('optical_equipment.contract', "Initial Contract", required=True,
|
||||||
contact = fields.Many2One('party.contact_mechanism', "Contact")
|
domain=[('party', '=', Eval('party')),
|
||||||
|
('state', '=', "closed")],
|
||||||
|
depends=['party'])
|
||||||
|
contact = fields.Many2One('party.contact_mechanism', "Contact", required=True,
|
||||||
|
domain=[('party', '=', Eval('party'))])
|
||||||
invoice_address = fields.Many2One('party.address', 'Invoice Address',
|
invoice_address = fields.Many2One('party.address', 'Invoice Address',
|
||||||
required=True, domain=[('party', '=', Eval('party'))])
|
required=True, domain=[('party', '=', Eval('party'))])
|
||||||
invoice_recurrence = fields.Many2One('sale.subscription.recurrence.rule.set', "Invoice Recurrence",
|
invoice_recurrence = fields.Many2One('sale.subscription.recurrence.rule.set', "Invoice Recurrence",
|
||||||
@ -294,9 +345,11 @@ class CreateNextProrogue(ModelView):
|
|||||||
Eval('start_date', datetime.date.min),
|
Eval('start_date', datetime.date.min),
|
||||||
datetime.date.min)),
|
datetime.date.min)),
|
||||||
('end_date', '=', None),
|
('end_date', '=', None),
|
||||||
])
|
],
|
||||||
|
depends=['invoice_start_date'])
|
||||||
invoice_start_date = fields.Date("Invoice Start Date", required=True,
|
invoice_start_date = fields.Date("Invoice Start Date", required=True,
|
||||||
help='Billing start date')
|
help='Billing start date',
|
||||||
|
depends=['start_date'])
|
||||||
service = fields.Many2One('sale.subscription.service', "Service", required=True)
|
service = fields.Many2One('sale.subscription.service', "Service", required=True)
|
||||||
quantity = fields.Float("Quantity", digits='unit', required=True)
|
quantity = fields.Float("Quantity", digits='unit', required=True)
|
||||||
unit_price = Monetary("Unit Price", currency='currency',
|
unit_price = Monetary("Unit Price", currency='currency',
|
||||||
@ -306,9 +359,16 @@ class CreateNextProrogue(ModelView):
|
|||||||
'equipment', "Equipments", required=True,
|
'equipment', "Equipments", required=True,
|
||||||
domain=[['OR',
|
domain=[['OR',
|
||||||
('state', '=', 'registred'),
|
('state', '=', 'registred'),
|
||||||
('state', '=', 'uncontrated')]
|
('state', '=', 'uncontrated')],
|
||||||
|
('propietary', '=', Eval('party'))
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|
||||||
|
@fields.depends('party', 'contact')
|
||||||
|
def on_change_party(self):
|
||||||
|
self.contact = None
|
||||||
|
self.initial_contract = None
|
||||||
|
|
||||||
@fields.depends('initial_contract', 'party', 'contact', 'invoice_address',
|
@fields.depends('initial_contract', 'party', 'contact', 'invoice_address',
|
||||||
'invoice_recurrence', 'start_date', 'end_date',
|
'invoice_recurrence', 'start_date', 'end_date',
|
||||||
'equipments')
|
'equipments')
|
||||||
@ -318,8 +378,8 @@ class CreateNextProrogue(ModelView):
|
|||||||
self.party = contract.party.id
|
self.party = contract.party.id
|
||||||
self.contact = contract.contact.id
|
self.contact = contract.contact.id
|
||||||
self.invoice_address = contract.invoice_address.id
|
self.invoice_address = contract.invoice_address.id
|
||||||
self.invoice_recurrence = contract.invoice_recurrence.id
|
|
||||||
self.start_date = contract.end_date
|
self.start_date = contract.end_date
|
||||||
|
self.invoice_start_date = contract.end_date
|
||||||
self.equipments = contract.equipments
|
self.equipments = contract.equipments
|
||||||
else:
|
else:
|
||||||
self.party = None
|
self.party = None
|
||||||
@ -329,6 +389,24 @@ class CreateNextProrogue(ModelView):
|
|||||||
self.start_date = None
|
self.start_date = None
|
||||||
self.equipments = []
|
self.equipments = []
|
||||||
|
|
||||||
|
@fields.depends('invoice_recurrence', 'start_date')
|
||||||
|
def on_change_invoice_recurrence(self):
|
||||||
|
if self.invoice_recurrence and self.invoice_recurrence.rules[0].freq == "yearly":
|
||||||
|
#pool = Pool()
|
||||||
|
#Date = pool.get('ir.date')
|
||||||
|
self.end_date = self.start_date + timedelta(days=365)
|
||||||
|
#self.end_date = Date.today() + timedelta(days=365)
|
||||||
|
elif self.invoice_recurrence == None:
|
||||||
|
self.end_date = None
|
||||||
|
|
||||||
|
|
||||||
|
@fields.depends('invoice_start_date', 'start_date')
|
||||||
|
def on_change_start_date(self):
|
||||||
|
self.invoice_start_date = self.start_date
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def default_quantity(self):
|
||||||
|
return 1
|
||||||
|
|
||||||
class CreateProrogue(Wizard):
|
class CreateProrogue(Wizard):
|
||||||
'Create Prorogue'
|
'Create Prorogue'
|
||||||
|
@ -51,6 +51,13 @@
|
|||||||
<field name="domain" eval="[('state', '=', 'running')]" pyson="1"/>
|
<field name="domain" eval="[('state', '=', 'running')]" pyson="1"/>
|
||||||
<field name="act_window" ref="act_contract_form"/>
|
<field name="act_window" ref="act_contract_form"/>
|
||||||
</record>
|
</record>
|
||||||
|
<record model="ir.action.act_window.domain"
|
||||||
|
id="act_contract_form_domain_closed">
|
||||||
|
<field name="name">Closed</field>
|
||||||
|
<field name="sequence" eval="40"/>
|
||||||
|
<field name="domain" eval="[('state', '=', 'closed')]" pyson="1"/>
|
||||||
|
<field name="act_window" ref="act_contract_form"/>
|
||||||
|
</record>
|
||||||
<record model="ir.action.act_window.domain"
|
<record model="ir.action.act_window.domain"
|
||||||
id="act_contract_form_domain_all">
|
id="act_contract_form_domain_all">
|
||||||
<field name="name">All</field>
|
<field name="name">All</field>
|
||||||
@ -113,6 +120,19 @@
|
|||||||
<field name="name">run</field>
|
<field name="name">run</field>
|
||||||
<field name="model" search="[('model', '=', 'optical_equipment.contract')]"/>
|
<field name="model" search="[('model', '=', 'optical_equipment.contract')]"/>
|
||||||
</record>
|
</record>
|
||||||
|
<record model="ir.action.act_window.domain"
|
||||||
|
id="act_subscription_form_domain_closed">
|
||||||
|
<field name="name">Closed</field>
|
||||||
|
<field name="sequence" eval="40"/>
|
||||||
|
<field name="domain" eval="[('state', '=', 'closed')]" pyson="1"/>
|
||||||
|
<field name="act_window" ref="sale_subscription.act_subscription_form"/>
|
||||||
|
</record>
|
||||||
|
<record model="ir.model.button" id="quotation_contract_button">
|
||||||
|
<field name="name">quotation</field>
|
||||||
|
<field name="string">Quotation</field>
|
||||||
|
<field name="confirm">Are you sure you want to quote these subscription?</field>
|
||||||
|
<field name="model" search="[('model', '=', 'optical_equipment.contract')]"/>
|
||||||
|
</record>
|
||||||
<menuitem
|
<menuitem
|
||||||
name="Contracts Management"
|
name="Contracts Management"
|
||||||
sequence="50"
|
sequence="50"
|
||||||
|
@ -40,4 +40,9 @@ this repository contains the full copyright notices and license terms. -->
|
|||||||
</notebook>
|
</notebook>
|
||||||
<label name="state"/>
|
<label name="state"/>
|
||||||
<field name="state"/>
|
<field name="state"/>
|
||||||
|
<group col="2" colspan="2" id="button">
|
||||||
|
<!--<button name="draft"/> -->
|
||||||
|
<button name="quotation"/>
|
||||||
|
<button name="run"/>
|
||||||
|
</group>
|
||||||
</form>
|
</form>
|
||||||
|
@ -3,24 +3,27 @@
|
|||||||
this repository contains the full copyright notices and license terms. -->
|
this repository contains the full copyright notices and license terms. -->
|
||||||
<form>
|
<form>
|
||||||
<group id="create_prorogue">
|
<group id="create_prorogue">
|
||||||
<label name="initial_contract"/>
|
|
||||||
<field name="initial_contract" colspan="3"/>
|
|
||||||
<label name="party"/>
|
<label name="party"/>
|
||||||
<field name="party"/>
|
<field name="party"/>
|
||||||
|
<label name="contact"/>
|
||||||
|
<field name="contact"/>
|
||||||
|
<newline/>
|
||||||
|
<label name="initial_contract"/>
|
||||||
|
<field name="initial_contract" colspan="3"/>
|
||||||
<label name="invoice_address"/>
|
<label name="invoice_address"/>
|
||||||
<field name="invoice_address"/>
|
<field name="invoice_address"/>
|
||||||
<label name="payment_term"/>
|
<label name="payment_term"/>
|
||||||
<field name="payment_term"/>
|
<field name="payment_term"/>
|
||||||
<label name="contact"/>
|
<newline/>
|
||||||
<field name="contact"/>
|
<label name="invoice_recurrence"/>
|
||||||
|
<field name="invoice_recurrence"/>
|
||||||
|
<newline/>
|
||||||
<label name="start_date"/>
|
<label name="start_date"/>
|
||||||
<field name="start_date"/>
|
<field name="start_date"/>
|
||||||
<label name="end_date"/>
|
<label name="end_date"/>
|
||||||
<field name="end_date"/>
|
<field name="end_date"/>
|
||||||
<label name="invoice_start_date"/>
|
<label name="invoice_start_date"/>
|
||||||
<field name="invoice_start_date"/>
|
<field name="invoice_start_date"/>
|
||||||
<label name="invoice_recurrence"/>
|
|
||||||
<field name="invoice_recurrence"/>
|
|
||||||
<label name="service"/>
|
<label name="service"/>
|
||||||
<field name="service"/>
|
<field name="service"/>
|
||||||
<label name="quantity"/>
|
<label name="quantity"/>
|
||||||
|
@ -52,8 +52,7 @@
|
|||||||
<newline/>
|
<newline/>
|
||||||
<label name="state"/>
|
<label name="state"/>
|
||||||
<field name="state"/>
|
<field name="state"/>
|
||||||
<group col="4" colspan="4" id="button">
|
<group id="button">
|
||||||
<button name="draft"/>
|
|
||||||
<button name="agended"/>
|
<button name="agended"/>
|
||||||
<button name="in_progress"/>
|
<button name="in_progress"/>
|
||||||
<button name="finished"/>
|
<button name="finished"/>
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
this repository contains the full copyright notices and license terms.-->
|
this repository contains the full copyright notices and license terms.-->
|
||||||
<tree>
|
<tree>
|
||||||
<field name="code"/>
|
<field name="code"/>
|
||||||
<field name="company"/>
|
<field name="maintenance_type" expand="0"/>
|
||||||
<field name="propietary"/>
|
<field name="propietary"/>
|
||||||
<field name="propietary_address"/>
|
<field name="propietary_address"/>
|
||||||
<field name="equipment"/>
|
<field name="equipment"/>
|
||||||
|
@ -3,22 +3,10 @@
|
|||||||
this repository contains the full copyright notices and license terms.-->
|
this repository contains the full copyright notices and license terms.-->
|
||||||
<tree>
|
<tree>
|
||||||
<field name="code"/>
|
<field name="code"/>
|
||||||
<field name="company"/>
|
|
||||||
<field name="location"/>
|
|
||||||
<field name="propietary"/>
|
<field name="propietary"/>
|
||||||
<field name="propietary_address"/>
|
<field name="propietary_address"/>
|
||||||
<field name="product"/>
|
<field name="product" expand="1"/>
|
||||||
<field name="equipment_type"/>
|
|
||||||
<field name="use"/>
|
|
||||||
<field name="biomedical_class"/>
|
|
||||||
<field name="calibration"/>
|
|
||||||
<field name="mark_category"/>
|
<field name="mark_category"/>
|
||||||
<field name="model_category"/>
|
<field name="model_category"/>
|
||||||
<field name="refurbish"/>
|
|
||||||
<field name="software_version"/>
|
|
||||||
<field name="useful_life"/>
|
|
||||||
<field name="warranty"/>
|
|
||||||
<field name="serial"/>
|
<field name="serial"/>
|
||||||
<field name="health_register"/>
|
|
||||||
<field name="origin_country"/>
|
|
||||||
</tree>
|
</tree>
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
<?xml version="1.0"?>
|
<?xml version="1.0"?>
|
||||||
<!--This file file is part of Tryton. The COPYRIGHT file at the top level of this repository contains the full copyright notices and license terms. -->
|
<!--This file file is part of Tryton. The COPYRIGHT file at the top level of this repository contains the full copyright notices and license terms. -->
|
||||||
<data>
|
<data>
|
||||||
|
<!--
|
||||||
<xpath
|
<xpath
|
||||||
expr="/form/notebook/page[@id='notes']" position="before">
|
expr="/form/notebook/page[@id='notes']" position="before">
|
||||||
<page string="Equipment" id="equipment">
|
<page string="Equipment" id="equipment">
|
||||||
@ -17,5 +18,5 @@
|
|||||||
<field name="equipment"/>
|
<field name="equipment"/>
|
||||||
<label name="equipment_serial"/>
|
<label name="equipment_serial"/>
|
||||||
<field name="equipment_serial"/>
|
<field name="equipment_serial"/>
|
||||||
</xpath>
|
</xpath>-->
|
||||||
</data>
|
</data>
|
||||||
|
Loading…
Reference in New Issue
Block a user