add reports
This commit is contained in:
parent
4a5f756dbe
commit
35c74076b5
@ -2,7 +2,7 @@
|
|||||||
# this repository contains the full copyright notices and license terms.
|
# this repository contains the full copyright notices and license terms.
|
||||||
from trytond.pool import Pool
|
from trytond.pool import Pool
|
||||||
from . import (agended, calibration, configuration, contract, diary,
|
from . import (agended, calibration, configuration, contract, diary,
|
||||||
equipment, party, product, maintenance, purchase, sale)
|
equipment, party, product, maintenance, move, purchase, sale)
|
||||||
|
|
||||||
__all__ = ['register']
|
__all__ = ['register']
|
||||||
|
|
||||||
@ -41,6 +41,10 @@ def register():
|
|||||||
maintenance.MaintenanceLine,
|
maintenance.MaintenanceLine,
|
||||||
maintenance.MaintenanceActivity,
|
maintenance.MaintenanceActivity,
|
||||||
maintenance.ChangePropietaryMaintenance,
|
maintenance.ChangePropietaryMaintenance,
|
||||||
|
move.Move,
|
||||||
|
move.ShipmentOut,
|
||||||
|
move.ShipmentInternal,
|
||||||
|
move.ShipmentOutReturn,
|
||||||
module='optical_equipment', type_='model')
|
module='optical_equipment', type_='model')
|
||||||
Pool.register(
|
Pool.register(
|
||||||
agended.AssingAgended,
|
agended.AssingAgended,
|
||||||
@ -53,4 +57,6 @@ def register():
|
|||||||
contract.ContractReport,
|
contract.ContractReport,
|
||||||
equipment.EquipmentReport,
|
equipment.EquipmentReport,
|
||||||
maintenance.MaintenanceServiceReport,
|
maintenance.MaintenanceServiceReport,
|
||||||
|
move.PickingListDeliveryReport,
|
||||||
|
move.CapacitationReport,
|
||||||
module='optical_equipment', type_='report')
|
module='optical_equipment', type_='report')
|
||||||
|
@ -5,6 +5,7 @@ from trytond.model import (
|
|||||||
from trytond.pyson import Bool, Eval, If, Id, Equal
|
from trytond.pyson import Bool, Eval, If, Id, Equal
|
||||||
from trytond.pool import Pool
|
from trytond.pool import Pool
|
||||||
from trytond.modules.company import CompanyReport
|
from trytond.modules.company import CompanyReport
|
||||||
|
from trytond.transaction import Transaction
|
||||||
|
|
||||||
_digits = (16, 2)
|
_digits = (16, 2)
|
||||||
_states = {'readonly': If(Eval('state') != 'draft', True)}
|
_states = {'readonly': If(Eval('state') != 'draft', True)}
|
||||||
|
@ -255,7 +255,7 @@ class MaintenanceService(Workflow, ModelSQL, ModelView):
|
|||||||
class MaintenanceServiceLine(Workflow, ModelSQL, ModelView):
|
class MaintenanceServiceLine(Workflow, ModelSQL, ModelView):
|
||||||
'Equipment Maintenance Line'
|
'Equipment Maintenance Line'
|
||||||
__name__ = 'optical_equipment.maintenance'
|
__name__ = 'optical_equipment.maintenance'
|
||||||
_rec_name = 'rec_name'
|
#_rec_name = 'rec_name'
|
||||||
_states={'required': True,
|
_states={'required': True,
|
||||||
'readonly': Eval('state').in_(['finished'])}
|
'readonly': Eval('state').in_(['finished'])}
|
||||||
|
|
||||||
@ -318,6 +318,15 @@ class MaintenanceServiceLine(Workflow, ModelSQL, ModelView):
|
|||||||
graph_calibration = fields.Binary('Graphs')
|
graph_calibration = fields.Binary('Graphs')
|
||||||
rec_name = fields.Function(fields.Char('rec_name'), 'get_rec_name')
|
rec_name = fields.Function(fields.Char('rec_name'), 'get_rec_name')
|
||||||
|
|
||||||
|
# @fields.depends('maintenance_type', 'code')
|
||||||
|
# def get_rec_name(self, name):
|
||||||
|
# if self.maintenance_type and self.code:
|
||||||
|
# name = str(self.maintenance_type) + '@' + str(self.code)
|
||||||
|
# else:
|
||||||
|
# name = str(self.maintenance_type) + '@' + 'Borrador'
|
||||||
|
|
||||||
|
# return name
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def __setup__(cls):
|
def __setup__(cls):
|
||||||
super(MaintenanceServiceLine, cls).__setup__()
|
super(MaintenanceServiceLine, cls).__setup__()
|
||||||
@ -350,15 +359,6 @@ class MaintenanceServiceLine(Workflow, ModelSQL, ModelView):
|
|||||||
})
|
})
|
||||||
]
|
]
|
||||||
|
|
||||||
@fields.depends('maintenance_type', 'code')
|
|
||||||
def get_rec_name(self, name):
|
|
||||||
if self.maintenance_type and self.code:
|
|
||||||
name = str(self.maintenance_type) + '@' + str(self.code)
|
|
||||||
else:
|
|
||||||
name = str(self.maintenance_type) + '@' + 'Borrador'
|
|
||||||
|
|
||||||
return name
|
|
||||||
|
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def default_company():
|
def default_company():
|
||||||
|
15
product.py
15
product.py
@ -135,14 +135,15 @@ class Template(metaclass=PoolMeta):
|
|||||||
warranty = fields.Integer("Warranty")
|
warranty = fields.Integer("Warranty")
|
||||||
|
|
||||||
#### calibration parameters
|
#### calibration parameters
|
||||||
use_pattern = fields.Many2One('optical_equipment.use_pattern', "Use Pattern", ondelete='RESTRICT',
|
use_pattern = fields.Selection([
|
||||||
|
('', ""),
|
||||||
|
('ojo_esquematico', "Ojo esquematico"),
|
||||||
|
('lente_prueba', "Lente de Prueba"),
|
||||||
|
('pesas_calibration', "Pesas de Calibración"),
|
||||||
|
('esferas_calibration', "Esferas de Calibración")], "Patrón Utilizado", states={'required': Eval('calibration', True)})
|
||||||
|
|
||||||
|
new_use_pattern = fields.Many2One('optical_equipment.use_pattern', "Use Pattern", ondelete='RESTRICT',
|
||||||
states={'required': Eval('calibration', True)})
|
states={'required': Eval('calibration', True)})
|
||||||
#use_pattern = fields.Selection([
|
|
||||||
# ('', ""),
|
|
||||||
# ('ojo_esquematico', "Ojo esquematico"),
|
|
||||||
# ('lente_prueba', "Lente de Prueba"),
|
|
||||||
# ('pesas_calibration', "Pesas de Calibración"),
|
|
||||||
# ('esferas_calibration', "Esferas de Calibración")], "Patrón Utilizado", states={'required': Eval('calibration', True)})
|
|
||||||
measuring_range = fields.Selection([
|
measuring_range = fields.Selection([
|
||||||
('dioptria', "Dioptria"),
|
('dioptria', "Dioptria"),
|
||||||
('mmhg', "mmHg")], "Rango de Medición")
|
('mmhg', "mmHg")], "Rango de Medición")
|
||||||
|
@ -19,8 +19,10 @@ xml:
|
|||||||
agended.xml
|
agended.xml
|
||||||
configuration.xml
|
configuration.xml
|
||||||
maintenance.xml
|
maintenance.xml
|
||||||
|
move.xml
|
||||||
party.xml
|
party.xml
|
||||||
uom.xml
|
uom.xml
|
||||||
product.xml
|
product.xml
|
||||||
purchase.xml
|
purchase.xml
|
||||||
sale.xml
|
sale.xml
|
||||||
|
shipment.xml
|
@ -63,8 +63,8 @@
|
|||||||
<field name="patterns_equipments"/>
|
<field name="patterns_equipments"/>
|
||||||
<newline/>
|
<newline/>
|
||||||
<group colspan="6" yexpand="1" id="lines_calibration">
|
<group colspan="6" yexpand="1" id="lines_calibration">
|
||||||
<!-- <field name="lines_calibration"/> -->
|
<field name="lines_calibration"/>
|
||||||
<!-- <newline/> -->
|
<newline/>
|
||||||
<field name="calibration_total"/>
|
<field name="calibration_total"/>
|
||||||
</group>
|
</group>
|
||||||
</page>
|
</page>
|
||||||
|
Loading…
Reference in New Issue
Block a user