11 Commits
6.8 ... 7.0

49 changed files with 47739 additions and 3760 deletions

View File

@@ -41,7 +41,6 @@ def register():
sale.Sale, sale.Sale,
sale.SaleDate, sale.SaleDate,
sale.SaleLine, sale.SaleLine,
balance_sale_party.BalanceSalePartyStart,
maintenance.MaintenanceService, maintenance.MaintenanceService,
maintenance.MaintenanceServiceLine, maintenance.MaintenanceServiceLine,
maintenance.MaintenanceLine, maintenance.MaintenanceLine,

View File

@@ -1,12 +1,9 @@
# 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.
from trytond.model import ModelSQL, ModelView, fields from trytond.model import ModelSQL, ModelView, fields
from trytond.wizard import ( from trytond.wizard import Button, StateAction, StateView, Wizard
Button, StateAction, StateTransition, StateView, Wizard)
from trytond.pool import Pool from trytond.pool import Pool
from trytond.exceptions import UserError
import datetime
from datetime import timedelta from datetime import timedelta
@@ -14,46 +11,56 @@ class AgendedInitial(ModelView):
'Agended maintenance service' 'Agended maintenance service'
__name__ = 'optical_equipment_maintenance.agended' __name__ = 'optical_equipment_maintenance.agended'
maintenance_service = fields.Many2One('optical_equipment_maintenance.service',"Maintenaince Service", maintenance_service = fields.Many2One(
required=True, domain=[('state', '=', 'draft')]) 'optical_equipment_maintenance.service',
estimated_agended = fields.DateTime("Date Maintenance", required=True) 'Maintenaince Service',
technical = fields.Many2One('company.employee', "Technical", required=True) required=True,
domain=[('state', '=', 'draft')],
)
estimated_agended = fields.DateTime('Date Maintenance', required=True)
technical = fields.Many2One('company.employee', 'Technical', required=True)
class AssingAgended(Wizard): class AssingAgended(Wizard):
'Assing Agended' 'Assing Agended'
__name__ = 'optical_equipment_maintenance.assing_agended' __name__ = 'optical_equipment_maintenance.assing_agended'
start = StateView('optical_equipment_maintenance.agended', start = StateView(
'optical_equipment.assing_agended_view_form', [ 'optical_equipment_maintenance.agended',
Button('Cancel', 'end', 'tryton-cancel'), 'optical_equipment.assing_agended_view_form',
Button('Assing', 'assing_agended', 'tryton-ok', default=True), [
]) Button('Cancel', 'end', 'tryton-cancel'),
Button('Assing', 'assing_agended', 'tryton-ok', default=True),
assing_agended = StateAction('optical_equipment.act_maintenance_service_form') ],
)
assing_agended = StateAction(
'optical_equipment.act_maintenance_service_form')
def default_start(self, fields): def default_start(self, fields):
if len(self.records) > 0: if len(self.records) > 0:
default = {'maintenance_service': self.records[0].id} default = {'maintenance_service': self.records[0].id}
else: else:
default = {'maintenance_service': None} default = {'maintenance_service': None}
return default return default
def do_assing_agended(self, action): def do_assing_agended(self, action):
pool = Pool() pool = Pool()
Diary = pool.get('optical_equipment_maintenance.diary') Diary = pool.get('optical_equipment_maintenance.diary')
Config = pool.get('optical_equipment.configuration') Config = pool.get('optical_equipment.configuration')
config = Config(3) config = Config(3)
MaintenanceService = pool.get('optical_equipment_maintenance.service') diary = Diary(
diary = Diary(code=config.agended_sequence.get(), code=config.agended_sequence.get(),
maintenance_service=self.start.maintenance_service, maintenance_service=self.start.maintenance_service,
date_expected=self.start.estimated_agended, date_expected=self.start.estimated_agended,
date_estimated=self.start.estimated_agended + timedelta(days=15), date_estimated=self.start.estimated_agended + timedelta(days=15),
date_end=self.start.estimated_agended + timedelta(days=15), date_end=self.start.estimated_agended + timedelta(days=15),
technical=self.start.technical.id, technical=self.start.technical.id,
state='agended') state='agended',
)
diary.save() diary.save()
maintenanceService = self.start.maintenance_service maintenanceService = self.start.maintenance_service
@@ -65,32 +72,40 @@ class AssingAgended(Wizard):
maintenanceService.history_agended += (diary.id,) maintenanceService.history_agended += (diary.id,)
maintenanceService.set_code(maintenanceService) maintenanceService.set_code(maintenanceService)
maintenanceService.save() maintenanceService.save()
class ReAgended(ModelView): class ReAgended(ModelView):
'Agended maintenance service' 'Agended maintenance service'
__name__ = 'optical_equipment_maintenance.reagended' __name__ = 'optical_equipment_maintenance.reagended'
maintenance_service = fields.Many2One('optical_equipment_maintenance.service',"Maintenaince Service", maintenance_service = fields.Many2One(
required=True, domain=[('state', '=', 'failed')]) 'optical_equipment_maintenance.service',
estimated_agended = fields.DateTime("Date Maintenance", required=True) 'Maintenaince Service',
technical = fields.Many2One('company.employee', "Technical", required=True) required=True,
domain=[('state', '=', 'failed')],
)
estimated_agended = fields.DateTime('Date Maintenance', required=True)
technical = fields.Many2One('company.employee', 'Technical', required=True)
class ReAssingAgended(Wizard): class ReAssingAgended(Wizard):
'Assing Agended' 'Assing Agended'
__name__ = 'optical_equipment_maintenance.reassing_agended' __name__ = 'optical_equipment_maintenance.reassing_agended'
start = StateView('optical_equipment_maintenance.reagended', start = StateView(
'optical_equipment.reassing_agended_view_form', [ 'optical_equipment_maintenance.reagended',
Button('Cancel', 'end', 'tryton-cancel'), 'optical_equipment.reassing_agended_view_form',
Button('Assing', 'assing_agended', 'tryton-ok', default=True), [
]) Button('Cancel', 'end', 'tryton-cancel'),
Button('Assing', 'assing_agended', 'tryton-ok', default=True),
],
)
assing_agended = StateAction('optical_equipment.act_maintenance_service_form') assing_agended = StateAction(
'optical_equipment.act_maintenance_service_form')
def default_start(self, fields): def default_start(self, fields):
if len(self.records) > 0: if len(self.records) > 0:
default = {'maintenance_service': self.records[0].id} default = {'maintenance_service': self.records[0].id}
else: else:
default = {'maintenance_service': None} default = {'maintenance_service': None}
@@ -99,13 +114,15 @@ class ReAssingAgended(Wizard):
def do_assing_agended(self, action): def do_assing_agended(self, action):
pool = Pool() pool = Pool()
Diary = pool.get('optical_equipment_maintenance.diary') Diary = pool.get('optical_equipment_maintenance.diary')
diary = Diary(maintenance_service=self.start.maintenance_service, diary = Diary(
date_expected=self.start.estimated_agended, maintenance_service=self.start.maintenance_service,
date_estimated=self.start.estimated_agended + timedelta(days=15), date_expected=self.start.estimated_agended,
date_end=self.start.estimated_agended + timedelta(days=15), date_estimated=self.start.estimated_agended + timedelta(days=15),
technical=self.start.technical.id, date_end=self.start.estimated_agended + timedelta(days=15),
state='agended') technical=self.start.technical.id,
state='agended',
)
diary.save() diary.save()
maintenanceService = self.start.maintenance_service maintenanceService = self.start.maintenance_service
@@ -121,5 +138,7 @@ class ServiceMaintenanceAgended(ModelSQL):
'Service Maintenance - Agended' 'Service Maintenance - Agended'
__name__ = 'optical_equipment_maintenance.service-maintenance.diary' __name__ = 'optical_equipment_maintenance.service-maintenance.diary'
maintenance_service = fields.Many2One('optical_equipment_maintenance.service', "Maintenance Service") maintenance_service = fields.Many2One(
agended = fields.Many2One('optical_equipment_maintenance.diary', "Agended") 'optical_equipment_maintenance.service', 'Maintenance Service'
)
agended = fields.Many2One('optical_equipment_maintenance.diary', 'Agended')

View File

@@ -3,53 +3,66 @@
from trytond.model import ModelView, fields from trytond.model import ModelView, fields
from trytond.wizard import Wizard, StateView, Button, StateReport from trytond.wizard import Wizard, StateView, Button, StateReport
from trytond.report import Report from trytond.report import Report
from trytond.pool import Pool, PoolMeta from trytond.pool import Pool
from trytond.transaction import Transaction from trytond.transaction import Transaction
from trytond.pyson import Eval from trytond.pyson import Eval
from trytond.exceptions import UserError from trytond.exceptions import UserError
__all__ = ['BalancePartyStart', 'PrintBalanceParty', 'BalanceParty'] __all__ = ['BalanceSalePartyStart',
'PrintBalanceSaleParty', 'BalanceSaleParty']
class BalanceSalePartyStart(ModelView): class BalanceSalePartyStart(ModelView):
'Balance Party Start' 'Balance Party Start'
__name__ = 'optical_equipment.print_balance_sale_party.start' __name__ = 'optical_equipment.print_balance_sale_party.start'
fiscalyear = fields.Many2One('account.fiscalyear', 'Fiscal Year',
required=True)
party = fields.Many2One('party.party', 'Party', required=True) party = fields.Many2One('party.party', 'Party', required=True)
start_period = fields.Many2One('account.period', 'Start Period', start_period = fields.Many2One(
domain=[ 'account.period',
('start_date', '<=', (Eval('end_period'), 'start_date')), 'Start Period',
], depends=['fiscalyear', 'end_period']) domain=[
end_period = fields.Many2One('account.period', 'End Period', ('start_date', '<=', (Eval('end_period'), 'start_date')),
domain=[ ],
('start_date', '>=', (Eval('start_period'), 'start_date')) depends=['fiscalyear', 'end_period'],
], )
depends=['start_period']) end_period = fields.Many2One(
'account.period',
'End Period',
domain=[('start_date', '>=', (Eval('start_period'), 'start_date'))],
depends=['start_period'],
)
company = fields.Many2One('company.company', 'Company', required=True) company = fields.Many2One('company.company', 'Company', required=True)
party_type = fields.Selection([('out', 'Customer')], "Party Type", required=True) party_type = fields.Selection(
[('out', 'Customer')], 'Party Type', required=True)
@staticmethod @staticmethod
def default_company(): def default_company():
return Transaction().context.get('company') return Transaction().context.get('company')
@staticmethod @staticmethod
def default_party_type(): def default_party_type():
return 'out' return 'out'
class PrintBalanceSaleParty(Wizard): class PrintBalanceSaleParty(Wizard):
'Print Balance Sale Party' 'Print Balance Sale Party'
__name__ = 'optical_equipment.print_balance_sale_party' __name__ = 'optical_equipment.print_balance_sale_party'
start = StateView('optical_equipment.print_balance_sale_party.start', start = StateView(
'optical_equipment.print_balance_sale_party_start_view_form', [ 'optical_equipment.print_balance_sale_party.start',
Button('Cancel', 'end', 'tryton-cancel'), 'optical_equipment.print_balance_sale_party_start_view_form',
Button('Print', 'print_', 'tryton-print', default=True), [
]) Button('Cancel', 'end', 'tryton-cancel'),
Button('Print', 'print_', 'tryton-print', default=True),
],
)
print_ = StateReport('optical_equipment.balance_sale_party') print_ = StateReport('optical_equipment.balance_sale_party')
def default_start(self, fields): def default_start(self, fields):
if len(self.records) > 0: if len(self.records) > 0:
default = {'party': self.records[0].party.id} default = {'party': self.records[0].party.id}
else: else:
default = {'party': None} default = {'party': None}
@@ -58,7 +71,7 @@ class PrintBalanceSaleParty(Wizard):
def do_print_(self, action): def do_print_(self, action):
party = None party = None
party_type = None party_type = None
if self.start.party: if self.start.party:
party = self.start.party.id party = self.start.party.id
if self.start.party_type: if self.start.party_type:
@@ -68,8 +81,11 @@ class PrintBalanceSaleParty(Wizard):
'company': self.start.company.id, 'company': self.start.company.id,
'party': party, 'party': party,
'party_type': party_type, 'party_type': party_type,
'start_period': self.start.start_period.id if self.start.start_period else None, 'start_period': (
'end_period' : self.start.end_period.id if self.start.end_period else None self.start.start_period.id if self.start.start_period else None
),
'end_period':
self.start.end_period.id if self.start.end_period else None,
} }
return action, data return action, data
@@ -82,7 +98,8 @@ class BalanceSaleParty(Report):
@classmethod @classmethod
def get_context(cls, records, header, data): def get_context(cls, records, header, data):
report_context = super(BalanceSaleParty, cls).get_context(records, header, data) report_context = super(BalanceSaleParty, cls).get_context(
records, header, data)
pool = Pool() pool = Pool()
Company = pool.get('company.company') Company = pool.get('company.company')
Period = pool.get('account.period') Period = pool.get('account.period')
@@ -92,8 +109,8 @@ class BalanceSaleParty(Report):
end_period = None end_period = None
party = None party = None
company = Company(data['company']) company = Company(data['company'])
dom_sale = [('state', 'in', ["processing", "done"])] dom_sale = [('state', 'in', ['processing', 'done'])]
if data.get('party'): if data.get('party'):
party = data['party'] party = data['party']
dom_sale.append(('party', '=', party)) dom_sale.append(('party', '=', party))
@@ -105,12 +122,12 @@ class BalanceSaleParty(Report):
end_period = Period(data['end_period']) end_period = Period(data['end_period'])
dom_sale.append(('sale_date', '<=', end_period.start_date)) dom_sale.append(('sale_date', '<=', end_period.start_date))
sales = Sale.search(dom_sale, sales = Sale.search(
order=[('sale_date', 'DESC'), dom_sale,
('id', 'DESC')],) order=[('sale_date', 'DESC'), ('id', 'DESC')],
)
res = {} res = {}
dict_location = {}
id_ = party id_ = party
party_ = Party.search(['id', '=', party])[0] party_ = Party.search(['id', '=', party])[0]
@@ -124,18 +141,17 @@ class BalanceSaleParty(Report):
except IndexError: except IndexError:
pass pass
res[id_] = {'name': name, res[id_] = {'name': name, 'id_number': id_number, 'party': party_}
'id_number': id_number,
'party': party_ if (not sales):
} err = 'Este Tercero no Cuenta Con Ventas en Proceso ó Confirmadas.'
raise UserError(str(err))
res[id_]['sales'] = sales
if sales:
res[id_]['sales'] = sales
else:
raise UserError(str("Este Tercero no Cuenta Con Ventas en Proceso ó Confirmadas."))
report_context['records'] = res.values() report_context['records'] = res.values()
report_context['start_period'] = start_period.name if start_period else '*' report_context['start_period'] =\
start_period.name if start_period else '*'
report_context['end_period'] = end_period.name if end_period else '*' report_context['end_period'] = end_period.name if end_period else '*'
report_context['company'] = company report_context['company'] = company
@@ -143,5 +159,5 @@ class BalanceSaleParty(Report):
for sale in sales: for sale in sales:
residual_amount += sale.residual_amount residual_amount += sale.residual_amount
report_context['residual_amount'] = residual_amount report_context['residual_amount'] = residual_amount
return report_context return report_context

View File

@@ -1,8 +1,7 @@
# 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.
from trytond.model import ( from trytond.model import ModelSQL, ModelView, fields, sequence_ordered
Workflow, ModelSQL, ModelView, fields, sequence_ordered) from trytond.pyson import Eval, If
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 from trytond.transaction import Transaction
@@ -17,24 +16,28 @@ class Calibration(ModelSQL, ModelView):
_states = {'readonly': True} _states = {'readonly': True}
maintenance = fields.Many2One('optical_equipment.maintenance', "Maintenance", ondelete="CASCADE", maintenance = fields.Many2One(
required=True) 'optical_equipment.maintenance',
graph_dates = fields.Char("Graph Dates", readonly=True) 'Maintenance',
diopter = fields.Float("Diopter", states=_states) ondelete='CASCADE',
mean = fields.Float("Mean", states=_states) required=True,
dev_std = fields.Float("Standart Desviation", states=_states) )
uncertain_type_A = fields.Float("Uncertain Type A", states=_states) graph_dates = fields.Char('Graph Dates', readonly=True)
uncertain_pattern = fields.Float("Uncertain Pattern", states=_states) diopter = fields.Float('Diopter', states=_states)
k_c_calibration = fields.Float("K Crt Calibration", states=_states) mean = fields.Float('Mean', states=_states)
uncertain_U_b1 = fields.Float("U_b1", states=_states) dev_std = fields.Float('Standart Desviation', states=_states)
d_resolution = fields.Float("d_resolution", states=_states) uncertain_type_A = fields.Float('Uncertain Type A', states=_states)
uncertain_U_b2_dig = fields.Float("U_b2", states=_states) uncertain_pattern = fields.Float('Uncertain Pattern', states=_states)
uncertain_U_b2_ana = fields.Float("U_b2", states=_states) k_c_calibration = fields.Float('K Crt Calibration', states=_states)
uncertain_combinated = fields.Float("U_combinated", states=_states) uncertain_U_b1 = fields.Float('U_b1', states=_states)
uncertain_eff = fields.Float("U eff", states=_states) d_resolution = fields.Float('d_resolution', states=_states)
t_student = fields.Float("T Student", states=_states) uncertain_U_b2_dig = fields.Float('U_b2', states=_states)
uncertain_U_b2_ana = fields.Float('U_b2', states=_states)
uncertain_combinated = fields.Float('U_combinated', states=_states)
uncertain_eff = fields.Float('U eff', states=_states)
t_student = fields.Float('T Student', states=_states)
uncertain_expanded = fields.Float("Uexpand", _digits, states=_states) uncertain_expanded = fields.Float('Uexpand', _digits, states=_states)
state = fields.Char('State') state = fields.Char('State')
@@ -43,39 +46,53 @@ class CalibrationSample(sequence_ordered(), ModelView, ModelSQL):
'Samples of Calibration' 'Samples of Calibration'
__name__ = 'optical_equipment.maintenance.calibration_sample' __name__ = 'optical_equipment.maintenance.calibration_sample'
maintenance = fields.Many2One('optical_equipment.maintenance', 'Maintenance') maintenance = fields.Many2One(
product = fields.Function(fields.Integer("Product ID"), 'on_change_with_product') 'optical_equipment.maintenance', 'Maintenance')
number_sample = fields.Float("Sample #", _digits) product = fields.Function(fields.Integer(
value_patterns = fields.Many2One('optical_equipment.product_pattern', "Value Pattern", ondelete='RESTRICT', required=True, 'Product ID'), 'on_change_with_product')
domain=[('product', '=', Eval('product'))], number_sample = fields.Float('Sample #', _digits)
depends=['product']) value_patterns = fields.Many2One(
value_equipment = fields.Float("Value in Equipment", _digits, required=True, 'optical_equipment.product_pattern',
states={'readonly': Eval('value_patterns') is None}) 'Value Pattern',
mistake = fields.Float("Mistake", _digits) ondelete='RESTRICT',
mistake_rate = fields.Float("% Mistake", _digits, required=True,
states={'readonly': True}, domain=[('product', '=', Eval('product'))],
depends=['mistake']) depends=['product'],
)
value_equipment = fields.Float(
'Value in Equipment',
_digits,
required=True,
states={'readonly': Eval('value_patterns') is None},
)
mistake = fields.Float('Mistake', _digits)
mistake_rate = fields.Float(
'% Mistake', _digits, states={'readonly': True}, depends=['mistake']
)
@fields.depends('maintenance', '_parent_maintenance.equipment') @fields.depends('maintenance', '_parent_maintenance.equipment')
def on_change_with_product(self, name=None): def on_change_with_product(self, name=None):
if self.maintenance: if self.maintenance:
return self.maintenance.equipment.product.template.id return self.maintenance.equipment.product.template.id
@fields.depends('value_patterns', 'value_equipment', @fields.depends(
'mistake', 'mistake_rate') 'value_patterns', 'value_equipment', 'mistake', 'mistake_rate')
def on_change_value_equipment(self): def on_change_value_equipment(self):
if float(self.value_patterns.pattern) < 0: if self.value_patterns:
self.mistake = self.value_patterns.pattern - self.value_equipment pattern = self.value_patterns.pattern
else: if float(pattern) < 0:
if self.value_patterns.pattern > self.value_equipment: self.mistake = pattern - self.value_equipment
self.mistake = self.value_patterns.pattern - self.value_equipment
else: else:
self.mistake = -self.value_patterns.pattern + self.value_equipment if pattern > self.value_equipment:
self.mistake = pattern - self.value_equipment
else:
self.mistake = -pattern + self.value_equipment
if self.value_patterns.pattern == self.value_equipment: if pattern == self.value_equipment:
self.mistake_rate = 0 self.mistake_rate = 0
else: else:
self.mistake_rate = abs(self.mistake / self.value_patterns.pattern) * 100 self.mistake_rate = abs(
self.mistake / pattern) * 100
class CalibrationReport(CompanyReport): class CalibrationReport(CompanyReport):

View File

@@ -2,9 +2,11 @@
<!--This file file is part of Tryton. The COPYRIGHT file at the top level <!--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. --> of this repository contains the full copyright notices and license terms. -->
<tryton> <tryton>
<record model="ir.ui.view" id="employee_view_form"> <data>
<field name="model">company.employee</field> <record model="ir.ui.view" id="employee_view_form">
<field name="inherit" ref="company.employee_view_form"/> <field name="model">company.employee</field>
<field name="name">employee_form</field> <field name="inherit" ref="company.employee_view_form"/>
</record> <field name="name">employee_form</field>
</record>
</data>
</tryton> </tryton>

View File

@@ -1,52 +1,83 @@
from trytond.model import ( from trytond.model import ModelSingleton, ModelSQL, ModelView, fields
ModelSingleton, ModelSQL, ModelView, fields)
from trytond.pyson import Id, Eval from trytond.pyson import Id, Eval
class Configuration(ModelSingleton, ModelSQL, ModelView): class Configuration(ModelSingleton, ModelSQL, ModelView):
'Equipment Configuration' "Equipment Configuration"
__name__ = 'optical_equipment.configuration' __name__ = "optical_equipment.configuration"
technician_responsible = fields.Many2One(
'company.employee', "Technician Responsible")
invima = fields.Char('Invima', states={
'required': Eval('technician_responsible', True)
})
technician_signature = fields.Binary('Technician Signature')
equipment_sequence = fields.Many2One( equipment_sequence = fields.Many2One(
'ir.sequence', "Equipment Sequence", domain=[ "ir.sequence",
('sequence_type', '=', "Equipment Sequence",
Id('optical_equipment', 'sequence_type_equipment'))]) domain=[
("sequence_type", "=", Id(
"optical_equipment", "sequence_type_equipment"))
],
required=True
)
maintenance_sequence = fields.Many2One( maintenance_sequence = fields.Many2One(
'ir.sequence', "Maintenance Sequence", "ir.sequence",
domain=[('sequence_type', '=', "Maintenance Sequence",
Id('optical_equipment', 'sequence_type_maintenances'))]) domain=[
(
"sequence_type",
"=",
Id("optical_equipment", "sequence_type_maintenances"),
)
],
required=True
)
sale_quote_number = fields.Many2One(
"ir.sequence",
"Sale Quote Number",
domain=[("sequence_type", "=", Id("sale", "sequence_type_sale"))],
required=True
)
agended_sequence = fields.Many2One( agended_sequence = fields.Many2One(
'ir.sequence', "Agended Sequence", "ir.sequence",
domain=[('sequence_type', '=', "Agended Sequence",
Id('optical_equipment', 'sequence_type_agended'))]) domain=[
("sequence_type", "=", Id(
"optical_equipment", "sequence_type_agended"))
],
required=True
)
contract_sequence = fields.Many2One( contract_sequence = fields.Many2One(
'ir.sequence', "Contract Sequence", domain=[ "ir.sequence",
('sequence_type', '=', "Contract Sequence",
Id('optical_equipment', 'sequence_type_contract'))]) domain=[
temperature_min = fields.Float("Temp Min") ("sequence_type", "=", Id(
temperature_max = fields.Float("Temp Max") "optical_equipment", "sequence_type_contract"))
],
required=True
)
temperature_min = fields.Float("Temp Min", required=True)
temperature_max = fields.Float("Temp Max", required=True)
temperature_uom = fields.Many2One( temperature_uom = fields.Many2One(
'product.uom', 'Temperature UOM', "product.uom",
domain=[ "Temperature UOM", required=True,
('category', '=', Id( domain=[("category", "=", Id(
'optical_equipment', "uom_cat_temperature"))], "optical_equipment", "uom_cat_temperature"))],
depends={'itemperature_min'}) depends={"temperature_min"},
moisture_min = fields.Float("Moisture Min") )
moisture_max = fields.Float("Moisture Max") moisture_min = fields.Float("Moisture Min", required=True)
moisture_max = fields.Float("Moisture Max", required=True)
moisture_uom = fields.Many2One( moisture_uom = fields.Many2One(
'product.uom', "Moisture UOM", "product.uom",
"Moisture UOM",
required=True,
domain=[ domain=[
('category', '=', Id( ("category", "=", Id(
'optical_equipment', 'uom_cat_relative_humedity'))], "optical_equipment", "uom_cat_relative_humedity"))
depends={'moisture_min'}) ],
sale_quote_number = fields.Many2One('ir.sequence', "Sale Quote Number", depends={"moisture_min"},
domain=[ )
('sequence_type', '=', Id( technician_responsible = fields.Many2One(
'sale', 'sequence_type_sale')) "company.employee", "Technician Responsible",
]) required=True
)
invima = fields.Char(
"Invima", states={"required": Eval("technician_responsible", True)}
)
technician_signature = fields.Binary("Technician Signature",
required=True)

View File

@@ -1,19 +1,17 @@
from trytond.pool import Pool, PoolMeta from trytond.pool import Pool, PoolMeta
from trytond.model import ( from trytond.model import ModelSQL, ModelView, Workflow, fields
ModelSQL, ModelView, Workflow, fields)
from trytond.modules.company import CompanyReport from trytond.modules.company import CompanyReport
from trytond.pyson import Eval, If, Bool from trytond.pyson import Eval, If, Bool
from trytond.modules.company.model import set_employee
from trytond.exceptions import UserError from trytond.exceptions import UserError
from trytond.transaction import Transaction from trytond.transaction import Transaction
from trytond.wizard import ( from trytond.wizard import Button, StateAction, StateView, Wizard
Button, StateAction, StateTransition, StateView, Wizard)
from trytond.modules.currency.fields import Monetary from trytond.modules.currency.fields import Monetary
from trytond.modules.product import price_digits from trytond.modules.product import price_digits
import datetime import datetime
from datetime import timedelta, date from datetime import timedelta, date
from trytond.i18n import gettext
class Cron(metaclass=PoolMeta): class Cron(metaclass=PoolMeta):
@@ -22,9 +20,10 @@ class Cron(metaclass=PoolMeta):
@classmethod @classmethod
def __setup__(cls): def __setup__(cls):
super().__setup__() super().__setup__()
cls.method.selection.append( cls.method.selection.append((
('optical_equipment.contract|contract_expiration', 'Contract Expiration'), 'optical_equipment.contract|contract_expiration',
) 'Contract Expiration'
))
class Contract(Workflow, ModelSQL, ModelView): class Contract(Workflow, ModelSQL, ModelView):
@@ -34,63 +33,112 @@ class Contract(Workflow, ModelSQL, ModelView):
_order_name = 'number' _order_name = 'number'
company = fields.Many2One( company = fields.Many2One(
'company.company', "Company", required=True, 'company.company',
'Company',
required=True,
states={ states={
'readonly': (Eval('state') != 'draft') | Eval('party', True), 'readonly': (Eval('state') != 'draft') | Eval('party', True),
}, help="Make the subscription belong to the company.") },
help='Make the subscription belong to the company.',
)
number = fields.Char( number = fields.Char(
"Number", readonly=True, 'Number', readonly=True,
help="The main identification of the subscription.") help='The main identification of the subscription.'
)
reference = fields.Char( reference = fields.Char(
"Reference", 'Reference',
help="The identification of an external origin.") help='The identification of an external origin.'
description = fields.Char("Description", )
states={ description = fields.Char(
'readonly': Eval('state') != 'draft', 'Description',
}) states={
'readonly': Eval('state') != 'draft',
},
)
party = fields.Many2One( party = fields.Many2One(
'party.party', "Party", required=True, 'party.party',
'Party',
required=True,
states={ states={
'readonly': (Eval('state') != 'draft') | Eval('party', True), 'readonly': (Eval('state') != 'draft') | Eval('party', True),
}, help="The party who subscribes.") },
equipment = fields.Many2One('optical_equipment.equipment', "Equipment") help='The party who subscribes.',
contact = fields.Many2One('party.contact_mechanism', "Contact", required=True) )
invoice_address = fields.Many2One('party.address', 'Invoice Address', equipment = fields.Many2One('optical_equipment.equipment', 'Equipment')
required=True, domain=[('party', '=', Eval('party'))], contact = fields.Many2One(
states={ 'party.contact_mechanism', 'Contact', required=True)
'readonly': (Eval('state') != 'draft') | Eval('party', True), invoice_address = fields.Many2One(
}) 'party.address',
start_date = fields.Date("Start Date", required=True,) 'Invoice Address',
end_date = fields.Date("End Date", required=True,
domain=['OR', domain=[('party', '=', Eval('party'))],
('end_date', '>=', If( states={
Bool(Eval('start_date')), 'readonly': (Eval('state') != 'draft') | Eval('party', True),
Eval('start_date', datetime.date.min), },
datetime.date.min)), )
('end_date', '=', None), start_date = fields.Date(
], 'Start Date',
states={ required=True,
'readonly': Eval('state') != 'draft', )
}) end_date = fields.Date(
'End Date',
domain=[
'OR',
(
'end_date',
'>=',
If(
Bool(Eval('start_date')),
Eval('start_date', datetime.date.min),
datetime.date.min,
),
),
('end_date', '=', None),
],
states={
'readonly': Eval('state') != 'draft',
},
)
maintenance_services = fields.Many2Many('optical_equipment_maintenance.service-equipment.contract', maintenance_services = fields.Many2Many(
'contract', 'maintenance_services', "Prorogues", 'optical_equipment_maintenance.service-equipment.contract',
states={'readonly': Eval('state') != 'draft'}) 'contract',
'maintenance_services',
'Prorogues',
states={'readonly': Eval('state') != 'draft'},
)
current_equipments = fields.Many2Many('optical_equipment.contract-optical_equipment.equipment', current_equipments = fields.Many2Many(
'contract', 'equipment', "Current Equipments", 'optical_equipment.contract-optical_equipment.equipment',
states={'readonly': Eval('state') != 'draft'}) 'contract',
history_equipments = fields.One2Many('optical_equipment.equipment', 'contract', "Equipments", 'equipment',
states={'readonly': Eval('state') != 'draft'}) 'Current Equipments',
price_contract = Monetary("Price Contract", digits=price_digits, currency='currency', required=True, states={'readonly': Eval('state') != 'draft'},
states={'readonly': Eval('state') != 'draft'}) )
state = fields.Selection([ history_equipments = fields.One2Many(
('draft', "Draft"), 'optical_equipment.equipment',
('running', "Running"), 'contract',
('closed', "Closed"), 'Equipments',
('cancelled', "Cancelled"), states={'readonly': Eval('state') != 'draft'},
], "State", readonly=True, required=False, sort=False, )
help="The current state of the subscription.") currency = fields.Many2One('currency.currency', 'Currency', required=True)
price_contract = Monetary(
'Price Contract',
digits=price_digits,
required=True,
states={'readonly': Eval('state') != 'draft'},
)
state = fields.Selection(
[('draft', 'Draft'),
('running', 'Running'),
('closed', 'Closed'),
('cancelled', 'Cancelled')],
'State',
readonly=True,
required=False,
sort=False,
help='The current state of the subscription.',
)
@classmethod @classmethod
def __setup__(cls): def __setup__(cls):
@@ -99,19 +147,33 @@ class Contract(Workflow, ModelSQL, ModelView):
('number', 'DESC NULLS FIRST'), ('number', 'DESC NULLS FIRST'),
('id', 'DESC'), ('id', 'DESC'),
] ]
cls._transitions = ({ cls._transitions = {
('draft', 'running'), ('draft', 'running'),
('running', 'draft'), ('running', 'draft'),
('running', 'closed'), ('running', 'closed'),
('running', 'cancelled'), ('running', 'cancelled'),
('cancelled', 'draft') ('cancelled', 'draft'),
}) }
cls._buttons.update({ cls._buttons.update(
'draft': {'invisible': Eval('state').in_(['draft', 'closed'])}, {
'running': {'invisible': Eval('state').in_(['cancelled', 'running'])}, 'draft': {
'closed': {'invisible': Eval('state').in_(['draft', 'cancelled'])}, 'invisible':
'cancelled': {'invisible': Eval('state').in_(['draft', 'cancelled'])} Eval('state').in_(['draft', 'closed'])
}) },
'running': {
'invisible':
Eval('state').in_(['cancelled', 'running'])
},
'closed': {
'invisible':
Eval('state').in_(['draft', 'cancelled'])
},
'cancelled': {
'invisible':
Eval('state').in_(['draft', 'cancelled'])
},
}
)
@staticmethod @staticmethod
def default_company(): def default_company():
@@ -135,15 +197,14 @@ class Contract(Workflow, ModelSQL, ModelView):
except UserError: except UserError:
raise UserError(str('Validation Error')) raise UserError(str('Validation Error'))
else: else:
raise UserError(gettext('optical_equipment.msg_not_sequence_equipment')) raise UserError(
gettext('optical_equipment.msg_not_sequence_equipment'))
@classmethod @classmethod
def contract_expiration(cls): def contract_expiration(cls):
pool = Pool() contracts_to_expire = cls.search(
Contracts = pool.get('optical_equipment.contract') [('state', '=', 'running'), ('end_date', '<=', date.today())]
)
contracts_to_expire = cls.search([('state', '=', 'running'),
('end_date', '<=', date.today())])
if contracts_to_expire != []: if contracts_to_expire != []:
for contract in contracts_to_expire: for contract in contracts_to_expire:
@@ -155,7 +216,7 @@ class Contract(Workflow, ModelSQL, ModelView):
def draft(cls, contracts): def draft(cls, contracts):
contract = contracts[0] contract = contracts[0]
for equipment in contract.current_equipments: for equipment in contract.current_equipments:
equipment.state = "uncontrated" equipment.state = 'uncontrated'
equipment.contract_history += (contract.id,) equipment.contract_history += (contract.id,)
equipment.save() equipment.save()
contract.save() contract.save()
@@ -166,7 +227,7 @@ class Contract(Workflow, ModelSQL, ModelView):
def closed(cls, contracts): def closed(cls, contracts):
contract = contracts[0] contract = contracts[0]
for equipment in contract.current_equipments: for equipment in contract.current_equipments:
equipment.state = "uncontrated" equipment.state = 'uncontrated'
equipment.save() equipment.save()
@classmethod @classmethod
@@ -175,7 +236,7 @@ class Contract(Workflow, ModelSQL, ModelView):
def running(cls, contracts): def running(cls, contracts):
contract = contracts[0] contract = contracts[0]
for equipment in contract.current_equipments: for equipment in contract.current_equipments:
equipment.state = "contrated" equipment.state = 'contrated'
equipment.contract_history += (contract.id,) equipment.contract_history += (contract.id,)
equipment.save() equipment.save()
@@ -189,7 +250,7 @@ class Contract(Workflow, ModelSQL, ModelView):
def cancelled(cls, contracts): def cancelled(cls, contracts):
contract = contracts[0] contract = contracts[0]
for equipment in contract.current_equipments: for equipment in contract.current_equipments:
equipment.state = "uncontrated" equipment.state = 'uncontrated'
equipment.save() equipment.save()
@@ -198,16 +259,24 @@ class ContractMaintenanceServices(ModelSQL):
__name__ = 'optical_equipment_maintenance.service-equipment.contract' __name__ = 'optical_equipment_maintenance.service-equipment.contract'
maintenance_services = fields.Many2One( maintenance_services = fields.Many2One(
'optical_equipment_maintenance.service', "Maintenance Service", ) 'optical_equipment_maintenance.service',
contract = fields.Many2One('optical_equipment.contract', "Contract") 'Maintenance Service',
)
contract = fields.Many2One('optical_equipment.contract', 'Contract')
class ContractEquipment(ModelSQL): class ContractEquipment(ModelSQL):
'Optical Equipment - Contract' 'Optical Equipment - Contract'
__name__ = 'optical_equipment.contract-optical_equipment.equipment' __name__ = 'optical_equipment.contract-optical_equipment.equipment'
equipment = fields.Many2One('optical_equipment.equipment', 'Equipment', ) equipment = fields.Many2One(
contract = fields.Many2One('optical_equipment.contract', 'Contract', ) 'optical_equipment.equipment',
'Equipment',
)
contract = fields.Many2One(
'optical_equipment.contract',
'Contract',
)
class ContractReport(CompanyReport): class ContractReport(CompanyReport):
@@ -234,33 +303,52 @@ class CreateContractInitial(ModelView, ModelSQL):
currency = fields.Many2One('currency.currency', 'Currency', required=True) currency = fields.Many2One('currency.currency', 'Currency', required=True)
company = fields.Many2One( company = fields.Many2One(
'company.company', "Company", readonly=True, required=True, 'company.company',
states={ 'Company',
'readonly': (Eval('state') != 'draft') | Eval('party', True), readonly=True,
}, help="Make the subscription belong to the company.") required=True,
help='Make the subscription belong to the company.',
)
party = fields.Many2One( party = fields.Many2One(
'party.party', "Party", required=True, 'party.party', 'Party', required=True, help='The party who subscribes.'
help="The party who subscribes.") )
invoice_address = fields.Many2One('party.address', 'Invoice Address', invoice_address = fields.Many2One(
required=True, domain=[('party', '=', Eval('party'))]) 'party.address',
payment_term = fields.Many2One('account.invoice.payment_term', 'Invoice Address',
'Payment Term') required=True,
domain=[('party', '=', Eval('party'))],
)
payment_term = fields.Many2One(
'account.invoice.payment_term', 'Payment Term')
contact = fields.Many2One( contact = fields.Many2One(
'party.contact_mechanism', "Contact", required=True, 'party.contact_mechanism',
'Contact',
required=True,
domain=[('party', '=', Eval('party'))], domain=[('party', '=', Eval('party'))],
context={ context={
'company': Eval('company', -1), 'company': Eval('company', -1),
}) },
start_date = fields.Date("Start Date", required=True) )
end_date = fields.Date("End Date", start_date = fields.Date('Start Date', required=True)
domain=['OR', end_date = fields.Date(
('end_date', '>=', If( 'End Date',
Bool(Eval('start_date')), domain=[
Eval('start_date', datetime.date.min), 'OR',
datetime.date.min)), (
('end_date', '=', None), 'end_date',
]) '>=',
unit_price = Monetary("Unit Price", digits=price_digits, currency='currency', required=True) If(
Bool(Eval('start_date')),
Eval('start_date', datetime.date.min),
datetime.date.min,
),
),
('end_date', '=', None),
],
)
unit_price = Monetary(
'Unit Price', digits=price_digits, currency='currency', required=True
)
@staticmethod @staticmethod
def default_company(): def default_company():
@@ -285,7 +373,7 @@ class CreateContractInitial(ModelView, ModelSQL):
Date = pool.get('ir.date') Date = pool.get('ir.date')
if self.party: if self.party:
self.invoice_address = self.party.address_get(type='invoice') self.invoice_address = self.party.address_get(type='invoice')
if self.party.customer_type == "ips": if self.party.customer_type == 'ips':
self.end_date = Date.today() + timedelta(days=182) self.end_date = Date.today() + timedelta(days=182)
else: else:
self.end_date = Date.today() + timedelta(days=365) self.end_date = Date.today() + timedelta(days=365)
@@ -294,21 +382,27 @@ class CreateContractInitial(ModelView, ModelSQL):
class CreateContract(Wizard): class CreateContract(Wizard):
__name__ = 'optical_equipment.maintenance.contract' __name__ = 'optical_equipment.maintenance.contract'
start = StateView('optical_equipment_create.contract', start = StateView(
'optical_equipment.create_contract_view_form', [ 'optical_equipment_create.contract',
Button('Cancel', 'end', 'tryton-cancel'), 'optical_equipment.create_contract_view_form',
Button('Create', 'create_contract', 'tryton-ok', default=True), [
]) Button('Cancel', 'end', 'tryton-cancel'),
Button('Create', 'create_contract', 'tryton-ok', default=True),
],
)
create_contract = StateAction('optical_equipment.act_contract_form') create_contract = StateAction('optical_equipment.act_contract_form')
def default_start(self, fields): def default_start(self, fields):
if self.record: if self.record:
default = {'party': self.record.propietary.id, default = {
'invoice_address': self.record.propietary_address.id, 'party': self.record.propietary.id,
'unit_price': (self.record.sale_origin.amount 'invoice_address': self.record.propietary_address.id,
if self.record.sale_origin.__name__ == "sale.line" 'unit_price': (
else self.record.sale_origin.total_amount), self.record.sale_origin.amount
} if self.record.sale_origin.__name__ == 'sale.line'
else self.record.sale_origin.total_amount
),
}
return default return default
@property @property
@@ -319,7 +413,7 @@ class CreateContract(Wizard):
start_date=self.start.start_date, start_date=self.start.start_date,
end_date=self.start.end_date, end_date=self.start.end_date,
invoice_address=self.start.invoice_address, invoice_address=self.start.invoice_address,
unit_price=self.start.unit_price unit_price=self.start.unit_price,
) )
def do_create_contract(self, action): def do_create_contract(self, action):
@@ -346,15 +440,15 @@ class CreateContract(Wizard):
contract.state = 'draft' contract.state = 'draft'
contract.price_contract = dates['unit_price'] contract.price_contract = dates['unit_price']
else: else:
contract = Contract(party=dates['party'], contract = Contract(
invoice_address=dates['invoice_address'], party=dates['party'],
contact=dates['contact'], invoice_address=dates['invoice_address'],
start_date=dates['start_date'], contact=dates['contact'],
end_date=dates['end_date'], start_date=dates['start_date'],
maintenance_services=prorogues, end_date=dates['end_date'],
current_equipments=equipments, maintenance_services=prorogues,
state='draft', current_equipments=equipments,
price_contract=dates['unit_price'] state='draft',
) price_contract=dates['unit_price'],
)
contract.save() contract.save()

View File

@@ -144,16 +144,24 @@
<field name="model">optical_equipment.contract,-1</field> <field name="model">optical_equipment.contract,-1</field>
<field name="action" ref="report_prorrogation"/> <field name="action" ref="report_prorrogation"/>
</record> </record>
<record model="ir.ui.icon" id="optical_equipment_contract_icon">
<field name="name">equipment_contract</field>
<field name="path">icons/file-contract-solid.svg</field>
</record>
<menuitem <menuitem
parent="menu_equipment" parent="menu_equipment"
name="Contracts Management" name="Contracts Management"
sequence="50" sequence="50"
id="menu_contracts"/> id="menu_contracts"
icon="equipment_contract"/>
<menuitem <menuitem
parent="menu_contracts" parent="menu_contracts"
action="act_contract_form" action="act_contract_form"
sequence="30" sequence="30"
id="menu_contract_form"/> id="menu_contract_form"
icon="equipment_contract"/>
<record model="ir.cron" id="cron_fe_delivery"> <record model="ir.cron" id="cron_fe_delivery">
<field name="method">optical_equipment.contract|contract_expiration</field> <field name="method">optical_equipment.contract|contract_expiration</field>
<field name="interval_number" eval="1"/> <field name="interval_number" eval="1"/>

View File

@@ -94,13 +94,19 @@
<field name="name">Agended</field> <field name="name">Agended</field>
<field name="sequence_type" ref="sequence_type_agended"/> <field name="sequence_type" ref="sequence_type_agended"/>
</record> </record>
<record model="ir.ui.icon" id="optical_equipment_schedule_icon">
<field name="name">equipment_schedule</field>
<field name="path">icons/calendar-days-solid.svg</field>
</record>
<menuitem parent="menu_equipment" <menuitem parent="menu_equipment"
name="Diary" name="Diary"
sequence="10" sequence="10"
id="menu_diary"/> id="menu_diary"
icon="equipment_schedule"/>
<menuitem parent="menu_diary" <menuitem parent="menu_diary"
action="act_agended_list_form" action="act_agended_list_form"
sequence="20" sequence="20"
id="menu_agended_list_form"/> id="menu_agended_list_form"
icon="equipment_schedule"/>
</data> </data>
</tryton> </tryton>

View File

@@ -1,23 +1,19 @@
# 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.
import datetime
from collections import defaultdict
from trytond.pool import Pool from trytond.pool import Pool
from trytond.model import ( from trytond.model import \
DeactivableMixin, Workflow, ModelSQL, ModelView, Unique, fields) DeactivableMixin, Workflow, ModelSQL, ModelView, fields
from trytond.pyson import Eval, If from trytond.pyson import Eval
from trytond.transaction import Transaction from trytond.transaction import Transaction
from trytond.i18n import gettext from trytond.i18n import gettext
from trytond.exceptions import UserError from trytond.exceptions import UserError
from trytond.model.exceptions import AccessError from trytond.model.exceptions import AccessError
from trytond.wizard import ( from trytond.wizard import Button, StateAction, StateView, Wizard
Button, StateAction, StateTransition, StateView, Wizard)
from trytond.modules.company import CompanyReport from trytond.modules.company import CompanyReport
_MAINTENANCE_FREQUENCY = [("none", ''), _MAINTENANCE_FREQUENCY = [
("6", 'Seis Meses'), ('none', ''), ('6', 'Seis Meses'), ('12', 'Doce Meses')]
("12", 'Doce Meses')]
class OpticalEquipment(DeactivableMixin, Workflow, ModelSQL, ModelView): class OpticalEquipment(DeactivableMixin, Workflow, ModelSQL, ModelView):
@@ -30,104 +26,162 @@ class OpticalEquipment(DeactivableMixin, Workflow, ModelSQL, ModelView):
'readonly': Eval('state') != 'draft', 'readonly': Eval('state') != 'draft',
} }
_states_product = {'readonly': Eval('product', True)}
_depends = ['state'] _depends = ['state']
_states_serial = { _states_serial = {
'readonly': Eval('state') != 'draft', 'readonly': Eval('state') != 'draft',
} }
code = fields.Char( code = fields.Char('Code', states={'readonly': True})
"Code", states={'readonly': True})
state = fields.Selection([('draft', "Draft"), state = fields.Selection(
('registred', "Registred"), [
('uncontrated', "UnContrated"), ('draft', 'Draft'),
('contrated', "Contrated") ('registred', 'Registred'),
], "State", ('uncontrated', 'UnContrated'),
required=True, readonly=True, sort=False) ('contrated', 'Contrated'),
],
'State',
required=True,
readonly=True,
sort=False,
)
company = fields.Many2One('company.company', "Company", readonly=True) company = fields.Many2One('company.company', 'Company', readonly=True)
contract = fields.Many2One('optical_equipment.contract', "Contract", ondelete='CASCADE') contract = fields.Many2One(
location = fields.Many2One('stock.location', "Location", 'optical_equipment.contract', 'Contract', ondelete='CASCADE'
states=_states,) )
propietary = fields.Many2One('party.party', "Propietary", required=True, location = fields.Many2One(
states=_states,) 'stock.location',
propietary_address = fields.Many2One('party.address', "Propietary Address", required=True, 'Location',
domain=[('party', '=', Eval('propietary'))], states=_states,
states=_states )
) propietary = fields.Many2One(
'party.party',
'Propietary',
required=True,
states=_states,
)
propietary_address = fields.Many2One(
'party.address',
'Propietary Address',
required=True,
domain=[('party', '=', Eval('propietary'))],
states=_states,
)
propietarys = fields.Many2Many( propietarys = fields.Many2Many(
'optical_equipment.equipment-party.party', 'optical_equipment.equipment-party.party',
'equipment', 'equipment', 'party', 'Propietarys'
'party', )
"Propietarys") product = fields.Many2One(
product = fields.Many2One('product.product', "Product", 'product.product',
domain=[('equipment', '=', True)], 'Product',
states=_states, domain=[('equipment', '=', True)],
depends=['equipment'] states=_states,
) )
refurbish = fields.Boolean("Refurbish", refurbish = fields.Boolean(
states=_states,) 'Refurbish',
equipment_type = fields.Char('type', states={'readonly': If('product', True)}) states=_states,
risk = fields.Char('Type risk', states={'readonly': If('product', True)}) )
use = fields.Char('Use', states={'readonly': If('product', True)}) equipment_type = fields.Char('type', states=_states_product)
biomedical_class = fields.Char('Biomedical Class', states={'readonly': If('product', True)}) risk = fields.Char('Type risk', states=_states_product)
main_tecnology = fields.Char('Main tecnology', states={'readonly': If('product', True)}) use = fields.Char('Use', states=_states_product)
calibration = fields.Boolean("Apply calibration", states={'readonly': If('product', True)}) biomedical_class = fields.Char('Biomedical Class', states=_states_product)
mark_category = fields.Many2One('product.category', 'Mark', required=True, main_tecnology = fields.Char('Main tecnology', states=_states_product)
domain=[('parent', '=', None), calibration = fields.Boolean('Apply calibration', states=_states_product)
('accounting', '=', False)], mark_category = fields.Many2One(
states=_states 'product.category',
) 'Mark',
model_category = fields.Many2One('product.category', "Model", required=True, required=True,
domain=[('parent', '=', Eval('mark_category')), domain=[('parent', '=', None), ('accounting', '=', False)],
('accounting', '=', False)], states=_states,
states=_states,) )
reference_category = fields.Many2One('product.category', "Reference", model_category = fields.Many2One(
domain=[('parent', '=', Eval('model_category'))], 'product.category',
states=_states, 'Model',
depends=['model_category'] required=True,
) domain=[('parent', '=', Eval('mark_category')),
origin_country = fields.Many2One('country.country', "Origin Country", ('accounting', '=', False)],
states=_states,) states=_states,
)
reference_category = fields.Many2One(
'product.category',
'Reference',
domain=[('parent', '=', Eval('model_category'))],
states=_states,
depends=['model_category'],
)
origin_country = fields.Many2One(
'country.country',
'Origin Country',
states=_states,
)
software_version = fields.Char("Software version", size=None, software_version = fields.Char(
states=_states,) 'Software version',
useful_life = fields.Integer("Useful life", size=None,
states=_states,) states=_states,
warranty = fields.Integer("Warranty", )
states=_states,) useful_life = fields.Integer(
serial = fields.Char("Serial", size=None, 'Useful life',
states=_states_serial, states=_states,
depends=_depends) )
health_register = fields.Char("Health Register", size=None, warranty = fields.Integer(
states=_states,) 'Warranty',
states=_states,
)
serial = fields.Char('Serial', size=None,
states=_states_serial, depends=_depends)
health_register = fields.Char(
'Health Register',
size=None,
states=_states,
)
# contract_history = # contract_history =
# fields.Many2Many('optical_equipment.contract-optical_equipment.equipment', # fields.Many2Many('optical_equipment.contract-optical_equipment.equipment',
# 'equipment','contract', "Contracts", states={'readonly': True}) # 'equipment','contract', 'Contracts', states={'readonly': True})
contract_history = fields.Function( contract_history = fields.Function(
fields.One2Many( fields.One2Many('optical_equipment.contract',
'optical_equipment.contract', 'equipment', 'Contracts'),
'equipment', 'get_contracts_of_equipment',
"Contracts"), )
'get_contracts_of_equipment')
maintenance_history = fields.Function( maintenance_history = fields.Function(
fields.Many2Many('optical_equipment.maintenance-optical_equipment.equipment', fields.Many2Many(
'equipment', 'maintenance', "Maintenances"), 'get_maintenances_of_equipment') 'optical_equipment.maintenance-optical_equipment.equipment',
software_version = fields.Char("Software version", size=None, 'equipment',
states=_states,) 'maintenance',
'Maintenances',
),
'get_maintenances_of_equipment',
)
software_version = fields.Char(
'Software version',
size=None,
states=_states,
)
maintenance_frequency = fields.Selection(_MAINTENANCE_FREQUENCY, "Maintenance Frequency", maintenance_frequency = fields.Selection(
depends=['propietary']) _MAINTENANCE_FREQUENCY, 'Maintenance Frequency',
purchase_origin = fields.Reference("Purchase Origin", selection='get_origin', depends=['propietary']
states={'readonly': True}) )
sale_destination = fields.Reference("Sale Destination", selection='get_destination', purchase_origin = fields.Reference(
states={'readonly': True}) 'Purchase Origin',
shipment_destination = fields.Reference("Stock Move", selection='get_shipment', selection='get_origin', states={'readonly': True}
states={'readonly': True}) )
rec_name = fields.Function(fields.Char("rec_name"), 'get_rec_name') sale_destination = fields.Reference(
'Sale Destination',
selection='get_destination', states={'readonly': True}
)
shipment_destination = fields.Reference(
'Stock Move', selection='get_shipment', states={'readonly': True}
)
rec_name = fields.Function(fields.Char('rec_name'), 'get_rec_name')
technician_responsible = fields.Function(fields.Char('Technician Responsible'), 'get_technical') technician_responsible = fields.Function(
fields.Char('Technician Responsible'), 'get_technical'
)
invima = fields.Function(fields.Char('Invima'), 'get_invima') invima = fields.Function(fields.Char('Invima'), 'get_invima')
del _states_serial, _states, _depends del _states_serial, _states, _depends
@@ -148,13 +202,14 @@ class OpticalEquipment(DeactivableMixin, Workflow, ModelSQL, ModelView):
if config.technician_responsible.invima: if config.technician_responsible.invima:
return config.technician_responsible.invima return config.technician_responsible.invima
@ fields.depends('product', 'serial', 'code') @fields.depends('product', 'serial', 'code')
def get_rec_name(self, name): def get_rec_name(self, name):
name = str(self.product.name) + '@' + str(self.serial) + '/' + str(self.code) name = str(self.product.name) + '@' + \
str(self.serial) + '/' + str(self.code)
return name return name
@ staticmethod @staticmethod
def _get_shipment(): def _get_shipment():
'Return list of Model names for shipment Reference' 'Return list of Model names for shipment Reference'
return [ return [
@@ -165,7 +220,7 @@ class OpticalEquipment(DeactivableMixin, Workflow, ModelSQL, ModelView):
'stock.shipment.internal', 'stock.shipment.internal',
] ]
@ classmethod @classmethod
def get_shipment(cls): def get_shipment(cls):
IrModel = Pool().get('ir.model') IrModel = Pool().get('ir.model')
get_name = IrModel.get_name get_name = IrModel.get_name
@@ -173,7 +228,7 @@ class OpticalEquipment(DeactivableMixin, Workflow, ModelSQL, ModelView):
return [(None, '')] + [(m, get_name(m)) for m in models] return [(None, '')] + [(m, get_name(m)) for m in models]
@ classmethod @classmethod
def _get_origin(cls): def _get_origin(cls):
'Return list of Model names for origin Reference' 'Return list of Model names for origin Reference'
pool = Pool() pool = Pool()
@@ -181,7 +236,7 @@ class OpticalEquipment(DeactivableMixin, Workflow, ModelSQL, ModelView):
return [Purchase.__name__] return [Purchase.__name__]
@ classmethod @classmethod
def get_origin(cls): def get_origin(cls):
Model = Pool().get('ir.model') Model = Pool().get('ir.model')
get_name = Model.get_name get_name = Model.get_name
@@ -189,7 +244,7 @@ class OpticalEquipment(DeactivableMixin, Workflow, ModelSQL, ModelView):
return [(None, '')] + [(m, get_name(m)) for m in models] return [(None, '')] + [(m, get_name(m)) for m in models]
@ classmethod @classmethod
def _get_destination(cls): def _get_destination(cls):
'Return list of Model names for origin Reference' 'Return list of Model names for origin Reference'
pool = Pool() pool = Pool()
@@ -197,7 +252,7 @@ class OpticalEquipment(DeactivableMixin, Workflow, ModelSQL, ModelView):
return [Sale.__name__] return [Sale.__name__]
@ classmethod @classmethod
def get_destination(cls): def get_destination(cls):
Model = Pool().get('ir.model') Model = Pool().get('ir.model')
get_name = Model.get_name get_name = Model.get_name
@@ -205,23 +260,27 @@ class OpticalEquipment(DeactivableMixin, Workflow, ModelSQL, ModelView):
return [(None, '')] + [(m, get_name(m)) for m in models] return [(None, '')] + [(m, get_name(m)) for m in models]
@ classmethod @classmethod
def __setup__(cls): def __setup__(cls):
super(OpticalEquipment, cls).__setup__() super(OpticalEquipment, cls).__setup__()
cls._transitions = ({ cls._transitions = {
('draft', 'registred'), ('draft', 'registred'),
('registred', 'draft'), ('registred', 'draft'),
('registred', 'uncontrated'), ('registred', 'uncontrated'),
('uncontrated', 'contrated'), ('uncontrated', 'contrated'),
}) }
cls._buttons.update({ cls._buttons.update(
'draft': { {
'invisible': Eval('state') != 'registred'}, 'draft': {'invisible': Eval('state') != 'registred'},
'registred': { 'registred': {
'invisible': Eval('state').in_(['registred', 'uncontrated', 'contrated'])}} 'invisible': Eval('state').in_(
['registred', 'uncontrated', 'contrated']
)
},
}
) )
@ classmethod @classmethod
def set_code(cls, equipments): def set_code(cls, equipments):
pool = Pool() pool = Pool()
Config = pool.get('optical_equipment.configuration') Config = pool.get('optical_equipment.configuration')
@@ -236,7 +295,8 @@ class OpticalEquipment(DeactivableMixin, Workflow, ModelSQL, ModelView):
except UserError: except UserError:
raise UserError(str('Validation Error')) raise UserError(str('Validation Error'))
else: else:
raise UserError(gettext('optical_equipment.msg_not_sequence_equipment')) raise UserError(
gettext('optical_equipment.msg_not_sequence_equipment'))
def get_contracts_of_equipment(self, records): def get_contracts_of_equipment(self, records):
pool = Pool() pool = Pool()
@@ -244,7 +304,9 @@ class OpticalEquipment(DeactivableMixin, Workflow, ModelSQL, ModelView):
contractsEquipment = set() contractsEquipment = set()
contractsEquipment = ContractsEquipment.search( contractsEquipment = ContractsEquipment.search(
[('party', '=', self.propietary), ('history_equipments', 'in', [self.id])]) [('party', '=', self.propietary),
('history_equipments', 'in', [self.id])]
)
contracts = [] contracts = []
for key in contractsEquipment: for key in contractsEquipment:
@@ -257,7 +319,9 @@ class OpticalEquipment(DeactivableMixin, Workflow, ModelSQL, ModelView):
MaintenancesEquipment = pool.get('optical_equipment.maintenance') MaintenancesEquipment = pool.get('optical_equipment.maintenance')
maintenancesEquipment = set() maintenancesEquipment = set()
maintenancesEquipment = MaintenancesEquipment.search(['equipment', '=', self.id]) maintenancesEquipment = MaintenancesEquipment.search(
['equipment', '=', self.id]
)
maintenances = [] maintenances = []
for key in maintenancesEquipment: for key in maintenancesEquipment:
@@ -272,27 +336,27 @@ class OpticalEquipment(DeactivableMixin, Workflow, ModelSQL, ModelView):
if config.technician_signature: if config.technician_signature:
return config.technician_signature return config.technician_signature
@ classmethod @classmethod
def default_state(cls): def default_state(cls):
return 'draft' return 'draft'
@ staticmethod @staticmethod
def default_company(): def default_company():
return Transaction().context.get('company') return Transaction().context.get('company')
@ fields.depends('propietary', 'maintenance_frequency') @fields.depends('propietary', 'maintenance_frequency')
def on_change_propietary(self): def on_change_propietary(self):
if self.propietary: if self.propietary:
if self.propietary.customer_type == 'ips': if self.propietary.customer_type == 'ips':
self.maintenance_frequency = "6" self.maintenance_frequency = '6'
else: else:
self.maintenance_frequency = "12" self.maintenance_frequency = '12'
else: else:
self.maintenance_frequency = "none" self.maintenance_frequency = 'none'
@ fields.depends('product', 'equipment_type', 'use', @fields.depends('product', 'equipment_type',
'biomedical_class', 'calibration', 'use', 'biomedical_class', 'calibration',
'mark_category', 'model_category') 'mark_category', 'model_category')
def on_change_product(self): def on_change_product(self):
if self.product: if self.product:
self.equipment_type = self.product.equipment_type self.equipment_type = self.product.equipment_type
@@ -302,9 +366,13 @@ class OpticalEquipment(DeactivableMixin, Workflow, ModelSQL, ModelView):
self.mark_category = self.product.mark_category self.mark_category = self.product.mark_category
self.model_category = self.product.model_category self.model_category = self.product.model_category
self.reference_category = self.product.reference_category self.reference_category = self.product.reference_category
self.useful_life = self.product.useful_life if self.product.useful_life else int(0) self.useful_life = (
self.product.useful_life if self.product.useful_life else int(
0)
)
self.calibration = True if self.product.calibration else False self.calibration = True if self.product.calibration else False
self.warranty = self.product.warranty if self.product.warranty else int(0) self.warranty =\
self.product.warranty if self.product.warranty else int(0)
self.risk = self.product.risk self.risk = self.product.risk
self.origin_country = self.product.origin_country self.origin_country = self.product.origin_country
self.use = self.product.use self.use = self.product.use
@@ -329,30 +397,28 @@ class OpticalEquipment(DeactivableMixin, Workflow, ModelSQL, ModelView):
self.health_register = None self.health_register = None
self.software_version = None self.software_version = None
@ classmethod @classmethod
def delete(cls, equipments): def delete(cls, equipments):
for equipment in equipments: for equipment in equipments:
if equipment.purchase_origin: if equipment.purchase_origin:
raise AccessError( raise AccessError(gettext('estos equipos no se pueden borrar'))
gettext('estos equipos no se pueden borrar'))
elif equipment.state != 'draft' and equipment.serial is not None: elif equipment.state != 'draft' and equipment.serial is not None:
raise AccessError( raise AccessError(gettext('estos equipos no se pueden borrar'))
gettext('estos equipos no se pueden borrar'))
super(OpticalEquipment, cls).delete(equipments) super(OpticalEquipment, cls).delete(equipments)
@ classmethod @classmethod
@ ModelView.button @ModelView.button
@ Workflow.transition('draft') @Workflow.transition('draft')
def draft(cls, equipments): def draft(cls, equipments):
pass pass
@ classmethod @classmethod
@ ModelView.button @ModelView.button
@ Workflow.transition('registred') @Workflow.transition('registred')
def registred(cls, equipments): def registred(cls, equipments):
for i in equipments: for i in equipments:
if i.serial is None: if i.serial is None:
raise UserError(str("El Equipo no cuenta con un Serial")) raise UserError(str('El Equipo no cuenta con un Serial'))
else: else:
cls.set_code(equipments) cls.set_code(equipments)
@@ -361,43 +427,72 @@ class EquipmentMaintenance(ModelSQL, ModelView):
'Optical Equipment - Equipment - Maintenance' 'Optical Equipment - Equipment - Maintenance'
__name__ = 'optical_equipment.maintenance-optical_equipment.equipment' __name__ = 'optical_equipment.maintenance-optical_equipment.equipment'
equipment = fields.Many2One('optical_equipment.equipment', 'Equipment', ) equipment = fields.Many2One(
maintenance = fields.Many2One('optical_equipment.maintenance', 'Maintenances', ) 'optical_equipment.equipment',
'Equipment',
)
maintenance = fields.Many2One(
'optical_equipment.maintenance',
'Maintenances',
)
class EquipmentContract(ModelSQL, ModelView): class EquipmentContract(ModelSQL, ModelView):
'Optical Equipment - Contracs Equipment' 'Optical Equipment - Contracs Equipment'
__name__ = 'optical_equipment.contract-optical_equipment.equipment' __name__ = 'optical_equipment.contract-optical_equipment.equipment'
equipment = fields.Many2One('optical_equipment.equipment', 'Equipment', ) equipment = fields.Many2One(
contract = fields.Many2One('optical_equipment.contract', 'Contract', ) 'optical_equipment.equipment',
'Equipment',
)
contract = fields.Many2One(
'optical_equipment.contract',
'Contract',
)
class EquipmentParty(ModelSQL, ModelView): class EquipmentParty(ModelSQL, ModelView):
'Optical Equipment - Party' 'Optical Equipment - Party'
__name__ = 'optical_equipment.equipment-party.party' __name__ = 'optical_equipment.equipment-party.party'
equipment = fields.Many2One('optical_equipment.equipment', "Equipment", ) equipment = fields.Many2One(
party = fields.Many2One('party.party', "Party", ) 'optical_equipment.equipment',
'Equipment',
)
party = fields.Many2One(
'party.party',
'Party',
)
class ChangePropietary(ModelView): class ChangePropietary(ModelView):
'Change of Propietary Equipment' 'Change of Propietary Equipment'
__name__ = 'optical_equipment.change_propietary.form' __name__ = 'optical_equipment.change_propietary.form'
old_propietary = fields.Many2One('party.party', 'Old Propietary', old_propietary = fields.Many2One(
states={'required': True}) 'party.party', 'Old Propietary', states={'required': True}
equipments = fields.Many2Many('optical_equipment.equipment', None, None, "Equipments", )
domain=[('propietary', '=', Eval('old_propietary'))], equipments = fields.Many2Many(
depends=['old_propietary']) 'optical_equipment.equipment',
new_propietary = fields.Many2One('party.party', "New Propietary", None,
states={'required': True}) None,
new_address = fields.Many2One('party.address', "New Address", required=True, 'Equipments',
domain=[('party', '=', Eval('new_propietary'))], domain=[('propietary', '=', Eval('old_propietary'))],
states={'required': True}) depends=['old_propietary'],
change_date = fields.Date("Change Date", readonly=True) )
new_propietary = fields.Many2One(
'party.party', 'New Propietary', states={'required': True}
)
new_address = fields.Many2One(
'party.address',
'New Address',
required=True,
domain=[('party', '=', Eval('new_propietary'))],
states={'required': True},
)
change_date = fields.Date('Change Date', readonly=True)
@ classmethod @classmethod
def default_change_date(cls): def default_change_date(cls):
pool = Pool() pool = Pool()
Date = pool.get('ir.date') Date = pool.get('ir.date')
@@ -408,15 +503,18 @@ class NewPropietary(Wizard):
'Change Propietary' 'Change Propietary'
__name__ = 'optical_equipment.change_propietary' __name__ = 'optical_equipment.change_propietary'
start = StateView('optical_equipment.change_propietary.form', start = StateView(
'optical_equipment.change_propietary_view_form', [ 'optical_equipment.change_propietary.form',
Button('Cancel', 'end', 'tryton-cancel'), 'optical_equipment.change_propietary_view_form',
Button('Create', 'change_propietary', 'tryton-ok', default=True), [
]) Button('Cancel', 'end', 'tryton-cancel'),
change_propietary = StateAction('optical_equipment.act_optical_equipment_form') Button('Create', 'change_propietary', 'tryton-ok', default=True),
],
)
change_propietary = StateAction(
'optical_equipment.act_optical_equipment_form')
def do_change_propietary(self, action): def do_change_propietary(self, action):
old_propietary = self.start.old_propietary
equipments = self.start.equipments equipments = self.start.equipments
new_propietary = self.start.new_propietary new_propietary = self.start.new_propietary
new_address = self.start.new_address new_address = self.start.new_address
@@ -425,7 +523,9 @@ class NewPropietary(Wizard):
equipment.propietarys += (equipment.propietary,) equipment.propietarys += (equipment.propietary,)
equipment.propietary = new_propietary equipment.propietary = new_propietary
equipment.propietary_address = new_address equipment.propietary_address = new_address
equipment.maintenance_frequency = "6" if new_propietary.customer_type == 'ips' else "12" equipment.maintenance_frequency = (
'6' if new_propietary.customer_type == 'ips' else '12'
)
equipment.save() equipment.save()
@@ -434,21 +534,22 @@ class ChangeEquipment(ModelSQL):
__name__ = 'optical_equipment.equipment-change_propietary.form' __name__ = 'optical_equipment.equipment-change_propietary.form'
maintenance_service = fields.Many2One( maintenance_service = fields.Many2One(
'optical_equipment_maintenance.service', 'optical_equipment_maintenance.service', 'Maintenance Service'
"Maintenance Service") )
equipment = fields.Many2One('optical_equipment.equipment', 'Equipment') equipment = fields.Many2One('optical_equipment.equipment', 'Equipment')
change = fields.Many2One('optical_equipment.change_propietary.form', 'Change') change = fields.Many2One(
'optical_equipment.change_propietary.form', 'Change')
class EquipmentReport(CompanyReport): class EquipmentReport(CompanyReport):
__name__ = 'optical_equipment.equipment' __name__ = 'optical_equipment.equipment'
@ classmethod @classmethod
def execute(cls, ids, data): def execute(cls, ids, data):
with Transaction().set_context(address_with_party=True): with Transaction().set_context(address_with_party=True):
return super(EquipmentReport, cls).execute(ids, data) return super(EquipmentReport, cls).execute(ids, data)
@ classmethod @classmethod
def get_context(cls, records, header, data): def get_context(cls, records, header, data):
pool = Pool() pool = Pool()
Date = pool.get('ir.date') Date = pool.get('ir.date')

View File

@@ -11,10 +11,6 @@
<field name="user" ref="res.user_admin"/> <field name="user" ref="res.user_admin"/>
<field name="group" ref="group_equipment_admin"/> <field name="group" ref="group_equipment_admin"/>
</record> </record>
<menuitem
name="Equipment"
sequence="40"
id="menu_equipment"/>
<record model="ir.action.act_window" id="act_optical_equipment_form"> <record model="ir.action.act_window" id="act_optical_equipment_form">
<field name="name">Equipments</field> <field name="name">Equipments</field>
<field name="res_model">optical_equipment.equipment</field> <field name="res_model">optical_equipment.equipment</field>
@@ -93,11 +89,6 @@
<field name="confirm">Are you sure you want to registred these equipments?</field> <field name="confirm">Are you sure you want to registred these equipments?</field>
<field name="model" search="[('model', '=', 'optical_equipment.equipment')]"/> <field name="model" search="[('model', '=', 'optical_equipment.equipment')]"/>
</record> </record>
<menuitem parent="menu_equipment"
action="act_optical_equipment_form"
sequence="60"
id="menu_optical_equipment_form"/>
<record model="ir.action.act_window" id="act_optical_equipment_form1"> <record model="ir.action.act_window" id="act_optical_equipment_form1">
<field name="name">Serials</field> <field name="name">Serials</field>
<field name="res_model">optical_equipment.equipment</field> <field name="res_model">optical_equipment.equipment</field>
@@ -122,12 +113,6 @@
<field name="count" eval="True"/> <field name="count" eval="True"/>
<field name="act_window" ref="act_optical_equipment_form1"/> <field name="act_window" ref="act_optical_equipment_form1"/>
</record> </record>
<menuitem
parent="menu_equipment"
action="act_optical_equipment_form1"
sequence="70"
id="menu_optical_equipment_serial_form"/>
<record model="ir.action.report" id="report_equipment"> <record model="ir.action.report" id="report_equipment">
<field name="name">Equipment</field> <field name="name">Equipment</field>
<field name="model">optical_equipment.equipment</field> <field name="model">optical_equipment.equipment</field>
@@ -167,5 +152,31 @@
<field name="model">optical_equipment.equipment,-1</field> <field name="model">optical_equipment.equipment,-1</field>
<field name="action" ref="equipment_change_propietary"/> <field name="action" ref="equipment_change_propietary"/>
</record> </record>
<record model="ir.ui.icon" id="optical_equipment_serials_icon">
<field name="name">equipment_serial</field>
<field name="path">icons/barcode-solid.svg</field>
</record>
<record model="ir.ui.icon" id="optical_equipment_optical_icon">
<field name="name">optical</field>
<field name="path">icons/microscope-solid.svg</field>
</record>
<menuitem
name="Equipment"
sequence="40"
id="menu_equipment"
icon="optical"/>
<menuitem
parent="menu_equipment"
action="act_optical_equipment_form"
sequence="60"
id="menu_optical_equipment_form"
icon="optical"/>
<menuitem
parent="menu_equipment"
action="act_optical_equipment_form1"
sequence="70"
id="menu_optical_equipment_serial_form"
icon="equipment_serial"/>
</data> </data>
</tryton> </tryton>

1
icons/barcode-solid.svg Normal file
View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--!Font Awesome Free 6.5.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc.--><path d="M24 32C10.7 32 0 42.7 0 56V456c0 13.3 10.7 24 24 24H40c13.3 0 24-10.7 24-24V56c0-13.3-10.7-24-24-24H24zm88 0c-8.8 0-16 7.2-16 16V464c0 8.8 7.2 16 16 16s16-7.2 16-16V48c0-8.8-7.2-16-16-16zm72 0c-13.3 0-24 10.7-24 24V456c0 13.3 10.7 24 24 24h16c13.3 0 24-10.7 24-24V56c0-13.3-10.7-24-24-24H184zm96 0c-13.3 0-24 10.7-24 24V456c0 13.3 10.7 24 24 24h16c13.3 0 24-10.7 24-24V56c0-13.3-10.7-24-24-24H280zM448 56V456c0 13.3 10.7 24 24 24h16c13.3 0 24-10.7 24-24V56c0-13.3-10.7-24-24-24H472c-13.3 0-24 10.7-24 24zm-64-8V464c0 8.8 7.2 16 16 16s16-7.2 16-16V48c0-8.8-7.2-16-16-16s-16 7.2-16 16z"/></svg>

After

Width:  |  Height:  |  Size: 814 B

View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--!Font Awesome Free 6.5.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc.--><path d="M128 0c17.7 0 32 14.3 32 32V64H288V32c0-17.7 14.3-32 32-32s32 14.3 32 32V64h48c26.5 0 48 21.5 48 48v48H0V112C0 85.5 21.5 64 48 64H96V32c0-17.7 14.3-32 32-32zM0 192H448V464c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V192zm64 80v32c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16V272c0-8.8-7.2-16-16-16H80c-8.8 0-16 7.2-16 16zm128 0v32c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16V272c0-8.8-7.2-16-16-16H208c-8.8 0-16 7.2-16 16zm144-16c-8.8 0-16 7.2-16 16v32c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16V272c0-8.8-7.2-16-16-16H336zM64 400v32c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16V400c0-8.8-7.2-16-16-16H80c-8.8 0-16 7.2-16 16zm144-16c-8.8 0-16 7.2-16 16v32c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16V400c0-8.8-7.2-16-16-16H208zm112 16v32c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16V400c0-8.8-7.2-16-16-16H336c-8.8 0-16 7.2-16 16z"/></svg>

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512"><!--!Font Awesome Free 6.5.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc.--><path d="M64 0C28.7 0 0 28.7 0 64V448c0 35.3 28.7 64 64 64H320c35.3 0 64-28.7 64-64V160H256c-17.7 0-32-14.3-32-32V0H64zM256 0V128H384L256 0zM80 64h64c8.8 0 16 7.2 16 16s-7.2 16-16 16H80c-8.8 0-16-7.2-16-16s7.2-16 16-16zm0 64h64c8.8 0 16 7.2 16 16s-7.2 16-16 16H80c-8.8 0-16-7.2-16-16s7.2-16 16-16zm54.2 253.8c-6.1 20.3-24.8 34.2-46 34.2H80c-8.8 0-16-7.2-16-16s7.2-16 16-16h8.2c7.1 0 13.3-4.6 15.3-11.4l14.9-49.5c3.4-11.3 13.8-19.1 25.6-19.1s22.2 7.7 25.6 19.1l11.6 38.6c7.4-6.2 16.8-9.7 26.8-9.7c15.9 0 30.4 9 37.5 23.2l4.4 8.8H304c8.8 0 16 7.2 16 16s-7.2 16-16 16H240c-6.1 0-11.6-3.4-14.3-8.8l-8.8-17.7c-1.7-3.4-5.1-5.5-8.8-5.5s-7.2 2.1-8.8 5.5l-8.8 17.7c-2.9 5.9-9.2 9.4-15.7 8.8s-12.1-5.1-13.9-11.3L144 349l-9.8 32.8z"/></svg>

After

Width:  |  Height:  |  Size: 942 B

View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--!Font Awesome Free 6.5.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc.--><path d="M228.3 469.1L47.6 300.4c-4.2-3.9-8.2-8.1-11.9-12.4h87c22.6 0 43-13.6 51.7-34.5l10.5-25.2 49.3 109.5c3.8 8.5 12.1 14 21.4 14.1s17.8-5 22-13.3L320 253.7l1.7 3.4c9.5 19 28.9 31 50.1 31H476.3c-3.7 4.3-7.7 8.5-11.9 12.4L283.7 469.1c-7.5 7-17.4 10.9-27.7 10.9s-20.2-3.9-27.7-10.9zM503.7 240h-132c-3 0-5.8-1.7-7.2-4.4l-23.2-46.3c-4.1-8.1-12.4-13.3-21.5-13.3s-17.4 5.1-21.5 13.3l-41.4 82.8L205.9 158.2c-3.9-8.7-12.7-14.3-22.2-14.1s-18.1 5.9-21.8 14.8l-31.8 76.3c-1.2 3-4.2 4.9-7.4 4.9H16c-2.6 0-5 .4-7.3 1.1C3 225.2 0 208.2 0 190.9v-5.8c0-69.9 50.5-129.5 119.4-141C165 36.5 211.4 51.4 244 84l12 12 12-12c32.6-32.6 79-47.5 124.6-39.9C461.5 55.6 512 115.2 512 185.1v5.8c0 16.9-2.8 33.5-8.3 49.1z"/></svg>

After

Width:  |  Height:  |  Size: 916 B

View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--!Font Awesome Free 6.5.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc.--><path d="M160 32c0-17.7 14.3-32 32-32h32c17.7 0 32 14.3 32 32c17.7 0 32 14.3 32 32V288c0 17.7-14.3 32-32 32c0 17.7-14.3 32-32 32H192c-17.7 0-32-14.3-32-32c-17.7 0-32-14.3-32-32V64c0-17.7 14.3-32 32-32zM32 448H320c70.7 0 128-57.3 128-128s-57.3-128-128-128V128c106 0 192 86 192 192c0 49.2-18.5 94-48.9 128H480c17.7 0 32 14.3 32 32s-14.3 32-32 32H320 32c-17.7 0-32-14.3-32-32s14.3-32 32-32zm80-64H304c8.8 0 16 7.2 16 16s-7.2 16-16 16H112c-8.8 0-16-7.2-16-16s7.2-16 16-16z"/></svg>

After

Width:  |  Height:  |  Size: 690 B

File diff suppressed because it is too large Load Diff

View File

@@ -108,10 +108,10 @@
<field name="model">optical_equipment.change_propietary_maintenance.form</field> <field name="model">optical_equipment.change_propietary_maintenance.form</field>
<field name="type">form</field> <field name="type">form</field>
<field name="name">change_propietary_maintenance_form</field> <field name="name">change_propietary_maintenance_form</field>
</record> </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="type">form</field>
<field name="name">maintenance_equipment_form</field> <field name="name">maintenance_equipment_form</field>
</record> </record>
<record model="ir.ui.view" id="maintenance_activity_view_form"> <record model="ir.ui.view" id="maintenance_activity_view_form">
@@ -184,6 +184,12 @@
<field name="string">Finished</field> <field name="string">Finished</field>
<field name="model" search="[('model', '=', 'optical_equipment_maintenance.service')]"/> <field name="model" search="[('model', '=', 'optical_equipment_maintenance.service')]"/>
</record> </record>
<record model="ir.model.button" id="maintenance_in_progress_button">
<field name="name">in_progress</field>
<field name="string">In progress</field>
<field name="model" search="[('model', '=', 'optical_equipment.maintenance')]"/>
</record>
<record model="ir.model.button" id="maintenance_finished_button"> <record model="ir.model.button" id="maintenance_finished_button">
<field name="name">finished</field> <field name="name">finished</field>
<field name="string">Finished</field> <field name="string">Finished</field>
@@ -269,13 +275,20 @@
<field name="model">optical_equipment_maintenance.service,-1</field> <field name="model">optical_equipment_maintenance.service,-1</field>
<field name="action" ref="equipment_change_propietary_maintenance"/> <field name="action" ref="equipment_change_propietary_maintenance"/>
</record> </record>
<record model="ir.ui.icon" id="optical_equipment_health_icon">
<field name="name">equipment_health</field>
<field name="path">icons/heart-pulse-solid.svg</field>
</record>
<menuitem parent="menu_equipment" <menuitem parent="menu_equipment"
action="act_maintenance_service_form" action="act_maintenance_service_form"
sequence="20" sequence="20"
id="menu_maintenance_service_form"/> id="menu_maintenance_service_form"
icon="equipment_health"/>
<menuitem parent="menu_maintenance_service_form" <menuitem parent="menu_maintenance_service_form"
action="act_maintenance_form" action="act_maintenance_form"
sequence="30" sequence="30"
id="menu_maintenance_form"/> id="menu_maintenance_form"
icon="equipment_health"/>
</data> </data>
</tryton> </tryton>

16
messages.xml Normal file
View File

@@ -0,0 +1,16 @@
<?xml version="1.0"?>
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
this repository contains the full copyright notices and license terms. -->
<tryton>
<data grouped="1">
<record model="ir.message" id="line_without_serial">
<field name="text">La linea de envio se encuentra sin serial. Debe asignar un equipo a cada linea correspondiente.</field>
</record>
<record model="ir.message" id="msg_not_sequence_equipment">
<field name="text">Asigne una secuencia para enumerar equipos.</field>
</record>
<record model="ir.message" id="msg_finished_mantenance_service">
<field name="text">Debe finalizar las líneas de Mantenimiento Primero.</field>
</record>
</data>
</tryton>

300
move.py
View File

@@ -6,6 +6,8 @@ from trytond.pyson import Eval, If
from trytond.exceptions import UserError from trytond.exceptions import UserError
from itertools import groupby from itertools import groupby
from trytond.transaction import Transaction, without_check_access from trytond.transaction import Transaction, without_check_access
from trytond.model.exceptions import ValidationError
from trytond.i18n import gettext
from functools import wraps from functools import wraps
@@ -19,39 +21,63 @@ def process_sale(moves_field):
transaction = Transaction() transaction = Transaction()
context = transaction.context context = transaction.context
with without_check_access(): with without_check_access():
sales = set(m.sale for s in cls.browse(shipments) sales = set(
for m in getattr(s, moves_field) if m.sale) m.sale
for s in cls.browse(shipments)
for m in getattr(s, moves_field)
if m.sale
)
func(cls, shipments) func(cls, shipments)
if sales: if sales:
with transaction.set_context( with transaction.set_context(
queue_batch=context.get('queue_batch', True)): queue_batch=context.get('queue_batch', True)
):
Sale.__queue__.process(sales) Sale.__queue__.process(sales)
return wrapper return wrapper
return _process_sale return _process_sale
class Move(metaclass=PoolMeta): class Move(metaclass=PoolMeta):
"Stock Move" 'Stock Move'
__name__ = "stock.move" __name__ = 'stock.move'
return_equipment = fields.Boolean("Devolución", states={'invisible': If(~Eval('product_equipment'), True), _states = {
'readonly': (Eval('state').in_(['cancelled', 'done'])), } 'invisible': ~Eval('product_equipment'),
) 'readonly': (Eval('state').in_(['cancelled', 'done'])),
equipment = fields.Many2One('optical_equipment.equipment', "Equipment", }
domain=[If(Eval('return_equipment', True),
('state', 'in', ['uncontrated', 'contrated']), product_equipment = fields.Function(
('state', '=', 'registred')), fields.Boolean('It Equipment'), 'get_product_equipment'
('product', '=', Eval('product')) )
],
states={'invisible': If(~Eval('product_equipment'), True), return_equipment = fields.Boolean(
'readonly': (Eval('state').in_(['cancelled', 'done'])), }, 'Devolución',
depends=['product_equipment', 'move_type']) states=_states)
equipment_serial = fields.Function(fields.Char('Serial',
states={'readonly': True, equipment = fields.Many2One(
'invisible': If(~Eval('product_equipment'), True)}, 'optical_equipment.equipment',
depends=['product_equipment']), 'Equipment',
'get_equipment_serial') domain=[
product_equipment = fields.Function(fields.Boolean("It Equipment"), 'get_product_equipment') If(
Eval('return_equipment', True),
('state', 'in', ['uncontrated', 'contrated']),
('state', '=', 'registred'),
),
('product', '=', Eval('product')),
],
states=_states,
depends=['product_equipment'],
)
equipment_serial = fields.Function(
fields.Char(
'Serial',
states=_states,
depends=['product_equipment'],
),
'get_equipment_serial',
)
@classmethod @classmethod
def __setup__(cls): def __setup__(cls):
@@ -72,14 +98,7 @@ class Move(metaclass=PoolMeta):
else: else:
return None return None
@fields.depends('product', 'equipment', 'uom') @fields.depends('equipment', methods=['get_equipment_serial'])
def on_change_product(self):
if self.product:
if (not self.uom
or self.uom.category != self.product.default_uom.category):
self.uom = self.product.default_uom
@fields.depends(methods=['get_equipment_serial'])
def on_change_equipment(self): def on_change_equipment(self):
if self.equipment: if self.equipment:
self.product = self.equipment.product.id self.product = self.equipment.product.id
@@ -89,27 +108,39 @@ class Move(metaclass=PoolMeta):
class ShipmentOut(metaclass=PoolMeta): class ShipmentOut(metaclass=PoolMeta):
"Customer Shipment" 'Customer Shipment'
__name__ = 'stock.shipment.out' __name__ = 'stock.shipment.out'
service_maintenance_initial = fields.Boolean('Maintenance Initial', states={'readonly': True}) service_maintenance_initial = fields.Boolean(
'Maintenance Initial', states={'readonly': True}
)
sale_type = fields.Char('Type sale origin') sale_type = fields.Char('Type sale origin')
@classmethod @classmethod
def __setup__(cls): def __setup__(cls):
super(ShipmentOut, cls).__setup__() super(ShipmentOut, cls).__setup__()
cls._buttons.update({ cls._buttons.update(
'maintenance_initial': { {
'invisible': ((Eval('service_maintenance_initial', True)) 'maintenance_initial': {
| (Eval('sale_type').in_(['maintenance', 'replaces'])))} 'invisible': (
}) (Eval('service_maintenance_initial', True))
| (Eval('sale_type').in_(['maintenance', 'replaces']))
)
}
}
)
@classmethod @classmethod
def view_attributes(cls): def view_attributes(cls):
return super(ShipmentOut, cls).view_attributes() + [ return super(ShipmentOut, cls).view_attributes() + [
('//page[@name="inventory_moves"]', 'states', { (
'invisible': False, "//page[@name='inventory_moves']",
}),] 'states',
{
'invisible': False,
},
),
]
@classmethod @classmethod
@ModelView.button @ModelView.button
@@ -125,35 +156,47 @@ class ShipmentOut(metaclass=PoolMeta):
for shipment in shipments: for shipment in shipments:
for move in shipment.inventory_moves: for move in shipment.inventory_moves:
count = 0 count = 0
if move.equipment: if not move.equipment:
equipment = move.equipment
Id = equipment.id
equipment = Equipments.search(['id', '=', Id])[0]
equipment.propietary = shipment.customer.id
equipment.propietary_address = shipment.delivery_address.id
equipment.location = Locations.search(['name', '=', 'Cliente'])[0].id
equipment.state = "uncontrated"
equipment.shipment_destination = shipment
equipment.sale_destination = shipment.outgoing_moves[count].origin
equipment.propietarys += (shipment.customer,)
equipment.maintenance_frequency = "6" if shipment.customer.customer_type == "ips" else "12"
count += 1
equipment.save()
else:
count += 1 count += 1
continue
equipment = move.equipment
Id = equipment.id
equipment = Equipments.search(['id', '=', Id])[0]
equipment.propietary = shipment.customer.id
equipment.propietary_address = shipment.delivery_address.id
equipment.location = Locations.search(
['name', '=', 'Customer'])[0].id
equipment.state = 'uncontrated'
equipment.shipment_destination = shipment
equipment.sale_destination =\
shipment.outgoing_moves[count].origin
equipment.propietarys += (shipment.customer,)
equipment.maintenance_frequency = (
'6'
if shipment.customer.customer_type == 'ips'
else '12'
)
count += 1
equipment.save()
Move.delete([ Move.delete([
m for s in shipments for m in s.outgoing_moves m for s in shipments
if m.state == 'staging']) for m in s.outgoing_moves
if m.state == 'staging'
])
Move.do([m for s in shipments for m in s.outgoing_moves]) Move.do([m for s in shipments for m in s.outgoing_moves])
for company, c_shipments in groupby( iterator = groupby(shipments, key=lambda s: s.company)
shipments, key=lambda s: s.company): for company, c_shipments in iterator:
with Transaction().set_context(company=company.id): with Transaction().set_context(company=company.id):
today = Date.today() today = Date.today()
cls.write([s for s in c_shipments if not s.effective_date], { cls.write(
'effective_date': today, [s for s in c_shipments if not s.effective_date],
}) {
'effective_date': today,
},
)
@classmethod @classmethod
@ModelView.button @ModelView.button
@@ -161,9 +204,6 @@ class ShipmentOut(metaclass=PoolMeta):
pool = Pool() pool = Pool()
MaintenanceService = pool.get('optical_equipment_maintenance.service') MaintenanceService = pool.get('optical_equipment_maintenance.service')
Maintenance = pool.get('optical_equipment.maintenance') Maintenance = pool.get('optical_equipment.maintenance')
SaleLine = pool.get('sale.line')
Equipments = pool.get('optical_equipment.equipment')
for shipment in shipments: for shipment in shipments:
serial = False serial = False
@@ -183,11 +223,12 @@ class ShipmentOut(metaclass=PoolMeta):
if number_equipments < 1 or maintenance_required < 1: if number_equipments < 1 or maintenance_required < 1:
shipment.service_maintenance_initial = True shipment.service_maintenance_initial = True
shipment.save() shipment.save()
# raise UserError(str("No se generó un mantenimiento inicial dado que los equipos no requiren mantenimiento, ó no se encontró ningún producto de tipo equipo en este envío."))
break break
sale_origin = shipment.outgoing_moves[0].origin.sale sale_origin = shipment.outgoing_moves[0].origin.sale
maintenanceService = MaintenanceService.search(['sale_origin', '=', sale_origin]) maintenanceService = MaintenanceService.search(
['sale_origin', '=', sale_origin]
)
if maintenanceService == []: if maintenanceService == []:
maintenanceService = MaintenanceService( maintenanceService = MaintenanceService(
sale_date=shipment.outgoing_moves[0].origin.sale.sale_date, sale_date=shipment.outgoing_moves[0].origin.sale.sale_date,
@@ -195,41 +236,67 @@ class ShipmentOut(metaclass=PoolMeta):
maintenance_type='initial', maintenance_type='initial',
propietary=shipment.customer.id, propietary=shipment.customer.id,
propietary_address=shipment.delivery_address.id, propietary_address=shipment.delivery_address.id,
state='draft') state='draft',
)
maintenanceService.save() maintenanceService.save()
else: else:
maintenanceService = maintenanceService[0] maintenanceService = maintenanceService[0]
maintenanceService.state = 'draft' maintenanceService.state = 'draft'
maintenanceService.save() maintenanceService.save()
if serial == True: if not serial:
for move in shipment.inventory_moves: error = 'Por favor Primero debe Asignar'
if move.product_equipment and move.equipment and move.equipment.product.template.maintenance_required: + 'un serial a todos los Equipos.'
maintenance = Maintenance( raise UserError(str(error))
service_maintenance=maintenanceService.id,
maintenance_type='initial', for move in shipment.inventory_moves:
propietary=shipment.customer.id, valid = \
equipment_calibrate=True if move.equipment.product.calibration else False, move.product_equipment \
propietary_address=shipment.delivery_address.id, and move.equipment \
equipment=move.equipment.id, and move.equipment.product.template.maintenance_required
initial_operation=move.equipment.product.initial_operation,
check_equipment=move.equipment.product.template.check_equipment, if (not valid):
check_electric_system=move.equipment.product.template.check_electric_system, continue
clean_int_ext=move.equipment.product.template.clean_int_ext,
clean_eyes=move.equipment.product.template.clean_eyes, template = move.equipment.product.template
check_calibration=move.equipment.product.template.check_calibration, maintenance = Maintenance(
temperature_min=maintenanceService.temperature_min, service_maintenance=maintenanceService.id,
temperature_max=maintenanceService.temperature_max, maintenance_type='initial',
temperature_uom=maintenanceService.temperature_uom.id, propietary=shipment.customer.id,
moisture_min=maintenanceService.moisture_min, equipment_calibrate=(
moisture_max=maintenanceService.moisture_max, True if move.equipment.product.calibration else False
moisture_uom=maintenanceService.moisture_uom.id) ),
maintenance.save() propietary_address=shipment.delivery_address.id,
shipment.service_maintenance_initial = True equipment=move.equipment.id,
shipment.save() initial_operation=move.equipment.product.initial_operation,
else: check_equipment=template.check_equipment,
raise UserError( check_electric_system=template.check_electric_system,
str('Por favor Primero debe Asignar un serial a todos los Equipos.')) clean_int_ext=template.clean_int_ext,
clean_eyes=template.clean_eyes,
check_calibration=template.check_calibration,
temperature_min=maintenanceService.temperature_min,
temperature_max=maintenanceService.temperature_max,
temperature_uom=maintenanceService.temperature_uom.id,
moisture_min=maintenanceService.moisture_min,
moisture_max=maintenanceService.moisture_max,
moisture_uom=maintenanceService.moisture_uom.id,
)
maintenance.save()
shipment.service_maintenance_initial = True
shipment.save()
@classmethod
@ModelView.button
@Workflow.transition('picked')
@set_employee('picked_by')
def pick(cls, shipments):
super(ShipmentOut, cls).pick(shipments)
for shipment in shipments:
for line in shipment.inventory_moves:
if line.product.equipment and not line.equipment:
raise ValidationError(
gettext("optical_equipment.line_without_serial"))
class ShipmentInternal(metaclass=PoolMeta): class ShipmentInternal(metaclass=PoolMeta):
@@ -252,15 +319,21 @@ class ShipmentInternal(metaclass=PoolMeta):
move.equipment.save() move.equipment.save()
Move.do([m for s in shipments for m in s.incoming_moves]) Move.do([m for s in shipments for m in s.incoming_moves])
cls.write([s for s in shipments if not s.effective_date], { cls.write(
'effective_date': Date.today(), }) [s for s in shipments if not s.effective_date],
{
'effective_date': Date.today(),
},
)
class ShipmentOutReturn(metaclass=PoolMeta): class ShipmentOutReturn(metaclass=PoolMeta):
"Customer Shipment Return" 'Customer Shipment Return'
__name__ = 'stock.shipment.out.return' __name__ = 'stock.shipment.out.return'
service_maintenance_initial = fields.Boolean('Maintenance Initial', states={'readonly': True}) service_maintenance_initial = fields.Boolean(
'Maintenance Initial', states={'readonly': True}
)
sale_type = fields.Char('Type sale origin') sale_type = fields.Char('Type sale origin')
@classmethod @classmethod
@@ -270,25 +343,26 @@ class ShipmentOutReturn(metaclass=PoolMeta):
def receive(cls, shipments): def receive(cls, shipments):
Move = Pool().get('stock.move') Move = Pool().get('stock.move')
Equipments = Pool().get('optical_equipment.equipment') Equipments = Pool().get('optical_equipment.equipment')
Locations = Pool().get('stock.location')
Move.do([m for s in shipments for m in s.incoming_moves]) Move.do([m for s in shipments for m in s.incoming_moves])
for s in shipments: for s in shipments:
for m in s.incoming_moves: for m in s.incoming_moves:
if m.equipment: if not m.equipment:
equipment = m.equipment continue
Id = equipment.id
equipment = Equipments.search(['id', '=', Id])[0] equipment = m.equipment
equipment.propietary = s.company.party.id Id = equipment.id
equipment.propietary_address = s.company.party.addresses[0].id equipment = Equipments.search(['id', '=', Id])[0]
equipment.location = m.to_location.id equipment.propietary = s.company.party.id
equipment.state = "registred" equipment.propietary_address = s.company.party.addresses[0].id
equipment.save() equipment.location = m.to_location.id
equipment.state = 'registred'
equipment.save()
cls.create_inventory_moves(shipments) cls.create_inventory_moves(shipments)
# Set received state to allow done transition # Set received state to allow done transition
cls.write(shipments, {'state': 'received'}) cls.write(shipments, {'state': 'received'})
to_do = [s for s in shipments to_do = [
if s.warehouse_storage == s.warehouse_input] s for s in shipments if s.warehouse_storage == s.warehouse_input]
if to_do: if to_do:
cls.done(to_do) cls.done(to_do)

View File

@@ -2,41 +2,43 @@
<!--This file file is part of Tryton. The COPYRIGHT file at the top level of <!--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 repository contains the full copyright notices and license terms. -->
<tryton> <tryton>
<record model="ir.ui.view" id="move_view_list_shipment"> <data>
<field name="model">stock.move</field> <record model="ir.ui.view" id="move_view_list_shipment">
<field name="inherit" ref="stock.move_view_list_shipment"/> <field name="model">stock.move</field>
<field name="name">move_list_shipment</field> <field name="inherit" ref="stock.move_view_list_shipment"/>
</record> <field name="name">move_list_shipment</field>
<record model="ir.ui.view" id="move_view_form"> </record>
<field name="model">stock.move</field> <record model="ir.ui.view" id="move_view_form">
<field name="inherit" ref="stock.move_view_form"/> <field name="model">stock.move</field>
<field name="name">move_form</field> <field name="inherit" ref="stock.move_view_form"/>
</record> <field name="name">move_form</field>
<record model="ir.model.button" id="maintenance_initial_button"> </record>
<field name="name">maintenance_initial</field> <record model="ir.model.button" id="maintenance_initial_button">
<field name="string">Maintenance Initial</field> <field name="name">maintenance_initial</field>
<field name="model" search="[('model', '=', 'stock.shipment.out')]"/> <field name="string">Maintenance Initial</field>
</record> <field name="model" search="[('model', '=', 'stock.shipment.out')]"/>
<record model="ir.action.report" id="report_shipment_out_picking_list1"> </record>
<record model="ir.action.report" id="report_shipment_out_picking_list1">
<field name="name">Acta Entrega</field> <field name="name">Acta Entrega</field>
<field name="model">stock.shipment.out</field> <field name="model">stock.shipment.out</field>
<field name="report_name">stock.shipment.out.picking_list1</field> <field name="report_name">stock.shipment.out.picking_list1</field>
<field name="report">optical_equipment/report/Delivery_Certificated.fodt</field> <field name="report">optical_equipment/report/Delivery_Certificated.fodt</field>
</record> </record>
<record model="ir.action.keyword" id="report_shipment_out_picking_list1_keyword"> <record model="ir.action.keyword" id="report_shipment_out_picking_list1_keyword">
<field name="keyword">form_print</field> <field name="keyword">form_print</field>
<field name="model">stock.shipment.out,-1</field> <field name="model">stock.shipment.out,-1</field>
<field name="action" ref="report_shipment_out_picking_list1"/> <field name="action" ref="report_shipment_out_picking_list1"/>
</record> </record>
<record model="ir.action.report" id="report_capacitation"> <record model="ir.action.report" id="report_capacitation">
<field name="name">Capacitation</field> <field name="name">Capacitation</field>
<field name="model">stock.shipment.out</field> <field name="model">stock.shipment.out</field>
<field name="report_name">stock.shipment.out.picking_list1</field> <field name="report_name">stock.shipment.out.picking_list1</field>
<field name="report">optical_equipment/report/Capacitation.fodt</field> <field name="report">optical_equipment/report/Capacitation.fodt</field>
</record> </record>
<record model="ir.action.keyword" id="report_capacitation_keyword"> <record model="ir.action.keyword" id="report_capacitation_keyword">
<field name="keyword">form_print</field> <field name="keyword">form_print</field>
<field name="model">stock.shipment.out,-1</field> <field name="model">stock.shipment.out,-1</field>
<field name="action" ref="report_capacitation"/> <field name="action" ref="report_capacitation"/>
</record> </record>
</data>
</tryton> </tryton>

View File

@@ -2,24 +2,27 @@
# this repository contains the full copyright notices and license terms. # this repository contains the full copyright notices and license terms.
from trytond.pool import PoolMeta from trytond.pool import PoolMeta
from trytond.model import ModelSQL, ModelView, fields from trytond.model import fields
from trytond.pyson import Eval, If from trytond.pyson import Eval
#from . import equipment
_CUSTOMER_TYPE = [('ips', 'IPS'), _CUSTOMER_TYPE = [("ips", "IPS"), ("optica", "Optica"), ("otro", "Otro")]
('optica', 'Optica'),
('otro', 'Otro')]
class Party(metaclass=PoolMeta): class Party(metaclass=PoolMeta):
__name__ = 'party.party' __name__ = "party.party"
customer_type = fields.Selection(_CUSTOMER_TYPE, "Customer Type") customer_type = fields.Selection(_CUSTOMER_TYPE, "Customer Type")
@classmethod
def default_customer_type(csl):
return "otro"
class Address(metaclass=PoolMeta): class Address(metaclass=PoolMeta):
__name__ = 'party.address' __name__ = "party.address"
campus = fields.Boolean("Campus") campus = fields.Boolean("Campus")
party_related = fields.Many2One('party.party', "Party Related", party_related = fields.Many2One(
states ={ 'invisible': (~Eval("campus"))}) "party.party", "Party Related", states={"invisible": (~Eval("campus"))}
)

View File

@@ -2,25 +2,27 @@
<!-- 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="party_view_tree"> <data>
<record model="ir.ui.view" id="party_view_tree">
<field name="model">party.party</field> <field name="model">party.party</field>
<field name="inherit" ref="party.party_view_tree"/> <field name="inherit" ref="party.party_view_tree"/>
<field name="name">party_tree</field> <field name="name">party_tree</field>
</record> </record>
<record model="ir.ui.view" id="party_view_form"> <record model="ir.ui.view" id="party_view_form">
<field name="model">party.party</field> <field name="model">party.party</field>
<field name="inherit" ref="party.party_view_form"/> <field name="inherit" ref="party.party_view_form"/>
<field name="name">party_form</field> <field name="name">party_form</field>
</record> </record>
<!-- Party Address --> <!-- Party Address -->
<record model="ir.ui.view" id="address_view_tree"> <record model="ir.ui.view" id="address_view_tree">
<field name="model">party.address</field> <field name="model">party.address</field>
<field name="inherit" ref="party.address_view_tree"/> <field name="inherit" ref="party.address_view_tree"/>
<field name="name">address_tree</field> <field name="name">address_tree</field>
</record> </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"/>
<field name="name">address_form</field> <field name="name">address_form</field>
</record> </record>
</data>
</tryton> </tryton>

View File

@@ -1,182 +1,260 @@
# 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
from trytond.pool import Pool, PoolMeta from trytond.pool import Pool, PoolMeta
from trytond.model import ( from trytond.model import ModelView, ModelSQL, fields
ModelView, ModelSQL, fields, Exclude)
from trytond.pyson import Bool, If, Eval, Id from trytond.pyson import Bool, If, Eval, Id
_RISK = [('n/a', "No aplíca"), _RISK = [
('uno', 'I'), ("n/a", "No aplíca"),
('dosA', 'IIA'), ("uno", "I"),
('dosB', 'IIB')] ("dosA", "IIA"),
("dosB", "IIB")]
_USE = [('', ""), _USE = [
('medico', 'Médico'), ("", ""),
('basico', 'Basico'), ("medico", "Médico"),
('apoyo', 'Apoyo')] ("basico", "Basico"),
("apoyo", "Apoyo")]
_BIOMEDICAL_CLASS = [ _BIOMEDICAL_CLASS = [
('n/a', "No aplíca"), ("n/a", "No aplíca"),
('diagnostico', 'Diagnóstico'), ("diagnostico", "Diagnóstico"),
('rehabilitación', 'Rehabilitación')] ("rehabilitación", "Rehabilitación"),
]
_MAIN_TECNOLOGY = [ _MAIN_TECNOLOGY = [
('', ""), ("", ""),
('mecanico', 'Mecánico'), ("mecanico", "Mecánico"),
('electrico', 'Electrico'), ("electrico", "Electrico"),
('electronico', 'Electrónico'), ("electronico", "Electrónico"),
('hidraulico', 'Hidraulico'), ("hidraulico", "Hidraulico"),
('neumatico', 'Neumatico')] ("neumatico", "Neumatico"),
]
_EQUIPMENT_TYPE = [ _EQUIPMENT_TYPE = [
('', ""), ("", ""),
('mobiliario_optico', 'Mobiliario óptico'), ("mobiliario_optico", "Mobiliario óptico"),
('refraccion', 'Refracción'), ("refraccion", "Refracción"),
('medico', 'Medicion'), ("medico", "Medicion"),
('accesorios', 'Accesorios')] ("accesorios", "Accesorios"),
]
NON_MEASURABLE = ['service'] NON_MEASURABLE = ["service"]
class Template(metaclass=PoolMeta): class Template(metaclass=PoolMeta):
'Template' "Template"
__name__ = 'product.template' __name__ = "product.template"
product = fields.Many2One('optical_equipment.maintenance', "Maintenance Activity", product = fields.Many2One(
ondelete='CASCADE',) "optical_equipment.maintenance",
equipment = fields.Boolean('It is equipment', "Maintenance Activity",
states={'invisible': Eval('type', 'goods') != 'goods', ondelete="CASCADE",
}) )
maintenance_activity = fields.Boolean('Maintenance Activity', equipment = fields.Boolean(
states={'invisible': Eval('type', 'service') != 'service', "It is equipment",
'readonly': If(Eval('equipment', True), True) states={
| If(Eval('replacement', True), True) "invisible": Eval("type", "goods") != "goods",
}) },
replacement = fields.Boolean('Replacement', )
states={'invisible': Eval('type', 'goods') != 'goods', maintenance_activity = fields.Boolean(
'readonly': If(Eval('equipment', True), True) "Maintenance Activity",
| If(Eval('maintenance_activity', True), True) states={
}) "invisible": Eval("type", "service") != "service",
"readonly": If(Eval("equipment", True), True)
| If(Eval("replacement", True), True),
},
)
replacement = fields.Boolean(
"Replacement",
states={
"invisible": Eval("type", "goods") != "goods",
"readonly": If(Eval("equipment", True), True)
| If(Eval("maintenance_activity", True), True),
},
)
maintenance_required = fields.Boolean('Miantenance Required', maintenance_required = fields.Boolean(
states={'invisible': (Eval('type', 'goods') != 'goods')}) "Miantenance Required",
equipment_type = fields.Selection(_EQUIPMENT_TYPE, 'Equipment type', states={
states={'required': Eval('equipment', False)}) "invisible": (Eval("type", "goods") != "goods")}
risk = fields.Selection(_RISK, 'Type risk') )
use = fields.Selection(_USE, 'Use', equipment_type = fields.Selection(
states={'required': Eval('equipment', False)}, _EQUIPMENT_TYPE, "Equipment type",
depends={'equipment'}) states={"required": Eval("equipment", False)}
biomedical_class = fields.Selection(_BIOMEDICAL_CLASS, 'Biomedical Class', )
states={'required': Eval('equipment', False)}) risk = fields.Selection(_RISK, "Type risk")
main_tecnology = fields.Selection(_MAIN_TECNOLOGY, 'Main tecnology', use = fields.Selection(
states={'required': Eval('equipment', False)}) _USE,
"Use",
states={"required": Eval("equipment", False)},
depends={"equipment"},
)
biomedical_class = fields.Selection(
_BIOMEDICAL_CLASS,
"Biomedical Class",
states={"required": Eval("equipment", False)},
)
main_tecnology = fields.Selection(
_MAIN_TECNOLOGY, "Main tecnology",
states={"required": Eval("equipment", False)})
calibration = fields.Boolean("Apply calibration") calibration = fields.Boolean("Apply calibration")
observation = fields.Text('Observation') observation = fields.Text("Observation")
# Mark, Category, Reference # Mark, Category, Reference
mark_category = fields.Many2One('product.category', 'Mark', mark_category = fields.Many2One(
domain=[('parent', '=', None), "product.category",
('accounting', '=', False)], "Mark",
states={'required': Eval('equipment', False)}) domain=[("parent", "=", None), ("accounting", "=", False)],
model_category = fields.Many2One('product.category', "Model", states={"required": Eval("equipment", False)},
domain=[('parent', '=', Eval('mark_category')), )
('accounting', '=', False)], model_category = fields.Many2One(
states={'required': Eval('equipment', False)}) "product.category",
reference_category = fields.Many2One('product.category', "Reference", "Model",
domain=[('parent', '=', Eval('model_category'))],) domain=[
("parent", "=", Eval("mark_category")),
("accounting", "=", False)],
states={"required": Eval("equipment", False)})
reference_category = fields.Many2One(
"product.category",
"Reference",
states={
"required": (Eval("equipment", True))
},
domain=[("parent", "=", Eval("model_category"))])
# Iformation Equipment # Information Equipment
origin_country = fields.Many2One('country.country', "Origin Country") origin_country = fields.Many2One("country.country", "Origin Country")
refurbish = fields.Boolean('Refurbish') refurbish = fields.Boolean("Refurbish")
software_required = fields.Boolean("Software Required") software_required = fields.Boolean("Software Required")
software_version = fields.Char("Software version", software_version = fields.Char(
states={'invisible': If(~Eval('software_required'), True)}, "Software version",
depends={'software_required'}) states={"invisible": ~Eval("software_required", True)},
depends={"software_required"},
)
# These are measurements required for the equipments, are in this place # These are measurements required for the equipments, are in this place
# for manage of class 'product.template' # for manage of class 'product.template'
temperature_min = fields.Float("Temp Min") temperature_min = fields.Float("Temp Min")
temperature_max = fields.Float("Temp Max") temperature_max = fields.Float("Temp Max")
temperature_uom = fields.Many2One('product.uom', 'Temperature UOM', temperature_uom = fields.Many2One(
domain=[ "product.uom",
('category', '=', Id( "Temperature UOM",
'optical_equipment', "uom_cat_temperature"))], domain=[
states={'invisible': If(Eval('temperature_min') is None, True)}) ("category", "=", Id("optical_equipment", "uom_cat_temperature"))],
states={'invisible': (~Eval('temperature_min', True))}
)
frequency = fields.Float("Frequency") frequency = fields.Float("Frequency")
frequency_uom = fields.Many2One('product.uom', "Frequency UOM", frequency_uom = fields.Many2One(
domain=[ "product.uom",
('category', '=', Id( "Frequency UOM",
'optical_equipment', 'uom_cat_frequency'))], domain=[
states={'invisible': If(Eval('frequency') is None, True)} ("category", "=", Id("optical_equipment", "uom_cat_frequency"))],
) states={'invisible': (Eval('frequency', True))})
moisture_min = fields.Float("Moisture Min") moisture_min = fields.Float("Moisture Min")
moisture_max = fields.Float("Moisture Max") moisture_max = fields.Float("Moisture Max")
moisture_uom = fields.Many2One('product.uom', "Moisture UOM", moisture_uom = fields.Many2One(
domain=[ "product.uom",
('category', '=', Id( "Moisture UOM",
'optical_equipment', 'uom_cat_relative_humedity'))], domain=[
states={'invisible': If(Eval('moisture_min') is None, True)}, ("category", "=", Id(
) "optical_equipment", "uom_cat_relative_humedity"))
],
states={'invisible': (~Eval('moisture_min', True))})
electrical_equipment = fields.Boolean("Electrical Equipment") electrical_equipment = fields.Boolean("Electrical Equipment")
frequency = fields.Float("Frequency", frequency = fields.Float(
states={'invisible': ~Bool(Eval('electrical_equipment'))}) "Frequency", states={"invisible": ~Bool(Eval("electrical_equipment"))}
frequency_uom = fields.Many2One('product.uom', "Frequency UOM", )
domain=[ frequency_uom = fields.Many2One(
('category', '=', Id( "product.uom",
'optical_equipment', 'uom_cat_frequency'))], "Frequency UOM",
states={'invisible': If(Eval('frequency') is None, True) | domain=[
~Eval('electrical_equipment', True)}, ("category", "=", Id("optical_equipment", "uom_cat_frequency"))],
) states={'invisible': (~Eval('frequency', True))
voltageAC = fields.Float("Voltage AC", | ~Eval('electrical_equipment', True)},)
states={'invisible': ~Bool(Eval('electrical_equipment'))}) voltageAC = fields.Float(
voltageAC_uom = fields.Many2One('product.uom', "Voltage AC UOM", "Voltage AC", states={"invisible": ~Bool(Eval("electrical_equipment"))}
domain=[ )
('category', '=', Id( voltageAC_uom = fields.Many2One(
'optical_equipment', 'uom_cat_electrical_tension'))], "product.uom",
states={'invisible': If(Eval('voltageAC') is None, True) | "Voltage AC UOM",
~Eval('electrical_equipment', True)}, domain=[
) ("category", "=", Id(
voltageDC = fields.Float("Voltage DC", "optical_equipment", "uom_cat_electrical_tension"))
states={'invisible': ~Bool(Eval('electrical_equipment'))}) ],
voltageDC_uom = fields.Many2One('product.uom', "Voltage DC UOM", states={'invisible': (~Eval('voltageAC', True))
domain=[ | ~Eval('electrical_equipment', True)},
('category', '=', Id( )
'optical_equipment', 'uom_cat_electrical_tension'))], voltageDC = fields.Float(
states={'invisible': If(Eval('voltageDC') is None, True) | "Voltage DC", states={"invisible": ~Bool(Eval("electrical_equipment"))}
~Eval('electrical_equipment', True)},) )
voltageDC_uom = fields.Many2One(
"product.uom",
"Voltage DC UOM",
domain=[
("category", "=", Id(
"optical_equipment", "uom_cat_electrical_tension"))],
states={'invisible': (
~Eval('voltageDC', True) | ~Eval(
'electrical_equipment', True))},)
useful_life = fields.Integer("Useful life") useful_life = fields.Integer("Useful life")
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.Many2One(
states={'required': Eval('calibration', True)}) "optical_equipment.use_pattern",
measuring_range = fields.Selection([ "Use Pattern",
('dioptria', "Dioptria"), ondelete="RESTRICT",
('mmhg', "mmHg")], "Rango de Medición") states={"required": Eval("calibration", True)},)
MEP = fields.Float("MEP", states={'required': Eval('calibration', False)},) measuring_range = fields.Selection(
uncertainy_pattern = fields.Float("Uncertainy Pattern", states={'required': Eval('calibration', True)}, [("dioptria", "Dioptria"),
help="Agregar valores separados por ',' Ej:-5,+5,-10,+10") ("mmhg", "mmHg")], "Rango de Medición")
k_pattern = fields.Char("K Pattern", states={'required': Eval('calibration', False)}, MEP = fields.Float(
help="Agregar valores separados por ',' Ej:-5,+5,-10,+10") "MEP",
k_pattern_list = fields.One2Many('optical_equipment.product_pattern', 'product', "List of patterns K", states={"required": Eval("calibration", False)},)
states={'required': Eval('calibration', False)},) uncertainy_pattern = fields.Float(
resolution_type = fields.Selection([('', ""), "Uncertainy Pattern",
('analoga', "Analoga"), states={"required": Eval("calibration", True)},
('digital', "Digital")], "Resolution Type", help="Agregar valores separados por ',' Ej:-5,+5,-10,+10",)
states={'required': Eval('calibration', False)},) k_pattern = fields.Char(
d_resolution = fields.Float("Resolution d", "K Pattern",
states={'invisible': If(Eval('resolution_type') != 'digital', True)},) states={"required": Eval("calibration", False)},
analog_resolution = fields.Float("Analog resolution", help="Agregar valores separados por ',' Ej:-5,+5,-10,+10",
states={'invisible': If(Eval('resolution_type') != 'analoga', True), },) )
a_factor_resolution = fields.Float("(a) Resolution", k_pattern_list = fields.One2Many(
states={'invisible': If(Eval('resolution_type') != 'analoga', True)},) "optical_equipment.product_pattern",
Usubi = fields.Integer("Usub i", states={'required': Eval('calibration', False)},) "product",
"List of patterns K",
states={"required": Eval("calibration", False)},
)
resolution_type = fields.Selection(
[("", ""), ("analoga", "Analoga"), ("digital", "Digital")],
"Resolution Type",
states={"required": Eval("calibration", False)},
)
d_resolution = fields.Float(
"Resolution d",
states={
'invisible': (Eval('resolution_type') != 'digital'),
'required': (Eval('resolution_type') == 'digital')
})
analog_resolution = fields.Float(
"Analog resolution",
states={'invisible': (Eval('resolution_type') != 'analoga'), },
)
a_factor_resolution = fields.Float(
"(a) Resolution",
states={'invisible': (Eval('resolution_type') != 'analoga')},
)
Usubi = fields.Integer("Usub i", states={
"required": Eval("calibration", False)})
# maintenance activities # maintenance activities
initial_operation = fields.Boolean("Verificación inicial de funcionamiento") initial_operation = fields.Boolean(
"Verificación inicial de funcionamiento")
check_equipment = fields.Boolean("Revisión del Equipo") check_equipment = fields.Boolean("Revisión del Equipo")
check_electric_system = fields.Boolean("Revisión del sistema electríco") check_electric_system = fields.Boolean("Revisión del sistema electríco")
clean_int_ext = fields.Boolean("Limpieza interior y exterior") clean_int_ext = fields.Boolean("Limpieza interior y exterior")
@@ -190,27 +268,37 @@ class Template(metaclass=PoolMeta):
@classmethod @classmethod
def view_attributes(cls): def view_attributes(cls):
return super(Template, cls).view_attributes() + [ return super(Template, cls).view_attributes() + [
('//page[@id="features"]', 'states', { (
'invisible': ~Eval('equipment'), }), "//page[@id='features']",
('//page[@id="calibration"]', 'states', { "states",
'invisible': ~Eval('calibration')},), {
('//page[@id="maintenance_activities"]', 'states', { "invisible": ~Eval("equipment"),
'invisible': ~Eval('maintenance_required')},) },
),
(
"//page[@id='calibration']",
"states",
{"invisible": ~Eval("calibration")},
),
(
"//page[@id='maintenance_activities']",
"states",
{"invisible": ~Eval("maintenance_required")},
),
] ]
@classmethod @classmethod
@fields.depends('measuring_range') @fields.depends("measuring_range")
def default_measuring_range(self): def default_measuring_range(self):
return 'dioptria' return "dioptria"
@classmethod @classmethod
@fields.depends('temperature_min') @fields.depends("temperature_min")
def default_temperature_min(self): def default_temperature_min(self):
return 0 return 0
@classmethod @classmethod
@fields.depends('temperature_max') @fields.depends("temperature_max")
def default_temperature_max(self): def default_temperature_max(self):
return 0 return 0
@@ -235,13 +323,13 @@ class Template(metaclass=PoolMeta):
return 0 return 0
def default_risk(): def default_risk():
return 'n/a' return "n/a"
def default_use(): def default_use():
return None return None
def default_biomedical_class(): def default_biomedical_class():
return 'n/a' return "n/a"
def default_main_tecnology(): def default_main_tecnology():
return None return None
@@ -252,68 +340,66 @@ class Template(metaclass=PoolMeta):
def default_refurbish(): def default_refurbish():
return False return False
def default_refurbish():
return False
@classmethod @classmethod
@fields.depends('temperature') @fields.depends("temperature")
def default_temperature_uom(self): def default_temperature_uom(self):
pool = Pool() pool = Pool()
Measurements = pool.get('product.uom') Measurements = pool.get("product.uom")
measurement = Measurements.search(['name', '=', 'Celsius'])[0].id measurement = Measurements.search(["name", "=", "Celsius"])[0].id
return measurement return measurement
@classmethod @classmethod
def default_frequency_uom(cls): def default_frequency_uom(cls):
pool = Pool() pool = Pool()
Measurements = pool.get('product.uom') Measurements = pool.get("product.uom")
measurement = Measurements.search(['name', '=', 'Hertz'])[0].id measurement = Measurements.search(["name", "=", "Hertz"])[0].id
return measurement return measurement
@classmethod @classmethod
def default_moisture_uom(cls): def default_moisture_uom(cls):
pool = Pool() pool = Pool()
Measurements = pool.get('product.uom') Measurements = pool.get("product.uom")
measurement = Measurements.search(['name', '=', 'Relative Humedity'])[0].id measurement = Measurements.search(
["name", "=", "Relative Humedity"])[0].id
return measurement return measurement
@classmethod @classmethod
def default_voltageAC_uom(cls): def default_voltageAC_uom(cls):
pool = Pool() pool = Pool()
Measurements = pool.get('product.uom') Measurements = pool.get("product.uom")
measurement = Measurements.search(['name', '=', 'Volt'])[0].id measurement = Measurements.search(["name", "=", "Volt"])[0].id
return measurement return measurement
@classmethod @classmethod
def default_voltageDC_uom(cls): def default_voltageDC_uom(cls):
pool = Pool() pool = Pool()
Measurements = pool.get('product.uom') Measurements = pool.get("product.uom")
measurement = Measurements.search(['name', '=', 'Volt'])[0].id measurement = Measurements.search(["name", "=", "Volt"])[0].id
return measurement return measurement
@fields.depends('voltageDC', 'voltageDC_uom') @fields.depends("voltageDC", "voltageDC_uom")
def on_change_voltageDC_uom(self): def on_change_voltageDC_uom(self):
pool = Pool() pool = Pool()
Measurements = pool.get('product.uom') Measurements = pool.get("product.uom")
measurement = Measurements.search(['name', '=', 'Volt'])[0].id measurement = Measurements.search(["name", "=", "Volt"])[0].id
self.voltageDC_uom = measurement self.voltageDC_uom = measurement
@fields.depends('software_required', 'software_version') # @fields.depends('software_required', 'software_version')
def on_change_with_sotfware_required(self): # def on_change_with_sotfware_required(self):
self.software_version = None # self.software_version = None
@fields.depends('d_resolution', 'analog_resolution', 'a_factor_resolution') @fields.depends("d_resolution", "analog_resolution", "a_factor_resolution")
def on_change_resolution_type(self): def on_change_resolution_type(self):
self.d_resolution = None self.d_resolution = None
self.analog_resolution = None self.analog_resolution = None
self.a_factor_resolution = None self.a_factor_resolution = None
@fields.depends('equipment', 'replacement') @fields.depends("equipment", "replacement")
def on_change_equipment(self): def on_change_equipment(self):
if self.equipment: if self.equipment:
self.replacement = False self.replacement = False
@@ -323,24 +409,24 @@ class Template(metaclass=PoolMeta):
self.model_category = None self.model_category = None
self.reference_category = None self.reference_category = None
self.equipment_type = None self.equipment_type = None
self.risk = 'n/a' self.risk = "n/a"
self.biomedical_class = 'n/a' self.biomedical_class = "n/a"
self.use = '' self.use = ""
self.useful_life = 0 self.useful_life = 0
self.warranty = 0 self.warranty = 0
@fields.depends('mark_category', 'model_category', 'reference_category') @fields.depends("mark_category", "model_category", "reference_category")
def on_change_mark_category(self): def on_change_mark_category(self):
if not self.mark_category: if not self.mark_category:
self.model_category = None self.model_category = None
self.reference_category = None self.reference_category = None
@fields.depends('model_category', 'reference_category') @fields.depends("model_category", "reference_category")
def on_change_model_category(self): def on_change_model_category(self):
if not self.model_category: if not self.model_category:
self.reference_category = None self.reference_category = None
@fields.depends('electrical_equipment') @fields.depends("electrical_equipment")
def on_change_electrical_equipment(self): def on_change_electrical_equipment(self):
if self.electrical_equipment: if self.electrical_equipment:
self.voltageAC = 0 self.voltageAC = 0
@@ -353,13 +439,13 @@ class Template(metaclass=PoolMeta):
default = {} default = {}
else: else:
default = default.copy() default = default.copy()
default.setdefault('code', None) default.setdefault("code", None)
default.setdefault('images', None) default.setdefault("images", None)
return super().copy(templates, default=default) return super().copy(templates, default=default)
class Product(metaclass=PoolMeta): class Product(metaclass=PoolMeta):
__name__ = 'product.product' __name__ = "product.product"
@classmethod @classmethod
def copy(cls, products, default=None): def copy(cls, products, default=None):
@@ -368,15 +454,15 @@ class Product(metaclass=PoolMeta):
else: else:
default = default.copy() default = default.copy()
default.setdefault('suffix_code', None) default.setdefault("suffix_code", None)
default.setdefault('code', None) default.setdefault("code", None)
default.setdefault('poduct', None) default.setdefault("poduct", None)
default.setdefault('images', None) default.setdefault("images", None)
return super().copy(products, default=default) return super().copy(products, default=default)
class Image(metaclass=PoolMeta): class Image(metaclass=PoolMeta):
__name__ = 'product.image' __name__ = "product.image"
@classmethod @classmethod
def __setup__(cls): def __setup__(cls):
@@ -388,29 +474,30 @@ class Image(metaclass=PoolMeta):
default = {} default = {}
else: else:
default = default.copy() default = default.copy()
default.setdefault('template', None) default.setdefault("template", None)
default.setdefault('product', None) default.setdefault("product", None)
return super().copy(images, default=default) return super().copy(images, default=default)
class UsePattern(ModelSQL, ModelView): class UsePattern(ModelSQL, ModelView):
"Use Pattern" "Use Pattern"
__name__ = 'optical_equipment.use_pattern' __name__ = "optical_equipment.use_pattern"
_rec_name = 'name_pattern' _rec_name = "name_pattern"
name_pattern = fields.Char('Name Pattern', required=True) name_pattern = fields.Char("Name Pattern", required=True)
class Pattern(ModelSQL, ModelView): class Pattern(ModelSQL, ModelView):
"Pattern K of equipment" "Pattern K of equipment"
__name__ = 'optical_equipment.product_pattern' __name__ = "optical_equipment.product_pattern"
_rec_name = 'rec_name' _rec_name = "rec_name"
product = fields.Many2One('product.template', "Template", ondelete='CASCADE') product = fields.Many2One(
"product.template", "Template", ondelete="CASCADE")
pattern = fields.Float("Value Pattern") pattern = fields.Float("Value Pattern")
rec_name = fields.Function(fields.Char('rec_name'), 'get_rec_name') rec_name = fields.Function(fields.Char("rec_name"), "get_rec_name")
@fields.depends('pattern') @fields.depends("pattern")
def get_rec_name(self, name): def get_rec_name(self, name):
if self.pattern: if self.pattern:
return str(self.pattern) return str(self.pattern)

View File

@@ -43,13 +43,13 @@
<record model="ir.ui.view" id="template_view_form1"> <record model="ir.ui.view" id="template_view_form1">
<field name="model">product.template</field> <field name="model">product.template</field>
<field name="inherit" ref="product.template_view_form"/> <field name="inherit" ref="product.template_view_form"/>
<field name="name">template_form</field> <field name="name">template_form</field>
</record>
<record model="ir.ui.view" id="template_view_tree1">
<field name="model">product.template</field>
<field name="inherit" ref="product.template_view_tree"/>
<field name="name">template_tree</field>
</record> </record>
<!-- <record model="ir.ui.view" id="template_view_tree1"> -->
<!-- <field name="model">product.template</field> -->
<!-- <field name="inherit" ref="product.template_view_tree"/> -->
<!-- <field name="name">template_tree</field> -->
<!-- </record> -->
<record model="ir.ui.view" id="pattern_view_form"> <record model="ir.ui.view" id="pattern_view_form">
<field name="model">optical_equipment.product_pattern</field> <field name="model">optical_equipment.product_pattern</field>
<field name="type">form</field> <field name="type">form</field>

View File

@@ -1,18 +1,16 @@
#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
#txhis repository contains the full copyright notices and license terms # txhis repository contains the full copyright notices and license terms
from trytond.pool import Pool, PoolMeta from trytond.pool import Pool, PoolMeta
from trytond.model import ( from trytond.model import ModelView, fields
ModelView, ModelSQL, Workflow, fields) from trytond.modules.product import round_price
from trytond.modules.product import price_digits, round_price
from trytond.pyson import Eval, If, Bool from trytond.pyson import Eval, If, Bool
from trytond.exceptions import UserError from trytond.exceptions import UserError
from trytond.i18n import gettext
from trytond.transaction import Transaction from trytond.transaction import Transaction
class Purchase(metaclass=PoolMeta): class Purchase(metaclass=PoolMeta):
"Purchase Equipment" "Purchase Equipment"
__name__ = 'purchase.purchase' __name__ = "purchase.purchase"
equipment_create = fields.Boolean("Equipments Creates", readonly=True) equipment_create = fields.Boolean("Equipments Creates", readonly=True)
@@ -20,10 +18,11 @@ class Purchase(metaclass=PoolMeta):
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(Eval('invoice_state') == 'none', True) | "invisible": If(Eval("invoice_state") == "none", True)
If(Bool(Eval('equipment_create')), True), | If(Bool(Eval("equipment_create")), True),
'depends': ['invoice_state'],}}) "depends": ["invoice_state"]}
})
@classmethod @classmethod
def copy(cls, purchases, default=None): def copy(cls, purchases, default=None):
@@ -32,15 +31,15 @@ class Purchase(metaclass=PoolMeta):
else: else:
default = default.copy() default = default.copy()
default.setdefault('number', None) default.setdefault("number", None)
default.setdefault('invoice_state', 'none') default.setdefault("invoice_state", "none")
default.setdefault('invoices_ignored', None) default.setdefault("invoices_ignored", None)
default.setdefault('moves', None) default.setdefault("moves", None)
default.setdefault('shipment_state', 'none') default.setdefault("shipment_state", "none")
default.setdefault('purchase_date', None) default.setdefault("purchase_date", None)
default.setdefault('quoted_by') default.setdefault("quoted_by")
default.setdefault('confirmed_by') default.setdefault("confirmed_by")
default.setdefault('equipment_create', None) default.setdefault("equipment_create", None)
return super(Purchase, cls).copy(purchases, default=default) return super(Purchase, cls).copy(purchases, default=default)
@@ -49,96 +48,124 @@ class Purchase(metaclass=PoolMeta):
def create_equipments(cls, purchases): def create_equipments(cls, purchases):
if len(purchases) == 1: if len(purchases) == 1:
pool = Pool() pool = Pool()
Equipment = pool.get('optical_equipment.equipment') Equipment = pool.get("optical_equipment.equipment")
Config = pool.get('optical_equipment.configuration')
config = Config(1)
purchase = purchases[0] purchase = purchases[0]
for line in purchase.lines: for line in purchase.lines:
if line.product.equipment: if not line.product.equipment:
for i in range(0,int(line.quantity)):
equipment = Equipment(
company=line.company,
location=line.to_location,
equipment_type=line.product.equipment_type,
propietary=line.company.party,
propietary_address=line.address_equipment,
product=line.product,
model_category=line.product.model_category,
mark_category=line.product.mark_category,
reference_category=line.product.reference_category,
useful_life=line.product.useful_life if line.product.useful_life else 0,
calibration=True if line.product.calibration else False,
warranty=line.product.warranty if line.product.warranty else 0,
risk=line.product.risk,
origin_country=line.product.origin_country,
use=line.product.use,
biomedical_class=line.product.biomedical_class,
refurbish=line.refurbish,
serial=None if line.quantity > 1 else line.serial_equipment,
health_register=line.health_register,
software_version=line.product.software_version if line.product.software_required else "No Aplica",
maintenance_frequency="none",
purchase_origin=line,
)
equipment.save()
else:
continue continue
for i in range(0, int(line.quantity)):
equipment = Equipment(
company=line.company,
location=line.to_location,
equipment_type=line.product.equipment_type,
propietary=line.company.party,
propietary_address=line.address_equipment,
product=line.product,
model_category=line.product.model_category,
mark_category=line.product.mark_category,
reference_category=line.product.reference_category,
useful_life=(
line.product.useful_life if
line.product.useful_life else 0
),
calibration=(
True if line.product.calibration
else False),
warranty=(
line.product.warranty if
line.product.warranty else 0),
risk=line.product.risk,
origin_country=line.product.origin_country,
use=line.product.use,
biomedical_class=line.product.biomedical_class,
refurbish=line.refurbish,
serial=(None if line.quantity > 1
else line.serial_equipment),
health_register=line.health_register,
software_version=(
line.product.software_version
if line.product.software_required
else "No Aplica"
),
maintenance_frequency="none",
purchase_origin=line,
)
equipment.save()
purchase.equipment_create = True purchase.equipment_create = True
cls.save(purchases) cls.save(purchases)
else: else:
raise UserError(str("Número de Compras Invalido.")) raise UserError(str("Número de Compras Invalido."))
class Line(metaclass=PoolMeta): class Line(metaclass=PoolMeta):
"Purchase Line Equipment" "Purchase Line Equipment"
__name__ = 'purchase.line' __name__ = "purchase.line"
origin_country = fields.Many2One('country.country',"Origin Country") origin_country = fields.Many2One("country.country", "Origin Country")
address_equipment = fields.Many2One('party.address', "Direccion", required=True) address_equipment = fields.Many2One(
serial_equipment = fields.Char("Serial", size=None, "party.address", "Direccion", required=True)
states={'invisible': If(Eval('quantity') > 1, True)}) serial_equipment = fields.Char(
"Serial",
size=None,
# states={'invisible': Decimal(Eval('quantity')) > 1}
)
refurbish = fields.Boolean("Refurbish") refurbish = fields.Boolean("Refurbish")
product_equipment = fields.Boolean("Product Equipment", product_equipment = fields.Boolean(
states={'readonly': True}) "Product Equipment", states={"readonly": True})
software_version = fields.Char("Software version") software_version = fields.Char("Software version")
health_register = fields.Char("Health Register", states={'required': Eval('product_equipment', True)}) health_register = fields.Char(
"Health Register", states={"required": Eval("product_equipment", True)}
)
@classmethod @classmethod
def default_address_equipment(cls): def default_address_equipment(cls):
pool = Pool() pool = Pool()
Company = pool.get('company.company') Company = pool.get("company.company")
company = Transaction().context.get('company') company = Transaction().context.get("company")
if company: if company:
company = Company(company) company = Company(company)
return company.party.addresses[0].id return company.party.addresses[0].id
@fields.depends( @fields.depends(
'product', 'quantity', methods=['_get_context_purchase_price']) "product", "quantity", methods=["_get_context_purchase_price"])
def on_change_quantity(self): def on_change_quantity(self):
Product = Pool().get('product.product') Product = Pool().get("product.product")
if self.quantity > 1 or self.quantity < 1: if self.quantity and (self.quantity > 1 or self.quantity < 1):
self.serial_equipment = None self.serial_equipment = None
if not self.product: if not self.product:
self.serial_equipment = None self.serial_equipment = None
return return
with Transaction().set_context(self._get_context_purchase_price()): with Transaction().set_context(self._get_context_purchase_price()):
self.unit_price = Product.get_purchase_price([self.product], self.unit_price = Product.get_purchase_price(
abs(self.quantity or 0))[self.product.id] [self.product], abs(self.quantity or 0)
)[self.product.id]
if self.unit_price: if self.unit_price:
self.unit_price = round_price(self.unit_price) self.unit_price = round_price(self.unit_price)
@fields.depends('product', 'unit', 'purchase', '_parent_purchase.party', @fields.depends(
'_parent_purchase.invoice_party', 'product_supplier', 'product_equipment', "product",
'serial_equipment', 'software_version', 'health_register', "unit",
'refurbish', methods=['compute_taxes', 'compute_unit_price', "purchase",
'_get_product_supplier_pattern']) "_parent_purchase.party",
"_parent_purchase.invoice_party",
"product_supplier",
"product_equipment",
"serial_equipment",
"software_version",
"health_register",
"refurbish",
methods=[
"compute_taxes",
"compute_unit_price",
"_get_product_supplier_pattern",])
def on_change_product(self): def on_change_product(self):
if not self.product: if not self.product:
self.product_equipment = False self.product_equipment = False
@@ -164,27 +191,30 @@ class Line(metaclass=PoolMeta):
if not self.unit or self.unit.category != category: if not self.unit or self.unit.category != category:
self.unit = self.product.purchase_uom self.unit = self.product.purchase_uom
product_suppliers = list(self.product.product_suppliers_used( product_suppliers = list(
**self._get_product_supplier_pattern())) self.product.product_suppliers_used(
**self._get_product_supplier_pattern())
)
if len(product_suppliers) == 1: if len(product_suppliers) == 1:
self.product_supplier, = product_suppliers (self.product_supplier,) = product_suppliers
elif (self.product_supplier elif (self.product_supplier
and self.product_supplier not in product_suppliers): and self.product_supplier not in product_suppliers):
self.product_supplier = None self.product_supplier = None
self.unit_price = self.compute_unit_price() self.unit_price = self.compute_unit_price()
self.type = 'line' self.type = "line"
self.amount = self.on_change_with_amount() self.amount = self.on_change_with_amount()
if self.product.equipment: if self.product.equipment:
self.product_equipment = True self.product_equipment = True
self.address_equipment = self.default_address_equipment() self.address_equipment = self.default_address_equipment()
if self.product.software_required: if self.product.software_required:
self.software_version = self.product.software_version self.software_version = self.product.software_version
@classmethod @classmethod
def view_attributes(cls): def view_attributes(cls):
return super(Line, cls).view_attributes() + [ return super(Line, cls).view_attributes() + [
('//page[@id="equipment"]', 'states', { ('//page[@id="equipment"]', "states",
'invisible': ~Eval('product_equipment', True), {
})] "invisible": ~Eval("product_equipment", True),
})]

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,24 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<office:document xmlns:css3t="http://www.w3.org/TR/css3-text/" xmlns:grddl="http://www.w3.org/2003/g/data-view#" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:dom="http://www.w3.org/2001/xml-events" xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:ooo="http://openoffice.org/2004/office" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" xmlns:ooow="http://openoffice.org/2004/writer" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:drawooo="http://openoffice.org/2010/draw" xmlns:oooc="http://openoffice.org/2004/calc" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" xmlns:tableooo="http://openoffice.org/2009/table" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:rpt="http://openoffice.org/2005/report" xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:officeooo="http://openoffice.org/2009/office" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0" office:version="1.3" office:mimetype="application/vnd.oasis.opendocument.text"> <office:document xmlns:css3t="http://www.w3.org/TR/css3-text/" xmlns:grddl="http://www.w3.org/2003/g/data-view#" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:dom="http://www.w3.org/2001/xml-events" xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:ooo="http://openoffice.org/2004/office" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" xmlns:ooow="http://openoffice.org/2004/writer" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:drawooo="http://openoffice.org/2010/draw" xmlns:oooc="http://openoffice.org/2004/calc" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" xmlns:tableooo="http://openoffice.org/2009/table" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:rpt="http://openoffice.org/2005/report" xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:officeooo="http://openoffice.org/2009/office" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0" office:version="1.3" office:mimetype="application/vnd.oasis.opendocument.text">
<office:meta><meta:creation-date>2022-11-03T17:09:30.500078764</meta:creation-date><dc:date>2023-12-07T22:30:22.616967086</dc:date><meta:editing-duration>PT2H40M53S</meta:editing-duration><meta:editing-cycles>64</meta:editing-cycles><meta:generator>LibreOffice/7.5.8.2$Linux_X86_64 LibreOffice_project/50$Build-2</meta:generator><meta:document-statistic meta:table-count="6" meta:image-count="1" meta:object-count="0" meta:page-count="4" meta:paragraph-count="100" meta:word-count="285" meta:character-count="3434" meta:non-whitespace-character-count="3232"/></office:meta> <office:meta><meta:creation-date>2022-11-03T17:09:30.500078764</meta:creation-date><dc:date>2024-04-24T22:52:51.232560466</dc:date><meta:editing-duration>PT2H46M44S</meta:editing-duration><meta:editing-cycles>66</meta:editing-cycles><meta:generator>LibreOffice/7.6.5.2$Linux_X86_64 LibreOffice_project/60$Build-2</meta:generator><meta:document-statistic meta:table-count="6" meta:image-count="1" meta:object-count="0" meta:page-count="3" meta:paragraph-count="100" meta:word-count="285" meta:character-count="3467" meta:non-whitespace-character-count="3265"/></office:meta>
<office:settings> <office:settings>
<config:config-item-set config:name="ooo:view-settings"> <config:config-item-set config:name="ooo:view-settings">
<config:config-item config:name="ViewAreaTop" config:type="long">48830</config:config-item> <config:config-item config:name="ViewAreaTop" config:type="long">13153</config:config-item>
<config:config-item config:name="ViewAreaLeft" config:type="long">0</config:config-item> <config:config-item config:name="ViewAreaLeft" config:type="long">0</config:config-item>
<config:config-item config:name="ViewAreaWidth" config:type="long">36117</config:config-item> <config:config-item config:name="ViewAreaWidth" config:type="long">36042</config:config-item>
<config:config-item config:name="ViewAreaHeight" config:type="long">16425</config:config-item> <config:config-item config:name="ViewAreaHeight" config:type="long">15725</config:config-item>
<config:config-item config:name="ShowRedlineChanges" config:type="boolean">true</config:config-item> <config:config-item config:name="ShowRedlineChanges" config:type="boolean">true</config:config-item>
<config:config-item config:name="InBrowseMode" config:type="boolean">false</config:config-item> <config:config-item config:name="InBrowseMode" config:type="boolean">false</config:config-item>
<config:config-item-map-indexed config:name="Views"> <config:config-item-map-indexed config:name="Views">
<config:config-item-map-entry> <config:config-item-map-entry>
<config:config-item config:name="ViewId" config:type="string">view2</config:config-item> <config:config-item config:name="ViewId" config:type="string">view2</config:config-item>
<config:config-item config:name="ViewLeft" config:type="long">9264</config:config-item> <config:config-item config:name="ViewLeft" config:type="long">10208</config:config-item>
<config:config-item config:name="ViewTop" config:type="long">66677</config:config-item> <config:config-item config:name="ViewTop" config:type="long">17096</config:config-item>
<config:config-item config:name="VisibleLeft" config:type="long">0</config:config-item> <config:config-item config:name="VisibleLeft" config:type="long">0</config:config-item>
<config:config-item config:name="VisibleTop" config:type="long">48830</config:config-item> <config:config-item config:name="VisibleTop" config:type="long">13153</config:config-item>
<config:config-item config:name="VisibleRight" config:type="long">36116</config:config-item> <config:config-item config:name="VisibleRight" config:type="long">36040</config:config-item>
<config:config-item config:name="VisibleBottom" config:type="long">65253</config:config-item> <config:config-item config:name="VisibleBottom" config:type="long">28877</config:config-item>
<config:config-item config:name="ZoomType" config:type="short">0</config:config-item> <config:config-item config:name="ZoomType" config:type="short">0</config:config-item>
<config:config-item config:name="ViewLayoutColumns" config:type="short">1</config:config-item> <config:config-item config:name="ViewLayoutColumns" config:type="short">1</config:config-item>
<config:config-item config:name="ViewLayoutBookMode" config:type="boolean">false</config:config-item> <config:config-item config:name="ViewLayoutBookMode" config:type="boolean">false</config:config-item>
@@ -28,117 +28,118 @@
<config:config-item config:name="AnchoredTextOverflowLegacy" config:type="boolean">false</config:config-item> <config:config-item config:name="AnchoredTextOverflowLegacy" config:type="boolean">false</config:config-item>
<config:config-item config:name="LegacySingleLineFontwork" config:type="boolean">false</config:config-item> <config:config-item config:name="LegacySingleLineFontwork" config:type="boolean">false</config:config-item>
<config:config-item config:name="ConnectorUseSnapRect" config:type="boolean">false</config:config-item> <config:config-item config:name="ConnectorUseSnapRect" config:type="boolean">false</config:config-item>
<config:config-item config:name="IgnoreBreakAfterMultilineField" config:type="boolean">false</config:config-item>
</config:config-item-map-entry> </config:config-item-map-entry>
</config:config-item-map-indexed> </config:config-item-map-indexed>
</config:config-item-set> </config:config-item-set>
<config:config-item-set config:name="ooo:configuration-settings"> <config:config-item-set config:name="ooo:configuration-settings">
<config:config-item config:name="PrintRightPages" config:type="boolean">true</config:config-item>
<config:config-item config:name="PrintProspectRTL" config:type="boolean">false</config:config-item> <config:config-item config:name="PrintProspectRTL" config:type="boolean">false</config:config-item>
<config:config-item config:name="PrintLeftPages" config:type="boolean">true</config:config-item> <config:config-item config:name="PrintPageBackground" config:type="boolean">true</config:config-item>
<config:config-item config:name="PrintPaperFromSetup" config:type="boolean">false</config:config-item> <config:config-item config:name="PrintDrawings" config:type="boolean">true</config:config-item>
<config:config-item config:name="PrintControls" config:type="boolean">true</config:config-item>
<config:config-item config:name="PrintProspect" config:type="boolean">false</config:config-item>
<config:config-item config:name="PrintBlackFonts" config:type="boolean">false</config:config-item>
<config:config-item config:name="PrintAnnotationMode" config:type="short">0</config:config-item>
<config:config-item config:name="PrintEmptyPages" config:type="boolean">true</config:config-item>
<config:config-item config:name="PrintSingleJobs" config:type="boolean">false</config:config-item>
<config:config-item config:name="AutoFirstLineIndentDisregardLineSpace" config:type="boolean">false</config:config-item>
<config:config-item config:name="HeaderSpacingBelowLastPara" config:type="boolean">true</config:config-item>
<config:config-item config:name="ProtectBookmarks" config:type="boolean">false</config:config-item>
<config:config-item config:name="ContinuousEndnotes" config:type="boolean">false</config:config-item>
<config:config-item config:name="DisableOffPagePositioning" config:type="boolean">false</config:config-item>
<config:config-item config:name="PrintTables" config:type="boolean">true</config:config-item>
<config:config-item config:name="SubtractFlysAnchoredAtFlys" config:type="boolean">false</config:config-item>
<config:config-item config:name="ApplyParagraphMarkFormatToNumbering" config:type="boolean">true</config:config-item>
<config:config-item config:name="PrintFaxName" config:type="string"/> <config:config-item config:name="PrintFaxName" config:type="string"/>
<config:config-item config:name="PrintReversed" config:type="boolean">false</config:config-item>
<config:config-item config:name="PrintAnnotationMode" config:type="short">0</config:config-item>
<config:config-item config:name="PrintHiddenText" config:type="boolean">false</config:config-item>
<config:config-item config:name="PrintEmptyPages" config:type="boolean">true</config:config-item>
<config:config-item config:name="PrintGraphics" config:type="boolean">true</config:config-item>
<config:config-item config:name="NoNumberingShowFollowBy" config:type="boolean">false</config:config-item>
<config:config-item config:name="HyphenateURLs" config:type="boolean">true</config:config-item>
<config:config-item config:name="ImagePreferredDPI" config:type="int">0</config:config-item>
<config:config-item config:name="FootnoteInColumnToPageEnd" config:type="boolean">true</config:config-item>
<config:config-item config:name="GutterAtTop" config:type="boolean">false</config:config-item>
<config:config-item config:name="ContinuousEndnotes" config:type="boolean">false</config:config-item>
<config:config-item config:name="FrameAutowidthWithMorePara" config:type="boolean">true</config:config-item>
<config:config-item config:name="SubtractFlysAnchoredAtFlys" config:type="boolean">false</config:config-item>
<config:config-item config:name="SurroundTextWrapSmall" config:type="boolean">true</config:config-item> <config:config-item config:name="SurroundTextWrapSmall" config:type="boolean">true</config:config-item>
<config:config-item config:name="PrintControls" config:type="boolean">true</config:config-item>
<config:config-item config:name="TreatSingleColumnBreakAsPageBreak" config:type="boolean">false</config:config-item> <config:config-item config:name="TreatSingleColumnBreakAsPageBreak" config:type="boolean">false</config:config-item>
<config:config-item config:name="PropLineSpacingShrinksFirstLine" config:type="boolean">true</config:config-item>
<config:config-item config:name="TabOverSpacing" config:type="boolean">false</config:config-item> <config:config-item config:name="TabOverSpacing" config:type="boolean">false</config:config-item>
<config:config-item config:name="AutoFirstLineIndentDisregardLineSpace" config:type="boolean">false</config:config-item>
<config:config-item config:name="TabOverMargin" config:type="boolean">true</config:config-item> <config:config-item config:name="TabOverMargin" config:type="boolean">true</config:config-item>
<config:config-item config:name="EmbedComplexScriptFonts" config:type="boolean">true</config:config-item> <config:config-item config:name="EmbedComplexScriptFonts" config:type="boolean">true</config:config-item>
<config:config-item config:name="EmbedLatinScriptFonts" config:type="boolean">true</config:config-item>
<config:config-item config:name="EmbedOnlyUsedFonts" config:type="boolean">false</config:config-item>
<config:config-item config:name="EmbedFonts" config:type="boolean">false</config:config-item>
<config:config-item config:name="ClippedPictures" config:type="boolean">false</config:config-item>
<config:config-item config:name="FrameAutowidthWithMorePara" config:type="boolean">true</config:config-item>
<config:config-item config:name="FloattableNomargins" config:type="boolean">false</config:config-item>
<config:config-item config:name="UnbreakableNumberings" config:type="boolean">false</config:config-item>
<config:config-item config:name="AllowPrintJobCancel" config:type="boolean">true</config:config-item>
<config:config-item config:name="UseFormerObjectPositioning" config:type="boolean">false</config:config-item>
<config:config-item config:name="UseOldNumbering" config:type="boolean">false</config:config-item>
<config:config-item config:name="RsidRoot" config:type="int">687431</config:config-item>
<config:config-item config:name="PrinterPaperFromSetup" config:type="boolean">false</config:config-item>
<config:config-item config:name="CurrentDatabaseDataSource" config:type="string"/>
<config:config-item config:name="UpdateFromTemplate" config:type="boolean">true</config:config-item>
<config:config-item config:name="AddFrameOffsets" config:type="boolean">true</config:config-item>
<config:config-item config:name="LoadReadonly" config:type="boolean">false</config:config-item>
<config:config-item config:name="Rsid" config:type="int">3473529</config:config-item>
<config:config-item config:name="FootnoteInColumnToPageEnd" config:type="boolean">true</config:config-item>
<config:config-item config:name="ProtectFields" config:type="boolean">false</config:config-item>
<config:config-item config:name="SaveGlobalDocumentLinks" config:type="boolean">false</config:config-item>
<config:config-item config:name="ClipAsCharacterAnchoredWriterFlyFrames" config:type="boolean">false</config:config-item>
<config:config-item config:name="LinkUpdateMode" config:type="short">1</config:config-item>
<config:config-item config:name="AddExternalLeading" config:type="boolean">true</config:config-item>
<config:config-item config:name="PrintGraphics" config:type="boolean">true</config:config-item>
<config:config-item config:name="EmbedSystemFonts" config:type="boolean">false</config:config-item>
<config:config-item config:name="IsLabelDocument" config:type="boolean">false</config:config-item>
<config:config-item config:name="AddParaLineSpacingToTableCells" config:type="boolean">true</config:config-item>
<config:config-item config:name="UseFormerTextWrapping" config:type="boolean">false</config:config-item>
<config:config-item config:name="HyphenateURLs" config:type="boolean">true</config:config-item>
<config:config-item config:name="AddParaTableSpacingAtStart" config:type="boolean">true</config:config-item>
<config:config-item config:name="TabsRelativeToIndent" config:type="boolean">false</config:config-item>
<config:config-item config:name="FieldAutoUpdate" config:type="boolean">true</config:config-item>
<config:config-item config:name="SaveVersionOnClose" config:type="boolean">false</config:config-item>
<config:config-item config:name="ChartAutoUpdate" config:type="boolean">true</config:config-item>
<config:config-item config:name="ImagePreferredDPI" config:type="int">0</config:config-item>
<config:config-item config:name="PrinterSetup" config:type="base64Binary"/>
<config:config-item config:name="SmallCapsPercentage66" config:type="boolean">false</config:config-item>
<config:config-item config:name="AlignTabStopPosition" config:type="boolean">true</config:config-item>
<config:config-item config:name="DropCapPunctuation" config:type="boolean">false</config:config-item>
<config:config-item config:name="MathBaselineAlignment" config:type="boolean">true</config:config-item>
<config:config-item config:name="PrinterName" config:type="string"/>
<config:config-item config:name="CharacterCompressionType" config:type="short">0</config:config-item>
<config:config-item config:name="AddParaTableSpacing" config:type="boolean">true</config:config-item>
<config:config-item config:name="DoNotJustifyLinesWithManualBreak" config:type="boolean">false</config:config-item>
<config:config-item config:name="PrintHiddenText" config:type="boolean">false</config:config-item>
<config:config-item config:name="IsKernAsianPunctuation" config:type="boolean">false</config:config-item>
<config:config-item config:name="PrinterIndependentLayout" config:type="string">high-resolution</config:config-item>
<config:config-item config:name="TabOverflow" config:type="boolean">true</config:config-item>
<config:config-item config:name="AddParaSpacingToTableCells" config:type="boolean">true</config:config-item>
<config:config-item config:name="AddVerticalFrameOffsets" config:type="boolean">false</config:config-item>
<config:config-item config:name="TabAtLeftIndentForParagraphsInList" config:type="boolean">true</config:config-item>
<config:config-item config:name="ApplyUserData" config:type="boolean">true</config:config-item>
<config:config-item config:name="MsWordCompMinLineHeightByFly" config:type="boolean">true</config:config-item>
<config:config-item config:name="PrintTextPlaceholder" config:type="boolean">false</config:config-item>
<config:config-item config:name="IgnoreFirstLineIndentInNumbering" config:type="boolean">false</config:config-item>
<config:config-item config:name="UseFormerLineSpacing" config:type="boolean">false</config:config-item>
<config:config-item config:name="PrintPageBackground" config:type="boolean">true</config:config-item>
<config:config-item config:name="RedlineProtectionKey" config:type="base64Binary"/>
<config:config-item config:name="EmbedAsianScriptFonts" config:type="boolean">true</config:config-item> <config:config-item config:name="EmbedAsianScriptFonts" config:type="boolean">true</config:config-item>
<config:config-item config:name="PrintTextPlaceholder" config:type="boolean">false</config:config-item>
<config:config-item config:name="EmbedSystemFonts" config:type="boolean">false</config:config-item>
<config:config-item config:name="EmbedFonts" config:type="boolean">false</config:config-item>
<config:config-item config:name="DisableOffPagePositioning" config:type="boolean">false</config:config-item>
<config:config-item config:name="BackgroundParaOverDrawings" config:type="boolean">false</config:config-item> <config:config-item config:name="BackgroundParaOverDrawings" config:type="boolean">false</config:config-item>
<config:config-item config:name="SaveThumbnail" config:type="boolean">true</config:config-item> <config:config-item config:name="AllowPrintJobCancel" config:type="boolean">true</config:config-item>
<config:config-item config:name="ConsiderTextWrapOnObjPos" config:type="boolean">false</config:config-item> <config:config-item config:name="AddVerticalFrameOffsets" config:type="boolean">false</config:config-item>
<config:config-item config:name="EmbeddedDatabaseName" config:type="string"/> <config:config-item config:name="ProtectBookmarks" config:type="boolean">false</config:config-item>
<config:config-item config:name="ProtectForm" config:type="boolean">false</config:config-item> <config:config-item config:name="AddFrameOffsets" config:type="boolean">true</config:config-item>
<config:config-item config:name="DoNotResetParaAttrsForNumFont" config:type="boolean">false</config:config-item> <config:config-item config:name="PrintBlackFonts" config:type="boolean">false</config:config-item>
<config:config-item config:name="MsWordCompTrailingBlanks" config:type="boolean">true</config:config-item>
<config:config-item config:name="EmptyDbFieldHidesPara" config:type="boolean">true</config:config-item>
<config:config-item config:name="TableRowKeep" config:type="boolean">true</config:config-item> <config:config-item config:name="TableRowKeep" config:type="boolean">true</config:config-item>
<config:config-item config:name="NoNumberingShowFollowBy" config:type="boolean">false</config:config-item> <config:config-item config:name="ApplyParagraphMarkFormatToNumbering" config:type="boolean">true</config:config-item>
<config:config-item config:name="InvertBorderSpacing" config:type="boolean">false</config:config-item> <config:config-item config:name="PrinterIndependentLayout" config:type="string">high-resolution</config:config-item>
<config:config-item config:name="IgnoreTabsAndBlanksForLineCalculation" config:type="boolean">false</config:config-item> <config:config-item config:name="RsidRoot" config:type="int">687431</config:config-item>
<config:config-item config:name="DoNotCaptureDrawObjsOnPage" config:type="boolean">false</config:config-item> <config:config-item config:name="PrintProspect" config:type="boolean">false</config:config-item>
<config:config-item config:name="GutterAtTop" config:type="boolean">false</config:config-item>
<config:config-item config:name="StylesNoDefault" config:type="boolean">false</config:config-item>
<config:config-item config:name="UnxForceZeroExtLeading" config:type="boolean">false</config:config-item>
<config:config-item config:name="PrintReversed" config:type="boolean">false</config:config-item>
<config:config-item config:name="UseOldPrinterMetrics" config:type="boolean">false</config:config-item>
<config:config-item config:name="CurrentDatabaseCommandType" config:type="int">0</config:config-item>
<config:config-item config:name="PrintDrawings" config:type="boolean">true</config:config-item>
<config:config-item config:name="OutlineLevelYieldsNumbering" config:type="boolean">false</config:config-item>
<config:config-item config:name="CurrentDatabaseCommand" config:type="string"/>
<config:config-item config:name="CollapseEmptyCellPara" config:type="boolean">true</config:config-item> <config:config-item config:name="CollapseEmptyCellPara" config:type="boolean">true</config:config-item>
<config:config-item config:name="PrintPaperFromSetup" config:type="boolean">false</config:config-item>
<config:config-item config:name="CurrentDatabaseCommand" config:type="string"/>
<config:config-item config:name="CurrentDatabaseDataSource" config:type="string"/>
<config:config-item config:name="SaveThumbnail" config:type="boolean">true</config:config-item>
<config:config-item config:name="EmbeddedDatabaseName" config:type="string"/>
<config:config-item config:name="UnbreakableNumberings" config:type="boolean">false</config:config-item>
<config:config-item config:name="SaveGlobalDocumentLinks" config:type="boolean">false</config:config-item>
<config:config-item config:name="MsWordCompTrailingBlanks" config:type="boolean">true</config:config-item>
<config:config-item config:name="PrintTables" config:type="boolean">true</config:config-item>
<config:config-item config:name="PrintLeftPages" config:type="boolean">true</config:config-item>
<config:config-item config:name="AddParaTableSpacing" config:type="boolean">true</config:config-item>
<config:config-item config:name="PrinterPaperFromSetup" config:type="boolean">false</config:config-item>
<config:config-item config:name="CurrentDatabaseCommandType" config:type="int">0</config:config-item>
<config:config-item config:name="ChartAutoUpdate" config:type="boolean">true</config:config-item>
<config:config-item config:name="OutlineLevelYieldsNumbering" config:type="boolean">false</config:config-item>
<config:config-item config:name="UseOldNumbering" config:type="boolean">false</config:config-item>
<config:config-item config:name="AddParaSpacingToTableCells" config:type="boolean">true</config:config-item>
<config:config-item config:name="FieldAutoUpdate" config:type="boolean">true</config:config-item>
<config:config-item config:name="PropLineSpacingShrinksFirstLine" config:type="boolean">true</config:config-item>
<config:config-item config:name="TabAtLeftIndentForParagraphsInList" config:type="boolean">true</config:config-item>
<config:config-item config:name="PrintRightPages" config:type="boolean">true</config:config-item>
<config:config-item config:name="DoNotCaptureDrawObjsOnPage" config:type="boolean">false</config:config-item>
<config:config-item config:name="LoadReadonly" config:type="boolean">false</config:config-item>
<config:config-item config:name="HeaderSpacingBelowLastPara" config:type="boolean">true</config:config-item>
<config:config-item config:name="SaveVersionOnClose" config:type="boolean">false</config:config-item>
<config:config-item config:name="ClippedPictures" config:type="boolean">false</config:config-item>
<config:config-item config:name="MathBaselineAlignment" config:type="boolean">true</config:config-item>
<config:config-item config:name="AlignTabStopPosition" config:type="boolean">true</config:config-item>
<config:config-item config:name="UseFormerLineSpacing" config:type="boolean">false</config:config-item>
<config:config-item config:name="PrintSingleJobs" config:type="boolean">false</config:config-item>
<config:config-item config:name="PrinterName" config:type="string"/>
<config:config-item config:name="AddParaLineSpacingToTableCells" config:type="boolean">true</config:config-item>
<config:config-item config:name="IsKernAsianPunctuation" config:type="boolean">false</config:config-item>
<config:config-item config:name="DoNotJustifyLinesWithManualBreak" config:type="boolean">false</config:config-item>
<config:config-item config:name="CharacterCompressionType" config:type="short">0</config:config-item>
<config:config-item config:name="IsLabelDocument" config:type="boolean">false</config:config-item>
<config:config-item config:name="EmbedLatinScriptFonts" config:type="boolean">true</config:config-item>
<config:config-item config:name="PrinterSetup" config:type="base64Binary"/>
<config:config-item config:name="EmbedOnlyUsedFonts" config:type="boolean">false</config:config-item>
<config:config-item config:name="ApplyUserData" config:type="boolean">true</config:config-item>
<config:config-item config:name="AddParaTableSpacingAtStart" config:type="boolean">true</config:config-item>
<config:config-item config:name="InvertBorderSpacing" config:type="boolean">false</config:config-item>
<config:config-item config:name="ProtectFields" config:type="boolean">false</config:config-item>
<config:config-item config:name="AddExternalLeading" config:type="boolean">true</config:config-item>
<config:config-item config:name="LinkUpdateMode" config:type="short">1</config:config-item>
<config:config-item config:name="UseFormerObjectPositioning" config:type="boolean">false</config:config-item>
<config:config-item config:name="UnxForceZeroExtLeading" config:type="boolean">false</config:config-item>
<config:config-item config:name="UseFormerTextWrapping" config:type="boolean">false</config:config-item>
<config:config-item config:name="ConsiderTextWrapOnObjPos" config:type="boolean">false</config:config-item>
<config:config-item config:name="StylesNoDefault" config:type="boolean">false</config:config-item>
<config:config-item config:name="IgnoreFirstLineIndentInNumbering" config:type="boolean">false</config:config-item>
<config:config-item config:name="EmptyDbFieldHidesPara" config:type="boolean">true</config:config-item>
<config:config-item config:name="DoNotResetParaAttrsForNumFont" config:type="boolean">false</config:config-item>
<config:config-item config:name="IgnoreTabsAndBlanksForLineCalculation" config:type="boolean">false</config:config-item>
<config:config-item config:name="ClipAsCharacterAnchoredWriterFlyFrames" config:type="boolean">false</config:config-item>
<config:config-item config:name="DropCapPunctuation" config:type="boolean">false</config:config-item>
<config:config-item config:name="UseOldPrinterMetrics" config:type="boolean">false</config:config-item>
<config:config-item config:name="RedlineProtectionKey" config:type="base64Binary"/>
<config:config-item config:name="TabsRelativeToIndent" config:type="boolean">false</config:config-item>
<config:config-item config:name="Rsid" config:type="int">3589123</config:config-item>
<config:config-item config:name="UpdateFromTemplate" config:type="boolean">true</config:config-item>
<config:config-item config:name="ProtectForm" config:type="boolean">false</config:config-item>
<config:config-item config:name="FloattableNomargins" config:type="boolean">false</config:config-item>
<config:config-item config:name="MsWordCompMinLineHeightByFly" config:type="boolean">true</config:config-item>
<config:config-item config:name="SmallCapsPercentage66" config:type="boolean">false</config:config-item>
<config:config-item config:name="TabOverflow" config:type="boolean">true</config:config-item>
</config:config-item-set> </config:config-item-set>
</office:settings> </office:settings>
<office:scripts> <office:scripts>
@@ -159,14 +160,14 @@
</office:font-face-decls> </office:font-face-decls>
<office:styles> <office:styles>
<style:default-style style:family="graphic"> <style:default-style style:family="graphic">
<style:graphic-properties svg:stroke-color="#3465a4" draw:fill-color="#729fcf" fo:wrap-option="no-wrap" draw:shadow-offset-x="0.1181in" draw:shadow-offset-y="0.1181in" draw:start-line-spacing-horizontal="0.1114in" draw:start-line-spacing-vertical="0.1114in" draw:end-line-spacing-horizontal="0.1114in" draw:end-line-spacing-vertical="0.1114in" style:writing-mode="lr-tb" style:flow-with-text="false"/> <style:graphic-properties svg:stroke-color="#3465a4" draw:fill-color="#729fcf" fo:wrap-option="no-wrap" draw:shadow-offset-x="0.3cm" draw:shadow-offset-y="0.3cm" draw:start-line-spacing-horizontal="0.283cm" draw:start-line-spacing-vertical="0.283cm" draw:end-line-spacing-horizontal="0.283cm" draw:end-line-spacing-vertical="0.283cm" style:writing-mode="lr-tb" style:flow-with-text="false"/>
<style:paragraph-properties style:text-autospace="ideograph-alpha" style:line-break="strict" style:writing-mode="lr-tb" style:font-independent-line-spacing="false"> <style:paragraph-properties style:text-autospace="ideograph-alpha" style:line-break="strict" loext:tab-stop-distance="0cm" style:font-independent-line-spacing="false">
<style:tab-stops/> <style:tab-stops/>
</style:paragraph-properties> </style:paragraph-properties>
<style:text-properties style:use-window-font-color="true" loext:opacity="0%" loext:color-lum-mod="100%" loext:color-lum-off="0%" style:font-name="DejaVu Serif" fo:font-size="12pt" fo:language="es" fo:country="CO" style:letter-kerning="true" style:font-name-asian="DejaVu Sans1" style:font-size-asian="10.5pt" style:language-asian="zh" style:country-asian="CN" style:font-name-complex="DejaVu Sans1" style:font-size-complex="12pt" style:language-complex="hi" style:country-complex="IN"/> <style:text-properties style:use-window-font-color="true" loext:opacity="0%" style:font-name="DejaVu Serif" fo:font-size="12pt" fo:language="es" fo:country="CO" style:letter-kerning="true" style:font-name-asian="DejaVu Sans1" style:font-size-asian="10.5pt" style:language-asian="zh" style:country-asian="CN" style:font-name-complex="DejaVu Sans1" style:font-size-complex="12pt" style:language-complex="hi" style:country-complex="IN"/>
</style:default-style> </style:default-style>
<style:default-style style:family="paragraph"> <style:default-style style:family="paragraph">
<style:paragraph-properties fo:orphans="2" fo:widows="2" fo:hyphenation-ladder-count="no-limit" style:text-autospace="ideograph-alpha" style:punctuation-wrap="hanging" style:line-break="strict" style:tab-stop-distance="0.4925in" style:writing-mode="lr-tb"/> <style:paragraph-properties fo:orphans="2" fo:widows="2" fo:hyphenation-ladder-count="no-limit" style:text-autospace="ideograph-alpha" style:punctuation-wrap="hanging" style:line-break="strict" style:tab-stop-distance="1.251cm" style:writing-mode="lr-tb"/>
<style:text-properties style:use-window-font-color="true" loext:opacity="0%" style:font-name="DejaVu Serif" fo:font-size="12pt" fo:language="es" fo:country="CO" style:letter-kerning="true" style:font-name-asian="DejaVu Sans1" style:font-size-asian="10.5pt" style:language-asian="zh" style:country-asian="CN" style:font-name-complex="DejaVu Sans1" style:font-size-complex="12pt" style:language-complex="hi" style:country-complex="IN" fo:hyphenate="false" fo:hyphenation-remain-char-count="2" fo:hyphenation-push-char-count="2" loext:hyphenation-no-caps="false" loext:hyphenation-no-last-word="false" loext:hyphenation-word-char-count="5" loext:hyphenation-zone="no-limit"/> <style:text-properties style:use-window-font-color="true" loext:opacity="0%" style:font-name="DejaVu Serif" fo:font-size="12pt" fo:language="es" fo:country="CO" style:letter-kerning="true" style:font-name-asian="DejaVu Sans1" style:font-size-asian="10.5pt" style:language-asian="zh" style:country-asian="CN" style:font-name-complex="DejaVu Sans1" style:font-size-complex="12pt" style:language-complex="hi" style:country-complex="IN" fo:hyphenate="false" fo:hyphenation-remain-char-count="2" fo:hyphenation-push-char-count="2" loext:hyphenation-no-caps="false" loext:hyphenation-no-last-word="false" loext:hyphenation-word-char-count="5" loext:hyphenation-zone="no-limit"/>
</style:default-style> </style:default-style>
<style:default-style style:family="table"> <style:default-style style:family="table">
@@ -177,17 +178,17 @@
</style:default-style> </style:default-style>
<style:style style:name="Standard" style:family="paragraph" style:class="text"/> <style:style style:name="Standard" style:family="paragraph" style:class="text"/>
<style:style style:name="Heading" style:family="paragraph" style:parent-style-name="Standard" style:next-style-name="Text_20_body" style:class="text"> <style:style style:name="Heading" style:family="paragraph" style:parent-style-name="Standard" style:next-style-name="Text_20_body" style:class="text">
<style:paragraph-properties fo:margin-top="0.1665in" fo:margin-bottom="0.0835in" style:contextual-spacing="false" fo:keep-with-next="always"/> <style:paragraph-properties fo:margin-top="0.423cm" fo:margin-bottom="0.212cm" style:contextual-spacing="false" fo:keep-with-next="always"/>
<style:text-properties style:font-name="DejaVu Sans" fo:font-family="&apos;DejaVu Sans&apos;" style:font-family-generic="swiss" style:font-pitch="variable" fo:font-size="14pt" style:font-name-asian="DejaVu Sans1" style:font-family-asian="&apos;DejaVu Sans&apos;" style:font-family-generic-asian="system" style:font-pitch-asian="variable" style:font-size-asian="14pt" style:font-name-complex="DejaVu Sans1" style:font-family-complex="&apos;DejaVu Sans&apos;" style:font-family-generic-complex="system" style:font-pitch-complex="variable" style:font-size-complex="14pt"/> <style:text-properties style:font-name="DejaVu Sans" fo:font-family="&apos;DejaVu Sans&apos;" style:font-family-generic="swiss" style:font-pitch="variable" fo:font-size="14pt" style:font-name-asian="DejaVu Sans1" style:font-family-asian="&apos;DejaVu Sans&apos;" style:font-family-generic-asian="system" style:font-pitch-asian="variable" style:font-size-asian="14pt" style:font-name-complex="DejaVu Sans1" style:font-family-complex="&apos;DejaVu Sans&apos;" style:font-family-generic-complex="system" style:font-pitch-complex="variable" style:font-size-complex="14pt"/>
</style:style> </style:style>
<style:style style:name="Text_20_body" style:display-name="Text body" style:family="paragraph" style:parent-style-name="Standard" style:class="text"> <style:style style:name="Text_20_body" style:display-name="Text body" style:family="paragraph" style:parent-style-name="Standard" style:class="text">
<style:paragraph-properties fo:margin-top="0in" fo:margin-bottom="0.0972in" style:contextual-spacing="false" fo:line-height="115%"/> <style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0.247cm" style:contextual-spacing="false" fo:line-height="115%"/>
</style:style> </style:style>
<style:style style:name="List" style:family="paragraph" style:parent-style-name="Text_20_body" style:class="list"> <style:style style:name="List" style:family="paragraph" style:parent-style-name="Text_20_body" style:class="list">
<style:text-properties style:font-size-asian="12pt"/> <style:text-properties style:font-size-asian="12pt"/>
</style:style> </style:style>
<style:style style:name="Caption" style:family="paragraph" style:parent-style-name="Standard" style:class="extra"> <style:style style:name="Caption" style:family="paragraph" style:parent-style-name="Standard" style:class="extra">
<style:paragraph-properties fo:margin-top="0.0835in" fo:margin-bottom="0.0835in" style:contextual-spacing="false" text:number-lines="false" text:line-number="0"/> <style:paragraph-properties fo:margin-top="0.212cm" fo:margin-bottom="0.212cm" style:contextual-spacing="false" text:number-lines="false" text:line-number="0"/>
<style:text-properties fo:font-size="12pt" fo:font-style="italic" style:font-size-asian="12pt" style:font-style-asian="italic" style:font-size-complex="12pt" style:font-style-complex="italic"/> <style:text-properties fo:font-size="12pt" fo:font-style="italic" style:font-size-asian="12pt" style:font-style-asian="italic" style:font-size-complex="12pt" style:font-style-complex="italic"/>
</style:style> </style:style>
<style:style style:name="Index" style:family="paragraph" style:parent-style-name="Standard" style:class="index"> <style:style style:name="Index" style:family="paragraph" style:parent-style-name="Standard" style:class="index">
@@ -197,16 +198,16 @@
<style:style style:name="Header_20_and_20_Footer" style:display-name="Header and Footer" style:family="paragraph" style:parent-style-name="Standard" style:class="extra"> <style:style style:name="Header_20_and_20_Footer" style:display-name="Header and Footer" style:family="paragraph" style:parent-style-name="Standard" style:class="extra">
<style:paragraph-properties text:number-lines="false" text:line-number="0"> <style:paragraph-properties text:number-lines="false" text:line-number="0">
<style:tab-stops> <style:tab-stops>
<style:tab-stop style:position="3.4626in" style:type="center"/> <style:tab-stop style:position="8.795cm" style:type="center"/>
<style:tab-stop style:position="6.9252in" style:type="right"/> <style:tab-stop style:position="17.59cm" style:type="right"/>
</style:tab-stops> </style:tab-stops>
</style:paragraph-properties> </style:paragraph-properties>
</style:style> </style:style>
<style:style style:name="Header" style:family="paragraph" style:parent-style-name="Header_20_and_20_Footer" style:class="extra"> <style:style style:name="Header" style:family="paragraph" style:parent-style-name="Header_20_and_20_Footer" style:class="extra">
<style:paragraph-properties text:number-lines="false" text:line-number="0"> <style:paragraph-properties text:number-lines="false" text:line-number="0">
<style:tab-stops> <style:tab-stops>
<style:tab-stop style:position="3.4626in" style:type="center"/> <style:tab-stop style:position="8.795cm" style:type="center"/>
<style:tab-stop style:position="6.9252in" style:type="right"/> <style:tab-stop style:position="17.59cm" style:type="right"/>
</style:tab-stops> </style:tab-stops>
</style:paragraph-properties> </style:paragraph-properties>
</style:style> </style:style>
@@ -225,8 +226,8 @@
<style:style style:name="Footer" style:family="paragraph" style:parent-style-name="Standard" style:class="extra"> <style:style style:name="Footer" style:family="paragraph" style:parent-style-name="Standard" style:class="extra">
<style:paragraph-properties text:number-lines="false" text:line-number="0"> <style:paragraph-properties text:number-lines="false" text:line-number="0">
<style:tab-stops> <style:tab-stops>
<style:tab-stop style:position="3.4626in" style:type="center"/> <style:tab-stop style:position="8.795cm" style:type="center"/>
<style:tab-stop style:position="6.9252in" style:type="right"/> <style:tab-stop style:position="17.59cm" style:type="right"/>
</style:tab-stops> </style:tab-stops>
</style:paragraph-properties> </style:paragraph-properties>
<style:text-properties fo:font-size="9pt" style:font-size-asian="10.5pt"/> <style:text-properties fo:font-size="9pt" style:font-size-asian="10.5pt"/>
@@ -235,7 +236,7 @@
<style:text-properties fo:font-size="14pt" fo:font-style="italic" fo:font-weight="bold" style:font-size-asian="14pt" style:font-style-asian="italic" style:font-weight-asian="bold" style:font-size-complex="14pt" style:font-style-complex="italic" style:font-weight-complex="bold"/> <style:text-properties fo:font-size="14pt" fo:font-style="italic" fo:font-weight="bold" style:font-size-asian="14pt" style:font-style-asian="italic" style:font-weight-asian="bold" style:font-size-complex="14pt" style:font-style-complex="italic" style:font-weight-complex="bold"/>
</style:style> </style:style>
<style:style style:name="Subtitle" style:family="paragraph" style:parent-style-name="Heading" style:next-style-name="Text_20_body" style:class="chapter"> <style:style style:name="Subtitle" style:family="paragraph" style:parent-style-name="Heading" style:next-style-name="Text_20_body" style:class="chapter">
<style:paragraph-properties fo:margin-top="0.0417in" fo:margin-bottom="0.0835in" style:contextual-spacing="false" fo:text-align="center" style:justify-single-word="false"/> <style:paragraph-properties fo:margin-top="0.106cm" fo:margin-bottom="0.212cm" style:contextual-spacing="false" fo:text-align="center" style:justify-single-word="false"/>
<style:text-properties fo:font-size="18pt" style:font-size-asian="18pt" style:font-size-complex="18pt"/> <style:text-properties fo:font-size="18pt" style:font-size-asian="18pt" style:font-size-complex="18pt"/>
</style:style> </style:style>
<style:style style:name="Title" style:family="paragraph" style:parent-style-name="Heading" style:next-style-name="Text_20_body" style:class="chapter"> <style:style style:name="Title" style:family="paragraph" style:parent-style-name="Heading" style:next-style-name="Text_20_body" style:class="chapter">
@@ -243,10 +244,10 @@
<style:text-properties fo:font-size="28pt" fo:font-weight="bold" style:font-size-asian="28pt" style:font-weight-asian="bold" style:font-size-complex="28pt" style:font-weight-complex="bold"/> <style:text-properties fo:font-size="28pt" fo:font-weight="bold" style:font-size-asian="28pt" style:font-weight-asian="bold" style:font-size-complex="28pt" style:font-weight-complex="bold"/>
</style:style> </style:style>
<style:style style:name="Quotations" style:family="paragraph" style:parent-style-name="Standard" style:class="html"> <style:style style:name="Quotations" style:family="paragraph" style:parent-style-name="Standard" style:class="html">
<style:paragraph-properties fo:margin-left="0.3937in" fo:margin-right="0.3937in" fo:margin-top="0in" fo:margin-bottom="0.1965in" style:contextual-spacing="false" fo:text-indent="0in" style:auto-text-indent="false"/> <style:paragraph-properties fo:margin-left="1cm" fo:margin-right="1cm" fo:margin-top="0cm" fo:margin-bottom="0.499cm" style:contextual-spacing="false" fo:text-indent="0cm" style:auto-text-indent="false"/>
</style:style> </style:style>
<style:style style:name="Text_20_body_20_indent" style:display-name="Text body indent" style:family="paragraph" style:parent-style-name="Text_20_body" style:class="text"> <style:style style:name="Text_20_body_20_indent" style:display-name="Text body indent" style:family="paragraph" style:parent-style-name="Text_20_body" style:class="text">
<style:paragraph-properties fo:margin-left="0.1965in" fo:margin-right="0in" fo:text-indent="0in" style:auto-text-indent="false"/> <style:paragraph-properties fo:margin-left="0.499cm" fo:margin-right="0cm" fo:text-indent="0cm" style:auto-text-indent="false"/>
</style:style> </style:style>
<style:style style:name="Heading_20_3" style:display-name="Heading 3" style:family="paragraph" style:parent-style-name="Heading" style:next-style-name="Text_20_body" style:class="text"> <style:style style:name="Heading_20_3" style:display-name="Heading 3" style:family="paragraph" style:parent-style-name="Heading" style:next-style-name="Text_20_body" style:class="text">
<style:text-properties fo:font-size="14pt" fo:font-weight="bold" style:font-size-asian="14pt" style:font-weight-asian="bold" style:font-size-complex="14pt" style:font-weight-complex="bold"/> <style:text-properties fo:font-size="14pt" fo:font-weight="bold" style:font-size-asian="14pt" style:font-weight-asian="bold" style:font-size-complex="14pt" style:font-weight-complex="bold"/>
@@ -261,10 +262,10 @@
<style:text-properties style:font-name="StarSymbol" fo:font-family="StarSymbol" fo:font-size="9pt" style:font-name-asian="StarSymbol" style:font-family-asian="StarSymbol" style:font-size-asian="9pt" style:font-name-complex="StarSymbol" style:font-family-complex="StarSymbol" style:font-size-complex="9pt"/> <style:text-properties style:font-name="StarSymbol" fo:font-family="StarSymbol" fo:font-size="9pt" style:font-name-asian="StarSymbol" style:font-family-asian="StarSymbol" style:font-size-asian="9pt" style:font-name-complex="StarSymbol" style:font-family-complex="StarSymbol" style:font-size-complex="9pt"/>
</style:style> </style:style>
<style:style style:name="Frame" style:family="graphic"> <style:style style:name="Frame" style:family="graphic">
<style:graphic-properties text:anchor-type="paragraph" svg:x="0in" svg:y="0in" fo:margin-left="0.0791in" fo:margin-right="0.0791in" fo:margin-top="0.0791in" fo:margin-bottom="0.0791in" style:wrap="parallel" style:number-wrapped-paragraphs="no-limit" style:wrap-contour="false" style:vertical-pos="top" style:vertical-rel="paragraph-content" style:horizontal-pos="center" style:horizontal-rel="paragraph-content" fo:background-color="transparent" draw:fill="none" draw:fill-color="#729fcf" fo:padding="0.0591in" fo:border="0.06pt solid #000000"/> <style:graphic-properties text:anchor-type="paragraph" svg:x="0cm" svg:y="0cm" fo:margin-left="0.201cm" fo:margin-right="0.201cm" fo:margin-top="0.201cm" fo:margin-bottom="0.201cm" style:wrap="parallel" style:number-wrapped-paragraphs="no-limit" style:wrap-contour="false" style:vertical-pos="top" style:vertical-rel="paragraph-content" style:horizontal-pos="center" style:horizontal-rel="paragraph-content" fo:background-color="transparent" draw:fill="none" draw:fill-color="#729fcf" fo:padding="0.15cm" fo:border="0.06pt solid #000000"/>
</style:style> </style:style>
<style:style style:name="Graphics" style:family="graphic"> <style:style style:name="Graphics" style:family="graphic">
<style:graphic-properties text:anchor-type="paragraph" svg:x="0in" svg:y="0in" style:wrap="dynamic" style:number-wrapped-paragraphs="no-limit" style:wrap-contour="false" style:vertical-pos="top" style:vertical-rel="paragraph" style:horizontal-pos="center" style:horizontal-rel="paragraph" fo:background-color="transparent" draw:fill="none" draw:fill-color="#729fcf"/> <style:graphic-properties text:anchor-type="paragraph" svg:x="0cm" svg:y="0cm" style:wrap="dynamic" style:number-wrapped-paragraphs="no-limit" style:wrap-contour="false" style:vertical-pos="top" style:vertical-rel="paragraph" style:horizontal-pos="center" style:horizontal-rel="paragraph" fo:background-color="transparent" draw:fill="none" draw:fill-color="#729fcf"/>
</style:style> </style:style>
<text:outline-style style:name="Outline"> <text:outline-style style:name="Outline">
<text:outline-level-style text:level="1" loext:num-list-format="%1%" style:num-format=""> <text:outline-level-style text:level="1" loext:num-list-format="%1%" style:num-format="">
@@ -320,69 +321,85 @@
</text:outline-style> </text:outline-style>
<text:notes-configuration text:note-class="footnote" style:num-format="1" text:start-value="0" text:footnotes-position="page" text:start-numbering-at="document"/> <text:notes-configuration text:note-class="footnote" style:num-format="1" text:start-value="0" text:footnotes-position="page" text:start-numbering-at="document"/>
<text:notes-configuration text:note-class="endnote" style:num-format="i" text:start-value="0"/> <text:notes-configuration text:note-class="endnote" style:num-format="i" text:start-value="0"/>
<text:linenumbering-configuration text:number-lines="false" text:offset="0.1965in" style:num-format="1" text:number-position="left" text:increment="5"/> <text:linenumbering-configuration text:number-lines="false" text:offset="0.499cm" style:num-format="1" text:number-position="left" text:increment="5"/>
<number:currency-style style:name="N130P0" style:volatile="true"> <number:currency-style style:name="N115P0" style:volatile="true">
<number:currency-symbol number:language="es" number:country="CO">$</number:currency-symbol> <number:currency-symbol number:language="es" number:country="CO">$</number:currency-symbol>
<number:number number:decimal-places="2" number:min-decimal-places="2" number:min-integer-digits="1" number:grouping="true"/> <number:number number:decimal-places="2" number:min-decimal-places="2" number:min-integer-digits="1" number:grouping="true"/>
</number:currency-style> </number:currency-style>
<number:currency-style style:name="N130"> <number:currency-style style:name="N115">
<style:text-properties fo:color="#ff0000"/> <style:text-properties fo:color="#ff0000"/>
<number:text>-</number:text> <number:text>-</number:text>
<number:currency-symbol number:language="es" number:country="CO">$</number:currency-symbol> <number:currency-symbol number:language="es" number:country="CO">$</number:currency-symbol>
<number:number number:decimal-places="2" number:min-decimal-places="2" number:min-integer-digits="1" number:grouping="true"/> <number:number number:decimal-places="2" number:min-decimal-places="2" number:min-integer-digits="1" number:grouping="true"/>
<style:map style:condition="value()&gt;=0" style:apply-style-name="N130P0"/> <style:map style:condition="value()&gt;=0" style:apply-style-name="N115P0"/>
</number:currency-style> </number:currency-style>
<style:default-page-layout> <style:default-page-layout>
<style:page-layout-properties style:writing-mode="lr-tb" style:layout-grid-standard-mode="true"/> <style:page-layout-properties style:writing-mode="lr-tb" style:layout-grid-standard-mode="true"/>
</style:default-page-layout> </style:default-page-layout>
<loext:theme loext:name="Office Theme">
<loext:theme-colors loext:name="LibreOffice">
<loext:color loext:name="dark1" loext:color="#000000"/>
<loext:color loext:name="light1" loext:color="#ffffff"/>
<loext:color loext:name="dark2" loext:color="#000000"/>
<loext:color loext:name="light2" loext:color="#ffffff"/>
<loext:color loext:name="accent1" loext:color="#18a303"/>
<loext:color loext:name="accent2" loext:color="#0369a3"/>
<loext:color loext:name="accent3" loext:color="#a33e03"/>
<loext:color loext:name="accent4" loext:color="#8e03a3"/>
<loext:color loext:name="accent5" loext:color="#c99c00"/>
<loext:color loext:name="accent6" loext:color="#c9211e"/>
<loext:color loext:name="hyperlink" loext:color="#0000ee"/>
<loext:color loext:name="followed-hyperlink" loext:color="#551a8b"/>
</loext:theme-colors>
</loext:theme>
</office:styles> </office:styles>
<office:automatic-styles> <office:automatic-styles>
<style:style style:name="Tabla6" style:family="table"> <style:style style:name="Tabla6" style:family="table">
<style:table-properties style:width="6.925in" table:align="margins"/> <style:table-properties style:width="17.59cm" table:align="margins"/>
</style:style> </style:style>
<style:style style:name="Tabla6.A" style:family="table-column"> <style:style style:name="Tabla6.A" style:family="table-column">
<style:table-column-properties style:column-width="3.4625in" style:rel-column-width="32767*"/> <style:table-column-properties style:column-width="8.795cm" style:rel-column-width="32767*"/>
</style:style> </style:style>
<style:style style:name="Tabla6.B" style:family="table-column"> <style:style style:name="Tabla6.B" style:family="table-column">
<style:table-column-properties style:column-width="3.4625in" style:rel-column-width="32768*"/> <style:table-column-properties style:column-width="8.795cm" style:rel-column-width="32768*"/>
</style:style> </style:style>
<style:style style:name="Tabla6.A1" style:family="table-cell"> <style:style style:name="Tabla6.A1" style:family="table-cell">
<style:table-cell-properties fo:padding="0.0382in" fo:border="none"/> <style:table-cell-properties fo:padding="0.097cm" fo:border="none"/>
</style:style> </style:style>
<style:style style:name="Tabla6" style:family="table"> <style:style style:name="Tabla6" style:family="table">
<style:table-properties style:width="6.925in" table:align="margins"/> <style:table-properties style:width="17.59cm" table:align="margins"/>
</style:style> </style:style>
<style:style style:name="Tabla6.A" style:family="table-column"> <style:style style:name="Tabla6.A" style:family="table-column">
<style:table-column-properties style:column-width="3.4625in" style:rel-column-width="32767*"/> <style:table-column-properties style:column-width="8.795cm" style:rel-column-width="32767*"/>
</style:style> </style:style>
<style:style style:name="Tabla6.B" style:family="table-column"> <style:style style:name="Tabla6.B" style:family="table-column">
<style:table-column-properties style:column-width="3.4625in" style:rel-column-width="32768*"/> <style:table-column-properties style:column-width="8.795cm" style:rel-column-width="32768*"/>
</style:style> </style:style>
<style:style style:name="Tabla6.A1" style:family="table-cell"> <style:style style:name="Tabla6.A1" style:family="table-cell">
<style:table-cell-properties fo:padding="0.0382in" fo:border="none"/> <style:table-cell-properties fo:padding="0.097cm" fo:border="none"/>
</style:style> </style:style>
<style:style style:name="Tabla4" style:family="table"> <style:style style:name="Tabla4" style:family="table">
<style:table-properties style:width="6.925in" table:align="margins" style:writing-mode="lr-tb"/> <style:table-properties style:width="17.59cm" table:align="margins" style:writing-mode="lr-tb"/>
</style:style> </style:style>
<style:style style:name="Tabla4.A" style:family="table-column"> <style:style style:name="Tabla4.A" style:family="table-column">
<style:table-column-properties style:column-width="3.4625in" style:rel-column-width="32767*"/> <style:table-column-properties style:column-width="8.795cm" style:rel-column-width="32767*"/>
</style:style> </style:style>
<style:style style:name="Tabla4.B" style:family="table-column"> <style:style style:name="Tabla4.B" style:family="table-column">
<style:table-column-properties style:column-width="3.4625in" style:rel-column-width="32768*"/> <style:table-column-properties style:column-width="8.795cm" style:rel-column-width="32768*"/>
</style:style> </style:style>
<style:style style:name="Tabla4.A1" style:family="table-cell"> <style:style style:name="Tabla4.A1" style:family="table-cell">
<style:table-cell-properties fo:padding="0.0382in" fo:border="none"/> <style:table-cell-properties fo:padding="0.097cm" fo:border="none"/>
</style:style> </style:style>
<style:style style:name="Tabla2" style:family="table"> <style:style style:name="Tabla2" style:family="table">
<style:table-properties style:width="6.925in" table:align="margins" fo:background-color="transparent" style:writing-mode="lr-tb"> <style:table-properties style:width="17.59cm" table:align="margins" fo:background-color="transparent" style:writing-mode="lr-tb">
<style:background-image/> <style:background-image/>
</style:table-properties> </style:table-properties>
</style:style> </style:style>
<style:style style:name="Tabla2.A" style:family="table-column"> <style:style style:name="Tabla2.A" style:family="table-column">
<style:table-column-properties style:column-width="3.4625in" style:rel-column-width="32767*"/> <style:table-column-properties style:column-width="8.795cm" style:rel-column-width="32767*"/>
</style:style> </style:style>
<style:style style:name="Tabla2.B" style:family="table-column"> <style:style style:name="Tabla2.B" style:family="table-column">
<style:table-column-properties style:column-width="3.4625in" style:rel-column-width="32768*"/> <style:table-column-properties style:column-width="8.795cm" style:rel-column-width="32768*"/>
</style:style> </style:style>
<style:style style:name="Tabla2.1" style:family="table-row"> <style:style style:name="Tabla2.1" style:family="table-row">
<style:table-row-properties fo:background-color="transparent"> <style:table-row-properties fo:background-color="transparent">
@@ -390,67 +407,67 @@
</style:table-row-properties> </style:table-row-properties>
</style:style> </style:style>
<style:style style:name="Tabla2.A1" style:family="table-cell"> <style:style style:name="Tabla2.A1" style:family="table-cell">
<style:table-cell-properties fo:padding="0.0382in" fo:border="none"/> <style:table-cell-properties fo:padding="0.097cm" fo:border="none"/>
</style:style> </style:style>
<style:style style:name="Tabla5" style:family="table"> <style:style style:name="Tabla5" style:family="table">
<style:table-properties style:width="6.925in" table:align="margins"/> <style:table-properties style:width="17.59cm" table:align="margins"/>
</style:style> </style:style>
<style:style style:name="Tabla5.A" style:family="table-column"> <style:style style:name="Tabla5.A" style:family="table-column">
<style:table-column-properties style:column-width="3.4625in" style:rel-column-width="32767*"/> <style:table-column-properties style:column-width="8.795cm" style:rel-column-width="32767*"/>
</style:style> </style:style>
<style:style style:name="Tabla5.B" style:family="table-column"> <style:style style:name="Tabla5.B" style:family="table-column">
<style:table-column-properties style:column-width="3.4625in" style:rel-column-width="32768*"/> <style:table-column-properties style:column-width="8.795cm" style:rel-column-width="32768*"/>
</style:style> </style:style>
<style:style style:name="Tabla5.A1" style:family="table-cell"> <style:style style:name="Tabla5.A1" style:family="table-cell">
<style:table-cell-properties fo:padding="0.0382in" fo:border-left="0.5pt solid #000000" fo:border-right="none" fo:border-top="0.5pt solid #000000" fo:border-bottom="0.5pt solid #000000"/> <style:table-cell-properties fo:padding="0.097cm" fo:border-left="0.5pt solid #000000" fo:border-right="none" fo:border-top="0.5pt solid #000000" fo:border-bottom="0.5pt solid #000000"/>
</style:style> </style:style>
<style:style style:name="Tabla5.B1" style:family="table-cell"> <style:style style:name="Tabla5.B1" style:family="table-cell">
<style:table-cell-properties fo:padding="0.0382in" fo:border="0.5pt solid #000000"/> <style:table-cell-properties fo:padding="0.097cm" fo:border="0.5pt solid #000000"/>
</style:style> </style:style>
<style:style style:name="Tabla5.A2" style:family="table-cell"> <style:style style:name="Tabla5.A2" style:family="table-cell">
<style:table-cell-properties fo:padding="0.0382in" fo:border-left="0.5pt solid #000000" fo:border-right="none" fo:border-top="none" fo:border-bottom="0.5pt solid #000000"/> <style:table-cell-properties fo:padding="0.097cm" fo:border-left="0.5pt solid #000000" fo:border-right="none" fo:border-top="none" fo:border-bottom="0.5pt solid #000000"/>
</style:style> </style:style>
<style:style style:name="Tabla5.B2" style:family="table-cell"> <style:style style:name="Tabla5.B2" style:family="table-cell">
<style:table-cell-properties fo:padding="0.0382in" fo:border-left="0.5pt solid #000000" fo:border-right="0.5pt solid #000000" fo:border-top="none" fo:border-bottom="0.5pt solid #000000"/> <style:table-cell-properties fo:padding="0.097cm" fo:border-left="0.5pt solid #000000" fo:border-right="0.5pt solid #000000" fo:border-top="none" fo:border-bottom="0.5pt solid #000000"/>
</style:style> </style:style>
<style:style style:name="Tabla1" style:family="table"> <style:style style:name="Tabla1" style:family="table">
<style:table-properties style:width="6.9271in" fo:margin-left="0in" table:align="left"/> <style:table-properties style:width="17.595cm" fo:margin-left="0cm" table:align="left"/>
</style:style> </style:style>
<style:style style:name="Tabla1.A" style:family="table-column"> <style:style style:name="Tabla1.A" style:family="table-column">
<style:table-column-properties style:column-width="0.8681in"/> <style:table-column-properties style:column-width="2.205cm"/>
</style:style> </style:style>
<style:style style:name="Tabla1.B" style:family="table-column"> <style:style style:name="Tabla1.B" style:family="table-column">
<style:table-column-properties style:column-width="1.3806in"/> <style:table-column-properties style:column-width="3.507cm"/>
</style:style> </style:style>
<style:style style:name="Tabla1.C" style:family="table-column"> <style:style style:name="Tabla1.C" style:family="table-column">
<style:table-column-properties style:column-width="4.6785in"/> <style:table-column-properties style:column-width="11.883cm"/>
</style:style> </style:style>
<style:style style:name="Tabla1.A1" style:family="table-cell"> <style:style style:name="Tabla1.A1" style:family="table-cell">
<style:table-cell-properties fo:padding="0.0382in" fo:border-left="0.5pt solid #000000" fo:border-right="none" fo:border-top="0.5pt solid #000000" fo:border-bottom="0.5pt solid #000000"/> <style:table-cell-properties fo:padding="0.097cm" fo:border-left="0.5pt solid #000000" fo:border-right="none" fo:border-top="0.5pt solid #000000" fo:border-bottom="0.5pt solid #000000"/>
</style:style> </style:style>
<style:style style:name="Tabla1.C1" style:family="table-cell"> <style:style style:name="Tabla1.C1" style:family="table-cell">
<style:table-cell-properties fo:padding="0.0382in" fo:border="0.5pt solid #000000"/> <style:table-cell-properties fo:padding="0.097cm" fo:border="0.5pt solid #000000"/>
</style:style> </style:style>
<style:style style:name="Tabla1.A2" style:family="table-cell"> <style:style style:name="Tabla1.A2" style:family="table-cell">
<style:table-cell-properties fo:padding="0.0382in" fo:border-left="0.5pt solid #000000" fo:border-right="0.5pt solid #000000" fo:border-top="none" fo:border-bottom="0.5pt solid #000000"/> <style:table-cell-properties fo:padding="0.097cm" fo:border-left="0.5pt solid #000000" fo:border-right="0.5pt solid #000000" fo:border-top="none" fo:border-bottom="0.5pt solid #000000"/>
</style:style> </style:style>
<style:style style:name="Tabla1.A3" style:family="table-cell"> <style:style style:name="Tabla1.A3" style:family="table-cell">
<style:table-cell-properties fo:padding="0.0382in" fo:border-left="0.5pt solid #000000" fo:border-right="none" fo:border-top="none" fo:border-bottom="0.5pt solid #000000"/> <style:table-cell-properties fo:padding="0.097cm" fo:border-left="0.5pt solid #000000" fo:border-right="none" fo:border-top="none" fo:border-bottom="0.5pt solid #000000"/>
</style:style> </style:style>
<style:style style:name="Table1" style:family="table"> <style:style style:name="Table1" style:family="table">
<style:table-properties style:width="6.925in" table:align="margins"/> <style:table-properties style:width="17.59cm" table:align="margins"/>
</style:style> </style:style>
<style:style style:name="Table1.A" style:family="table-column"> <style:style style:name="Table1.A" style:family="table-column">
<style:table-column-properties style:column-width="3.4625in" style:rel-column-width="32767*"/> <style:table-column-properties style:column-width="8.795cm" style:rel-column-width="32767*"/>
</style:style> </style:style>
<style:style style:name="Table1.B" style:family="table-column"> <style:style style:name="Table1.B" style:family="table-column">
<style:table-column-properties style:column-width="3.4625in" style:rel-column-width="32768*"/> <style:table-column-properties style:column-width="8.795cm" style:rel-column-width="32768*"/>
</style:style> </style:style>
<style:style style:name="Table1.A1" style:family="table-cell"> <style:style style:name="Table1.A1" style:family="table-cell">
<style:table-cell-properties fo:padding="0.0382in" fo:border="none"/> <style:table-cell-properties fo:padding="0.097cm" fo:border="none"/>
</style:style> </style:style>
<style:style style:name="Table1.B1" style:family="table-cell"> <style:style style:name="Table1.B1" style:family="table-cell">
<style:table-cell-properties fo:padding="0.0382in" fo:border-left="none" fo:border-right="none" fo:border-top="none" fo:border-bottom="0.5pt solid #000000"/> <style:table-cell-properties fo:padding="0.097cm" fo:border-left="none" fo:border-right="none" fo:border-top="none" fo:border-bottom="0.5pt solid #000000"/>
</style:style> </style:style>
<style:style style:name="P1" style:family="paragraph" style:parent-style-name="Header"> <style:style style:name="P1" style:family="paragraph" style:parent-style-name="Header">
<style:paragraph-properties fo:text-align="center" style:justify-single-word="false"/> <style:paragraph-properties fo:text-align="center" style:justify-single-word="false"/>
@@ -469,7 +486,7 @@
<style:text-properties style:font-name="Droid Sans Japanese2" fo:font-size="7pt" officeooo:paragraph-rsid="0049dca0" style:font-size-asian="7pt" style:font-size-complex="7pt"/> <style:text-properties style:font-name="Droid Sans Japanese2" fo:font-size="7pt" officeooo:paragraph-rsid="0049dca0" style:font-size-asian="7pt" style:font-size-complex="7pt"/>
</style:style> </style:style>
<style:style style:name="P5" style:family="paragraph" style:parent-style-name="Standard"> <style:style style:name="P5" style:family="paragraph" style:parent-style-name="Standard">
<style:paragraph-properties fo:margin-left="0in" fo:margin-right="0in" fo:text-align="center" style:justify-single-word="false" fo:text-indent="0in" style:auto-text-indent="false"/> <style:paragraph-properties fo:margin-left="0cm" fo:margin-right="0cm" fo:text-align="center" style:justify-single-word="false" fo:text-indent="0cm" style:auto-text-indent="false"/>
<style:text-properties style:font-name="Droid Sans Japanese2" fo:font-size="7pt" officeooo:paragraph-rsid="0049dca0" style:font-size-asian="7pt" style:font-size-complex="7pt"/> <style:text-properties style:font-name="Droid Sans Japanese2" fo:font-size="7pt" officeooo:paragraph-rsid="0049dca0" style:font-size-asian="7pt" style:font-size-complex="7pt"/>
</style:style> </style:style>
<style:style style:name="P6" style:family="paragraph" style:parent-style-name="Header"> <style:style style:name="P6" style:family="paragraph" style:parent-style-name="Header">
@@ -485,7 +502,7 @@
<style:text-properties fo:color="#666666" loext:opacity="100%" style:font-name="Droid Sans Japanese2" fo:font-size="7pt" style:text-underline-style="solid" style:text-underline-type="double" style:text-underline-width="auto" style:text-underline-color="font-color" fo:font-weight="bold" officeooo:rsid="0266c2a9" officeooo:paragraph-rsid="0049dca0" style:font-size-asian="7pt" style:font-weight-asian="bold" style:font-size-complex="7pt" style:font-weight-complex="bold"/> <style:text-properties fo:color="#666666" loext:opacity="100%" style:font-name="Droid Sans Japanese2" fo:font-size="7pt" style:text-underline-style="solid" style:text-underline-type="double" style:text-underline-width="auto" style:text-underline-color="font-color" fo:font-weight="bold" officeooo:rsid="0266c2a9" officeooo:paragraph-rsid="0049dca0" style:font-size-asian="7pt" style:font-weight-asian="bold" style:font-size-complex="7pt" style:font-weight-complex="bold"/>
</style:style> </style:style>
<style:style style:name="P9" style:family="paragraph" style:parent-style-name="Header"> <style:style style:name="P9" style:family="paragraph" style:parent-style-name="Header">
<style:paragraph-properties fo:margin-left="0in" fo:margin-right="0in" fo:text-align="center" style:justify-single-word="false" fo:text-indent="0in" style:auto-text-indent="false"/> <style:paragraph-properties fo:margin-left="0cm" fo:margin-right="0cm" fo:text-align="center" style:justify-single-word="false" fo:text-indent="0cm" style:auto-text-indent="false"/>
<style:text-properties fo:color="#666666" loext:opacity="100%" style:font-name="Droid Sans Japanese2" fo:font-size="7pt" fo:font-style="normal" style:text-underline-style="none" fo:font-weight="normal" officeooo:paragraph-rsid="0049dca0" style:font-size-asian="7pt" style:font-style-asian="normal" style:font-weight-asian="normal" style:font-size-complex="7pt" style:font-style-complex="normal" style:font-weight-complex="normal"/> <style:text-properties fo:color="#666666" loext:opacity="100%" style:font-name="Droid Sans Japanese2" fo:font-size="7pt" fo:font-style="normal" style:text-underline-style="none" fo:font-weight="normal" officeooo:paragraph-rsid="0049dca0" style:font-size-asian="7pt" style:font-style-asian="normal" style:font-weight-asian="normal" style:font-size-complex="7pt" style:font-style-complex="normal" style:font-weight-complex="normal"/>
</style:style> </style:style>
<style:style style:name="P10" style:family="paragraph" style:parent-style-name="Header"> <style:style style:name="P10" style:family="paragraph" style:parent-style-name="Header">
@@ -501,7 +518,7 @@
<style:text-properties style:font-name="Droid Sans Japanese2" fo:font-size="7pt" officeooo:paragraph-rsid="0049dca0" style:font-size-asian="7pt" style:font-size-complex="7pt"/> <style:text-properties style:font-name="Droid Sans Japanese2" fo:font-size="7pt" officeooo:paragraph-rsid="0049dca0" style:font-size-asian="7pt" style:font-size-complex="7pt"/>
</style:style> </style:style>
<style:style style:name="P13" style:family="paragraph" style:parent-style-name="Standard"> <style:style style:name="P13" style:family="paragraph" style:parent-style-name="Standard">
<style:paragraph-properties fo:margin-left="0in" fo:margin-right="0in" fo:text-align="center" style:justify-single-word="false" fo:text-indent="0in" style:auto-text-indent="false"/> <style:paragraph-properties fo:margin-left="0cm" fo:margin-right="0cm" fo:text-align="center" style:justify-single-word="false" fo:text-indent="0cm" style:auto-text-indent="false"/>
<style:text-properties style:font-name="Droid Sans Japanese2" fo:font-size="7pt" officeooo:paragraph-rsid="0049dca0" style:font-size-asian="7pt" style:font-size-complex="7pt"/> <style:text-properties style:font-name="Droid Sans Japanese2" fo:font-size="7pt" officeooo:paragraph-rsid="0049dca0" style:font-size-asian="7pt" style:font-size-complex="7pt"/>
</style:style> </style:style>
<style:style style:name="P14" style:family="paragraph" style:parent-style-name="Header"> <style:style style:name="P14" style:family="paragraph" style:parent-style-name="Header">
@@ -561,11 +578,11 @@
<style:text-properties style:font-name="Droid Sans Japanese2" fo:font-size="10pt" fo:font-weight="bold" officeooo:rsid="0030c0b3" officeooo:paragraph-rsid="0030c0b3" style:font-size-asian="10pt" style:font-weight-asian="bold" style:font-size-complex="10pt" style:font-weight-complex="bold"/> <style:text-properties style:font-name="Droid Sans Japanese2" fo:font-size="10pt" fo:font-weight="bold" officeooo:rsid="0030c0b3" officeooo:paragraph-rsid="0030c0b3" style:font-size-asian="10pt" style:font-weight-asian="bold" style:font-size-complex="10pt" style:font-weight-complex="bold"/>
</style:style> </style:style>
<style:style style:name="P28" style:family="paragraph" style:parent-style-name="Standard"> <style:style style:name="P28" style:family="paragraph" style:parent-style-name="Standard">
<style:paragraph-properties fo:margin-left="0in" fo:margin-right="0in" fo:text-indent="0in" style:auto-text-indent="false"/> <style:paragraph-properties fo:margin-left="0cm" fo:margin-right="0cm" fo:text-indent="0cm" style:auto-text-indent="false"/>
<style:text-properties style:font-name="Droid Sans Japanese2" fo:font-size="10pt" style:font-size-asian="10pt" style:font-size-complex="10pt"/> <style:text-properties style:font-name="Droid Sans Japanese2" fo:font-size="10pt" style:font-size-asian="10pt" style:font-size-complex="10pt"/>
</style:style> </style:style>
<style:style style:name="P29" style:family="paragraph" style:parent-style-name="Standard"> <style:style style:name="P29" style:family="paragraph" style:parent-style-name="Standard">
<style:paragraph-properties fo:margin-left="0in" fo:margin-right="0in" fo:text-indent="0in" style:auto-text-indent="false"/> <style:paragraph-properties fo:margin-left="0cm" fo:margin-right="0cm" fo:text-indent="0cm" style:auto-text-indent="false"/>
<style:text-properties style:font-name="Droid Sans Japanese2" fo:font-size="10pt" officeooo:paragraph-rsid="0014b27d" style:font-size-asian="10pt" style:font-size-complex="10pt"/> <style:text-properties style:font-name="Droid Sans Japanese2" fo:font-size="10pt" officeooo:paragraph-rsid="0014b27d" style:font-size-asian="10pt" style:font-size-complex="10pt"/>
</style:style> </style:style>
<style:style style:name="P30" style:family="paragraph" style:parent-style-name="Standard"> <style:style style:name="P30" style:family="paragraph" style:parent-style-name="Standard">
@@ -577,15 +594,15 @@
<style:text-properties style:font-name="Droid Sans Japanese2" fo:font-size="10pt" style:font-size-asian="10pt" style:font-size-complex="10pt"/> <style:text-properties style:font-name="Droid Sans Japanese2" fo:font-size="10pt" style:font-size-asian="10pt" style:font-size-complex="10pt"/>
</style:style> </style:style>
<style:style style:name="P32" style:family="paragraph" style:parent-style-name="Standard"> <style:style style:name="P32" style:family="paragraph" style:parent-style-name="Standard">
<style:paragraph-properties fo:margin-left="0in" fo:margin-right="0in" fo:text-indent="0in" style:auto-text-indent="false"/> <style:paragraph-properties fo:margin-left="0cm" fo:margin-right="0cm" fo:text-indent="0cm" style:auto-text-indent="false"/>
<style:text-properties style:font-name="Droid Sans Japanese2" fo:font-size="10pt" officeooo:paragraph-rsid="00274931" style:font-size-asian="10pt" style:font-size-complex="10pt"/> <style:text-properties style:font-name="Droid Sans Japanese2" fo:font-size="10pt" officeooo:paragraph-rsid="00274931" style:font-size-asian="10pt" style:font-size-complex="10pt"/>
</style:style> </style:style>
<style:style style:name="P33" style:family="paragraph" style:parent-style-name="Standard"> <style:style style:name="P33" style:family="paragraph" style:parent-style-name="Standard">
<style:paragraph-properties fo:margin-left="0in" fo:margin-right="0in" fo:text-indent="0in" style:auto-text-indent="false"/> <style:paragraph-properties fo:margin-left="0cm" fo:margin-right="0cm" fo:text-indent="0cm" style:auto-text-indent="false"/>
<style:text-properties style:font-name="Droid Sans Japanese2" fo:font-size="10pt" officeooo:paragraph-rsid="00284349" style:font-size-asian="10pt" style:font-size-complex="10pt"/> <style:text-properties style:font-name="Droid Sans Japanese2" fo:font-size="10pt" officeooo:paragraph-rsid="00284349" style:font-size-asian="10pt" style:font-size-complex="10pt"/>
</style:style> </style:style>
<style:style style:name="P34" style:family="paragraph" style:parent-style-name="Standard"> <style:style style:name="P34" style:family="paragraph" style:parent-style-name="Standard">
<style:paragraph-properties fo:margin-left="0in" fo:margin-right="0in" fo:text-indent="0in" style:auto-text-indent="false"/> <style:paragraph-properties fo:margin-left="0cm" fo:margin-right="0cm" fo:text-indent="0cm" style:auto-text-indent="false"/>
<style:text-properties style:font-name="Droid Sans Japanese2" fo:font-size="10pt" officeooo:paragraph-rsid="0030c0b3" style:font-size-asian="10pt" style:font-size-complex="10pt"/> <style:text-properties style:font-name="Droid Sans Japanese2" fo:font-size="10pt" officeooo:paragraph-rsid="0030c0b3" style:font-size-asian="10pt" style:font-size-complex="10pt"/>
</style:style> </style:style>
<style:style style:name="P35" style:family="paragraph" style:parent-style-name="Table_20_Contents"> <style:style style:name="P35" style:family="paragraph" style:parent-style-name="Table_20_Contents">
@@ -633,7 +650,7 @@
<style:text-properties fo:color="#666666" loext:opacity="100%" style:font-name="Droid Sans Japanese2" fo:font-size="7pt" style:text-underline-style="solid" style:text-underline-type="double" style:text-underline-width="auto" style:text-underline-color="font-color" fo:font-weight="bold" officeooo:rsid="0266c2a9" officeooo:paragraph-rsid="0049dca0" style:font-size-asian="7pt" style:font-weight-asian="bold" style:font-size-complex="7pt" style:font-weight-complex="bold"/> <style:text-properties fo:color="#666666" loext:opacity="100%" style:font-name="Droid Sans Japanese2" fo:font-size="7pt" style:text-underline-style="solid" style:text-underline-type="double" style:text-underline-width="auto" style:text-underline-color="font-color" fo:font-weight="bold" officeooo:rsid="0266c2a9" officeooo:paragraph-rsid="0049dca0" style:font-size-asian="7pt" style:font-weight-asian="bold" style:font-size-complex="7pt" style:font-weight-complex="bold"/>
</style:style> </style:style>
<style:style style:name="P46" style:family="paragraph" style:parent-style-name="Header"> <style:style style:name="P46" style:family="paragraph" style:parent-style-name="Header">
<style:paragraph-properties fo:margin-left="0in" fo:margin-right="0in" fo:text-align="center" style:justify-single-word="false" fo:text-indent="0in" style:auto-text-indent="false"/> <style:paragraph-properties fo:margin-left="0cm" fo:margin-right="0cm" fo:text-align="center" style:justify-single-word="false" fo:text-indent="0cm" style:auto-text-indent="false"/>
<style:text-properties fo:color="#666666" loext:opacity="100%" style:font-name="Droid Sans Japanese2" fo:font-size="7pt" fo:font-style="normal" style:text-underline-style="none" fo:font-weight="normal" officeooo:paragraph-rsid="0049dca0" style:font-size-asian="7pt" style:font-style-asian="normal" style:font-weight-asian="normal" style:font-size-complex="7pt" style:font-style-complex="normal" style:font-weight-complex="normal"/> <style:text-properties fo:color="#666666" loext:opacity="100%" style:font-name="Droid Sans Japanese2" fo:font-size="7pt" fo:font-style="normal" style:text-underline-style="none" fo:font-weight="normal" officeooo:paragraph-rsid="0049dca0" style:font-size-asian="7pt" style:font-style-asian="normal" style:font-weight-asian="normal" style:font-size-complex="7pt" style:font-style-complex="normal" style:font-weight-complex="normal"/>
</style:style> </style:style>
<style:style style:name="P47" style:family="paragraph" style:parent-style-name="Header"> <style:style style:name="P47" style:family="paragraph" style:parent-style-name="Header">
@@ -683,19 +700,19 @@
<style:text-properties style:text-outline="false" style:text-line-through-style="none" style:text-line-through-type="none" style:font-name="Droid Sans Japanese2" fo:font-size="10pt" fo:font-style="normal" fo:text-shadow="none" style:text-underline-style="none" fo:font-weight="bold" officeooo:rsid="000cde7f" officeooo:paragraph-rsid="0030c0b3" style:font-size-asian="10pt" style:font-style-asian="normal" style:font-weight-asian="bold" style:font-size-complex="10pt" style:font-weight-complex="bold" style:text-emphasize="none"/> <style:text-properties style:text-outline="false" style:text-line-through-style="none" style:text-line-through-type="none" style:font-name="Droid Sans Japanese2" fo:font-size="10pt" fo:font-style="normal" fo:text-shadow="none" style:text-underline-style="none" fo:font-weight="bold" officeooo:rsid="000cde7f" officeooo:paragraph-rsid="0030c0b3" style:font-size-asian="10pt" style:font-style-asian="normal" style:font-weight-asian="bold" style:font-size-complex="10pt" style:font-weight-complex="bold" style:text-emphasize="none"/>
</style:style> </style:style>
<style:style style:name="P59" style:family="paragraph" style:parent-style-name="Standard"> <style:style style:name="P59" style:family="paragraph" style:parent-style-name="Standard">
<style:paragraph-properties fo:margin-left="0in" fo:margin-right="0in" fo:text-indent="0in" style:auto-text-indent="false"/> <style:paragraph-properties fo:margin-left="0cm" fo:margin-right="0cm" fo:text-indent="0cm" style:auto-text-indent="false"/>
<style:text-properties style:text-outline="false" style:text-line-through-style="none" style:text-line-through-type="none" style:font-name="Droid Sans Japanese2" fo:font-size="10pt" fo:font-style="normal" fo:text-shadow="none" style:text-underline-style="none" fo:font-weight="bold" officeooo:rsid="000cde7f" officeooo:paragraph-rsid="00274931" style:font-size-asian="10pt" style:font-style-asian="normal" style:font-weight-asian="bold" style:font-size-complex="10pt" style:font-weight-complex="bold" style:text-emphasize="none"/> <style:text-properties style:text-outline="false" style:text-line-through-style="none" style:text-line-through-type="none" style:font-name="Droid Sans Japanese2" fo:font-size="10pt" fo:font-style="normal" fo:text-shadow="none" style:text-underline-style="none" fo:font-weight="bold" officeooo:rsid="000cde7f" officeooo:paragraph-rsid="00274931" style:font-size-asian="10pt" style:font-style-asian="normal" style:font-weight-asian="bold" style:font-size-complex="10pt" style:font-weight-complex="bold" style:text-emphasize="none"/>
</style:style> </style:style>
<style:style style:name="P60" style:family="paragraph" style:parent-style-name="Standard"> <style:style style:name="P60" style:family="paragraph" style:parent-style-name="Standard">
<style:paragraph-properties fo:margin-left="0in" fo:margin-right="0in" fo:text-indent="0in" style:auto-text-indent="false"/> <style:paragraph-properties fo:margin-left="0cm" fo:margin-right="0cm" fo:text-indent="0cm" style:auto-text-indent="false"/>
<style:text-properties style:text-outline="false" style:text-line-through-style="none" style:text-line-through-type="none" style:font-name="Droid Sans Japanese2" fo:font-size="10pt" fo:font-style="normal" fo:text-shadow="none" style:text-underline-style="none" fo:font-weight="bold" officeooo:rsid="000cde7f" officeooo:paragraph-rsid="00284349" style:font-size-asian="10pt" style:font-style-asian="normal" style:font-weight-asian="bold" style:font-size-complex="10pt" style:font-weight-complex="bold" style:text-emphasize="none"/> <style:text-properties style:text-outline="false" style:text-line-through-style="none" style:text-line-through-type="none" style:font-name="Droid Sans Japanese2" fo:font-size="10pt" fo:font-style="normal" fo:text-shadow="none" style:text-underline-style="none" fo:font-weight="bold" officeooo:rsid="000cde7f" officeooo:paragraph-rsid="00284349" style:font-size-asian="10pt" style:font-style-asian="normal" style:font-weight-asian="bold" style:font-size-complex="10pt" style:font-weight-complex="bold" style:text-emphasize="none"/>
</style:style> </style:style>
<style:style style:name="P61" style:family="paragraph" style:parent-style-name="Standard"> <style:style style:name="P61" style:family="paragraph" style:parent-style-name="Standard">
<style:paragraph-properties fo:margin-left="0in" fo:margin-right="0in" fo:text-indent="0in" style:auto-text-indent="false"/> <style:paragraph-properties fo:margin-left="0cm" fo:margin-right="0cm" fo:text-indent="0cm" style:auto-text-indent="false"/>
<style:text-properties style:text-outline="false" style:text-line-through-style="none" style:text-line-through-type="none" style:font-name="Droid Sans Japanese2" fo:font-size="10pt" fo:font-style="normal" fo:text-shadow="none" style:text-underline-style="none" fo:font-weight="bold" officeooo:rsid="000cde7f" officeooo:paragraph-rsid="002f4ce3" style:font-size-asian="10pt" style:font-style-asian="normal" style:font-weight-asian="bold" style:font-size-complex="10pt" style:font-weight-complex="bold" style:text-emphasize="none"/> <style:text-properties style:text-outline="false" style:text-line-through-style="none" style:text-line-through-type="none" style:font-name="Droid Sans Japanese2" fo:font-size="10pt" fo:font-style="normal" fo:text-shadow="none" style:text-underline-style="none" fo:font-weight="bold" officeooo:rsid="000cde7f" officeooo:paragraph-rsid="002f4ce3" style:font-size-asian="10pt" style:font-style-asian="normal" style:font-weight-asian="bold" style:font-size-complex="10pt" style:font-weight-complex="bold" style:text-emphasize="none"/>
</style:style> </style:style>
<style:style style:name="P62" style:family="paragraph" style:parent-style-name="Standard"> <style:style style:name="P62" style:family="paragraph" style:parent-style-name="Standard">
<style:paragraph-properties fo:margin-left="0in" fo:margin-right="0in" fo:text-indent="0in" style:auto-text-indent="false"/> <style:paragraph-properties fo:margin-left="0cm" fo:margin-right="0cm" fo:text-indent="0cm" style:auto-text-indent="false"/>
<style:text-properties style:text-outline="false" style:text-line-through-style="none" style:text-line-through-type="none" style:font-name="Droid Sans Japanese2" fo:font-size="10pt" fo:font-style="normal" fo:text-shadow="none" style:text-underline-style="none" fo:font-weight="bold" officeooo:rsid="000cde7f" officeooo:paragraph-rsid="0030c0b3" style:font-size-asian="10pt" style:font-style-asian="normal" style:font-weight-asian="bold" style:font-size-complex="10pt" style:font-weight-complex="bold" style:text-emphasize="none"/> <style:text-properties style:text-outline="false" style:text-line-through-style="none" style:text-line-through-type="none" style:font-name="Droid Sans Japanese2" fo:font-size="10pt" fo:font-style="normal" fo:text-shadow="none" style:text-underline-style="none" fo:font-weight="bold" officeooo:rsid="000cde7f" officeooo:paragraph-rsid="0030c0b3" style:font-size-asian="10pt" style:font-style-asian="normal" style:font-weight-asian="bold" style:font-size-complex="10pt" style:font-weight-complex="bold" style:text-emphasize="none"/>
</style:style> </style:style>
<style:style style:name="P63" style:family="paragraph" style:parent-style-name="Standard"> <style:style style:name="P63" style:family="paragraph" style:parent-style-name="Standard">
@@ -828,10 +845,6 @@
<style:style style:name="P95" style:family="paragraph" style:parent-style-name="Standard"> <style:style style:name="P95" style:family="paragraph" style:parent-style-name="Standard">
<style:text-properties officeooo:rsid="000a7d47" officeooo:paragraph-rsid="000a7d47"/> <style:text-properties officeooo:rsid="000a7d47" officeooo:paragraph-rsid="000a7d47"/>
</style:style> </style:style>
<style:style style:name="P96" style:family="paragraph" style:parent-style-name="Text_20_body">
<style:paragraph-properties fo:text-align="start" style:justify-single-word="false"/>
<style:text-properties style:font-name="Droid Sans Japanese2" fo:font-size="9pt" fo:font-weight="bold" officeooo:rsid="00286adc" officeooo:paragraph-rsid="00254a64" style:font-size-asian="9pt" style:font-weight-asian="bold" style:font-size-complex="9pt" style:font-weight-complex="bold"/>
</style:style>
<style:style style:name="T1" style:family="text"> <style:style style:name="T1" style:family="text">
<style:text-properties fo:color="#333333" loext:opacity="100%" fo:font-weight="bold" officeooo:rsid="026544ec" style:font-weight-asian="bold" style:font-weight-complex="bold"/> <style:text-properties fo:color="#333333" loext:opacity="100%" fo:font-weight="bold" officeooo:rsid="026544ec" style:font-weight-asian="bold" style:font-weight-complex="bold"/>
</style:style> </style:style>
@@ -947,10 +960,10 @@
<style:text-properties style:text-outline="false" style:text-line-through-style="none" style:text-line-through-type="none" fo:font-size="9pt" fo:font-style="normal" fo:text-shadow="none" style:text-underline-style="none" fo:font-weight="normal" officeooo:rsid="000cde7f" style:font-size-asian="9pt" style:font-style-asian="normal" style:font-weight-asian="normal" style:font-size-complex="9pt" style:font-weight-complex="normal" style:text-emphasize="none"/> <style:text-properties style:text-outline="false" style:text-line-through-style="none" style:text-line-through-type="none" fo:font-size="9pt" fo:font-style="normal" fo:text-shadow="none" style:text-underline-style="none" fo:font-weight="normal" officeooo:rsid="000cde7f" style:font-size-asian="9pt" style:font-style-asian="normal" style:font-weight-asian="normal" style:font-size-complex="9pt" style:font-weight-complex="normal" style:text-emphasize="none"/>
</style:style> </style:style>
<style:style style:name="T39" style:family="text"> <style:style style:name="T39" style:family="text">
<style:text-properties style:text-outline="false" style:text-line-through-style="none" style:text-line-through-type="none" fo:letter-spacing="-0.0075in" fo:font-style="normal" fo:text-shadow="none" style:text-underline-style="none" style:font-style-asian="normal" style:text-emphasize="none"/> <style:text-properties style:text-outline="false" style:text-line-through-style="none" style:text-line-through-type="none" fo:letter-spacing="-0.019cm" fo:font-style="normal" fo:text-shadow="none" style:text-underline-style="none" style:font-style-asian="normal" style:text-emphasize="none"/>
</style:style> </style:style>
<style:style style:name="T40" style:family="text"> <style:style style:name="T40" style:family="text">
<style:text-properties style:text-outline="false" style:text-line-through-style="none" style:text-line-through-type="none" fo:letter-spacing="-0.0071in" fo:font-style="normal" fo:text-shadow="none" style:text-underline-style="none" style:font-style-asian="normal" style:text-emphasize="none"/> <style:text-properties style:text-outline="false" style:text-line-through-style="none" style:text-line-through-type="none" fo:letter-spacing="-0.018cm" fo:font-style="normal" fo:text-shadow="none" style:text-underline-style="none" style:font-style-asian="normal" style:text-emphasize="none"/>
</style:style> </style:style>
<style:style style:name="T41" style:family="text"> <style:style style:name="T41" style:family="text">
<style:text-properties style:text-outline="false" style:text-line-through-style="none" style:text-line-through-type="none" style:font-name="Droid Sans Japanese" fo:font-size="8pt" fo:font-style="normal" fo:text-shadow="none" style:text-underline-style="none" fo:font-weight="bold" style:font-size-asian="8pt" style:font-style-asian="normal" style:font-weight-asian="bold" style:text-emphasize="none"/> <style:text-properties style:text-outline="false" style:text-line-through-style="none" style:text-line-through-type="none" style:font-name="Droid Sans Japanese" fo:font-size="8pt" fo:font-style="normal" fo:text-shadow="none" style:text-underline-style="none" fo:font-weight="bold" style:font-size-asian="8pt" style:font-style-asian="normal" style:font-weight-asian="bold" style:text-emphasize="none"/>
@@ -986,19 +999,19 @@
<style:text-properties officeooo:rsid="00284349"/> <style:text-properties officeooo:rsid="00284349"/>
</style:style> </style:style>
<style:style style:name="fr1" style:family="graphic" style:parent-style-name="Graphics"> <style:style style:name="fr1" style:family="graphic" style:parent-style-name="Graphics">
<style:graphic-properties style:vertical-pos="middle" style:vertical-rel="baseline" style:horizontal-pos="from-left" style:horizontal-rel="paragraph" style:mirror="none" fo:clip="rect(0in, 0in, 0in, 0in)" draw:luminance="0%" draw:contrast="0%" draw:red="0%" draw:green="0%" draw:blue="0%" draw:gamma="100%" draw:color-inversion="false" draw:image-opacity="100%" draw:color-mode="standard" draw:wrap-influence-on-position="once-concurrent" loext:allow-overlap="true"/> <style:graphic-properties style:vertical-pos="middle" style:vertical-rel="baseline" style:horizontal-pos="from-left" style:horizontal-rel="paragraph" style:mirror="none" fo:clip="rect(0cm, 0cm, 0cm, 0cm)" draw:luminance="0%" draw:contrast="0%" draw:red="0%" draw:green="0%" draw:blue="0%" draw:gamma="100%" draw:color-inversion="false" draw:image-opacity="100%" draw:color-mode="standard" draw:wrap-influence-on-position="once-concurrent" loext:allow-overlap="true"/>
</style:style> </style:style>
<style:style style:name="fr2" style:family="graphic" style:parent-style-name="Frame"> <style:style style:name="fr2" style:family="graphic" style:parent-style-name="Frame">
<style:graphic-properties style:run-through="foreground" style:wrap="none" style:vertical-pos="from-top" style:vertical-rel="paragraph" style:horizontal-pos="from-left" style:horizontal-rel="paragraph" fo:padding="0.0591in" fo:border="none" draw:wrap-influence-on-position="once-concurrent" loext:allow-overlap="true"> <style:graphic-properties style:run-through="foreground" style:wrap="none" style:vertical-pos="from-top" style:vertical-rel="paragraph" style:horizontal-pos="from-left" style:horizontal-rel="paragraph" fo:padding="0.15cm" fo:border="none" draw:wrap-influence-on-position="once-concurrent" loext:allow-overlap="true">
<style:columns fo:column-count="1" fo:column-gap="0in"/> <style:columns fo:column-count="1" fo:column-gap="0cm"/>
</style:graphic-properties> </style:graphic-properties>
</style:style> </style:style>
<style:page-layout style:name="pm1"> <style:page-layout style:name="pm1">
<style:page-layout-properties fo:page-width="8.5in" fo:page-height="11in" style:num-format="1" style:print-orientation="portrait" fo:margin-top="0.7874in" fo:margin-bottom="0.7874in" fo:margin-left="0.7874in" fo:margin-right="0.7874in" style:writing-mode="lr-tb" style:layout-grid-color="#c0c0c0" style:layout-grid-lines="44" style:layout-grid-base-height="0.2165in" style:layout-grid-ruby-height="0in" style:layout-grid-mode="none" style:layout-grid-ruby-below="false" style:layout-grid-print="true" style:layout-grid-display="true" style:layout-grid-base-width="0.1457in" style:layout-grid-snap-to="true" style:footnote-max-height="0in" loext:margin-gutter="0in"> <style:page-layout-properties fo:page-width="21.59cm" fo:page-height="27.94cm" style:num-format="1" style:print-orientation="portrait" fo:margin-top="2cm" fo:margin-bottom="2cm" fo:margin-left="2cm" fo:margin-right="2cm" style:writing-mode="lr-tb" style:layout-grid-color="#c0c0c0" style:layout-grid-lines="44" style:layout-grid-base-height="0.55cm" style:layout-grid-ruby-height="0cm" style:layout-grid-mode="none" style:layout-grid-ruby-below="false" style:layout-grid-print="true" style:layout-grid-display="true" style:layout-grid-base-width="0.37cm" style:layout-grid-snap-to="true" style:footnote-max-height="0cm" loext:margin-gutter="0cm">
<style:footnote-sep style:width="0.0071in" style:distance-before-sep="0.0398in" style:distance-after-sep="0.0398in" style:line-style="solid" style:adjustment="left" style:rel-width="25%" style:color="#000000"/> <style:footnote-sep style:width="0.018cm" style:distance-before-sep="0.101cm" style:distance-after-sep="0.101cm" style:line-style="solid" style:adjustment="left" style:rel-width="25%" style:color="#000000"/>
</style:page-layout-properties> </style:page-layout-properties>
<style:header-style> <style:header-style>
<style:header-footer-properties fo:min-height="0in" fo:margin-left="0in" fo:margin-right="0in" fo:margin-bottom="0.1965in" fo:background-color="transparent" draw:fill="none" draw:fill-color="#729fcf"/> <style:header-footer-properties fo:min-height="0cm" fo:margin-left="0cm" fo:margin-right="0cm" fo:margin-bottom="0.499cm" fo:background-color="transparent" draw:fill="none" draw:fill-color="#729fcf"/>
</style:header-style> </style:header-style>
<style:footer-style/> <style:footer-style/>
</style:page-layout> </style:page-layout>
@@ -1014,7 +1027,7 @@
<table:table-column table:style-name="Tabla6.B"/> <table:table-column table:style-name="Tabla6.B"/>
<table:table-row> <table:table-row>
<table:table-cell table:style-name="Tabla6.A1" office:value-type="string"> <table:table-cell table:style-name="Tabla6.A1" office:value-type="string">
<text:p text:style-name="Table_20_Contents"><draw:frame draw:style-name="fr1" draw:name="Imagen2" text:anchor-type="as-char" svg:width="2.7102in" svg:height="0.6055in" draw:z-index="3"><draw:image draw:mime-type="image/jpeg"> <text:p text:style-name="Table_20_Contents"><draw:frame draw:style-name="fr1" draw:name="Imagen2" text:anchor-type="as-char" svg:width="6.884cm" svg:height="1.538cm" draw:z-index="2"><draw:image draw:mime-type="image/jpeg">
<office:binary-data>/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAMCAgMCAgMDAwMEAwMEBQgFBQQEBQoHBwYIDAoM <office:binary-data>/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAMCAgMCAgMDAwMEAwMEBQgFBQQEBQoHBwYIDAoM
DAsKCwsNDhIQDQ4RDgsLEBYQERMUFRUVDA8XGBYUGBIUFRT/2wBDAQMEBAUEBQkFBQkUDQsN DAsKCwsNDhIQDQ4RDgsLEBYQERMUFRUVDA8XGBYUGBIUFRT/2wBDAQMEBAUEBQkFBQkUDQsN
FBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBT/wAAR FBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBT/wAAR
@@ -1587,7 +1600,7 @@
<text:p text:style-name="P78">REGISTRO DE MANTENIMIENTO CORRECTIVO</text:p> <text:p text:style-name="P78">REGISTRO DE MANTENIMIENTO CORRECTIVO</text:p>
<text:p text:style-name="P82"><text:placeholder text:placeholder-type="text">&lt;/when&gt;</text:placeholder></text:p> <text:p text:style-name="P82"><text:placeholder text:placeholder-type="text">&lt;/when&gt;</text:placeholder></text:p>
<text:p text:style-name="P79"><text:placeholder text:placeholder-type="text">&lt;/choose&gt;</text:placeholder></text:p> <text:p text:style-name="P79"><text:placeholder text:placeholder-type="text">&lt;/choose&gt;</text:placeholder></text:p>
<text:p text:style-name="P72"><text:span text:style-name="T44">Fecha</text:span><text:span text:style-name="T30"> </text:span><text:span text:style-name="T36"><text:placeholder text:placeholder-type="text" text:description="format_datetime(datetime.datetime.now(),user.language, &apos;%25B %25d ,%25Y %25H:%25M%25p&apos;, maintenance.company.timezone)">&lt;format_datetime(datetime.datetime.now(),user.language, &apos;%b/%d/%Y&apos;, maintenance.company.timezone)&gt;</text:placeholder></text:span></text:p> <text:p text:style-name="P72"><text:span text:style-name="T44">Fecha</text:span><text:span text:style-name="T30"> </text:span><text:span text:style-name="T36"><text:placeholder text:placeholder-type="text" text:description="maintenance.service_maintenance.estimated_agended.date()">&lt;maintenance.service_maintenance.estimated_agended.date()&gt;</text:placeholder></text:span></text:p>
<text:p text:style-name="P72"><text:span text:style-name="T43">Consecutivo</text:span> <text:span text:style-name="T45"><text:placeholder text:placeholder-type="text">&lt;maintenance.code&gt;</text:placeholder></text:span></text:p> <text:p text:style-name="P72"><text:span text:style-name="T43">Consecutivo</text:span> <text:span text:style-name="T45"><text:placeholder text:placeholder-type="text">&lt;maintenance.code&gt;</text:placeholder></text:span></text:p>
<text:p text:style-name="P95"/> <text:p text:style-name="P95"/>
<text:p text:style-name="P73"><text:span text:style-name="T31">INFORMACIÓN</text:span><text:span text:style-name="T39"> </text:span><text:span text:style-name="T31">DEL</text:span><text:span text:style-name="T40"> </text:span><text:span text:style-name="T31">PROPIETARIO</text:span></text:p> <text:p text:style-name="P73"><text:span text:style-name="T31">INFORMACIÓN</text:span><text:span text:style-name="T39"> </text:span><text:span text:style-name="T31">DEL</text:span><text:span text:style-name="T40"> </text:span><text:span text:style-name="T31">PROPIETARIO</text:span></text:p>
@@ -1758,7 +1771,7 @@
<table:table-row> <table:table-row>
<table:table-cell table:style-name="Table1.A1" office:value-type="string"> <table:table-cell table:style-name="Table1.A1" office:value-type="string">
<text:p text:style-name="P34"><text:placeholder text:placeholder-type="text">&lt;if test=&quot;maintenance.technician_signature&quot;&gt;</text:placeholder></text:p> <text:p text:style-name="P34"><text:placeholder text:placeholder-type="text">&lt;if test=&quot;maintenance.technician_signature&quot;&gt;</text:placeholder></text:p>
<text:p text:style-name="P62"><draw:frame draw:style-name="fr2" draw:name="image: (maintenance.technician_signature, &apos;image/png&apos;)" text:anchor-type="paragraph" svg:x="0.0791in" svg:y="0.1161in" svg:width="1.6173in" svg:height="0.7673in" draw:z-index="4"> <text:p text:style-name="P62"><draw:frame draw:style-name="fr2" draw:name="image: (maintenance.technician_signature, &apos;image/png&apos;)" text:anchor-type="paragraph" svg:x="0.201cm" svg:y="0.295cm" svg:width="4.108cm" svg:height="1.949cm" draw:z-index="3">
<draw:text-box> <draw:text-box>
<text:p text:style-name="P48"/> <text:p text:style-name="P48"/>
<text:p text:style-name="Text">Texto <text:sequence text:ref-name="refText0" text:name="Text" text:formula="ooow:Text+1" style:num-format="1">1</text:sequence>: </text:p> <text:p text:style-name="Text">Texto <text:sequence text:ref-name="refText0" text:name="Text" text:formula="ooow:Text+1" style:num-format="1">1</text:sequence>: </text:p>
@@ -1786,7 +1799,7 @@
</table:table-cell> </table:table-cell>
</table:table-row> </table:table-row>
</table:table> </table:table>
<text:p text:style-name="P22"><text:soft-page-break/><text:placeholder text:placeholder-type="text">&lt;/for&gt;</text:placeholder></text:p> <text:p text:style-name="P22"><text:placeholder text:placeholder-type="text">&lt;/for&gt;</text:placeholder></text:p>
</office:text> </office:text>
</office:body> </office:body>
</office:document> </office:document>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

156
sale.py
View File

@@ -1,18 +1,18 @@
from trytond.pool import Pool, PoolMeta from trytond.pool import Pool, PoolMeta
from trytond.model import ModelView, ModelSQL, fields from trytond.model import ModelView, fields
from trytond.modules.currency.fields import Monetary from trytond.pyson import Eval, If
from trytond.pyson import Eval, Bool, If, Get, Equal
from decimal import Decimal from decimal import Decimal
from trytond.modules.product import price_digits
from trytond.transaction import Transaction from trytond.transaction import Transaction
from trytond.model import Workflow from trytond.model import Workflow
from trytond.modules.company.model import ( from trytond.modules.company.model import (
employee_field, set_employee, reset_employee) set_employee)
from trytond.exceptions import UserError from trytond.exceptions import UserError
from trytond.wizard import ( from trytond.wizard import (
Button, StateAction, StateTransition, StateView, Wizard) Button, StateAction, StateView, Wizard)
from trytond.i18n import gettext
from trytond.modules.sale.exceptions import PartyLocationError
from datetime import datetime
class Sale(metaclass=PoolMeta): class Sale(metaclass=PoolMeta):
@@ -20,29 +20,39 @@ class Sale(metaclass=PoolMeta):
__name__ = 'sale.sale' __name__ = 'sale.sale'
quote_number = fields.Char("Quote Number", readonly=True) quote_number = fields.Char("Quote Number", readonly=True)
sale_type = fields.Selection([('maintenance', 'Maintenance'),
('equipments', 'Equipments'), sale_type = fields.Selection([
('replaces', 'Replaces')], "Sale Type", required=True, ('maintenance', 'Maintenance'),
states={'readonly': Eval('state') != 'draft'}) ('equipments', 'Equipments'),
maintenance_type = fields.Selection([('', ""), ('replaces', 'Replaces')],
('preventive', 'Preventive'), "Sale Type", required=True,
('corrective', 'Corrective') states={
], "Maintenance Type", 'readonly': Eval('state') != 'draft'})
states={
'invisible': Eval('sale_type') != "maintenance", maintenance_type = fields.Selection([
'required': Eval('sale_type') == "maintenance", ('', ""),
'readonly': Eval('state') != 'draft'}, ('preventive', 'Preventive'),
('corrective', 'Corrective')],
"Maintenance Type",
states={
'invisible': Eval('sale_type') != "maintenance",
'required': Eval('sale_type') == "maintenance",
'readonly': Eval('state') != 'draft'},
depends=['sale_type']) depends=['sale_type'])
contract_ref = fields.Reference("Contract Base", selection='get_origin_contract', contract_ref = fields.Reference(
domain={'optical_equipment.contract': [ "Contract Base", selection='get_origin_contract',
('party', '=', Eval('party')), domain={
('state', '=', 'closed'), 'optical_equipment.contract': [
]}, ('party', '=', Eval('party')),
states={'invisible': (Eval('sale_type') != 'maintenance')}, ('state', '=', 'closed'),
search_context={ ]},
'related_party': Eval('party'), states={
},) 'invisible': (
Eval('sale_type') != 'maintenance')},
search_context={
'related_party': Eval('party'), })
agended = fields.Boolean("Scheduling", states={ agended = fields.Boolean("Scheduling", states={
'invisible': (Eval('sale_type') != 'maintenance')}) 'invisible': (Eval('sale_type') != 'maintenance')})
payment_term_description = fields.Char("Payment Term", states={ payment_term_description = fields.Char("Payment Term", states={
@@ -76,6 +86,14 @@ class Sale(metaclass=PoolMeta):
('processing', 'draft') ('processing', 'draft')
)) ))
@classmethod
def default_agended(self):
return False
@classmethod
def default_sale_date(cls):
return datetime.today().date()
@fields.depends('lines', 'sale_type', 'agended') @fields.depends('lines', 'sale_type', 'agended')
def on_chage_sale_type(self): def on_chage_sale_type(self):
self.lines = [] self.lines = []
@@ -84,10 +102,6 @@ class Sale(metaclass=PoolMeta):
elif self.sale_type == "maintenance": elif self.sale_type == "maintenance":
self.invoice_method = 'order' self.invoice_method = 'order'
@classmethod
def default_agended(self):
return False
@classmethod @classmethod
def _get_origin_contract(cls): def _get_origin_contract(cls):
'Return list of Model names for origin Reference' 'Return list of Model names for origin Reference'
@@ -129,50 +143,48 @@ class Sale(metaclass=PoolMeta):
except UserError: except UserError:
raise UserError(str('Validation Error')) raise UserError(str('Validation Error'))
else: else:
raise UserError(gettext('optical_equipment.msg_not_sequence_quote')) raise UserError(
gettext('optical_equipment.msg_not_sequence_quote'))
@ classmethod @classmethod
def copy(cls, sales, default=None): def copy(cls, sales, default=None):
today = datetime.today().date()
if default is None: if default is None:
default = {} default = {}
else: else:
default = default.copy() default = default.copy()
default.setdefault('number', None) default.setdefault('number', None)
default.setdefault('invoice_state', 'none') default.setdefault('invoice_state', 'none')
default.setdefault('invoices_ignored', None) default.setdefault('invoices_ignored', None)
default.setdefault('moves', None)
default.setdefault('shipment_state', 'none') default.setdefault('shipment_state', 'none')
default.setdefault('sale_date', today)
default.setdefault('quoted_by') default.setdefault('quoted_by')
default.setdefault('confirmed_by') default.setdefault('confirmed_by')
return super(Sale, cls).copy(sales, default=default) return super(Sale, cls).copy(sales, default=default)
@ classmethod @classmethod
@ ModelView.button_action( @ModelView.button_action(
'optical_equipment.wizard_print_balance_sale_party') 'optical_equipment.wizard_print_balance_sale_party')
def report(cls, sales): def report(cls, sales):
pass pass
@ classmethod @classmethod
@ ModelView.button @ModelView.button
@ Workflow.transition('quotation') @Workflow.transition('quotation')
def quote(cls, sales): def quote(cls, sales):
pool = Pool()
AdvancePaymentCondition = pool.get('sale.advance_payment.condition')
for sale in sales: for sale in sales:
sale.check_for_quotation() sale.check_for_quotation()
cls.set_quote_number(sales) cls.set_quote_number(sales)
for sale in sales: # for sale in sales:
sale.set_advance_payment_term() # sale.set_advance_payment_term()
cls.save(sales) # cls.save(sales)
@ classmethod @classmethod
@ ModelView.button_action( @ModelView.button_action(
'optical_equipment.wizard_confirm_sale_date') 'optical_equipment.wizard_confirm_sale_date')
@ Workflow.transition('confirmed') @Workflow.transition('confirmed')
@ set_employee('confirmed_by') @set_employee('confirmed_by')
def confirm(cls, sales): def confirm(cls, sales):
pool = Pool() pool = Pool()
Configuration = pool.get('sale.configuration') Configuration = pool.get('sale.configuration')
@@ -192,7 +204,9 @@ class Sale(metaclass=PoolMeta):
state_agended='no_agenda', state_agended='no_agenda',
propietary=sale.party, propietary=sale.party,
propietary_address=sale.shipment_address, propietary_address=sale.shipment_address,
contract_origin=sale.contract_ref if sale.contract_ref else None, contract_origin=(
sale.contract_ref.id
if sale.contract_ref else None),
sale_origin=sale, sale_origin=sale,
sale_date=sale.sale_date, sale_date=sale.sale_date,
state="draft" state="draft"
@@ -214,8 +228,6 @@ class SaleLine(metaclass=PoolMeta):
__name__ = 'sale.line' __name__ = 'sale.line'
product_equipment = fields.Boolean("Product Equipment") product_equipment = fields.Boolean("Product Equipment")
unit_digits = fields.Function(fields.Integer('Unit Digits'),
'on_change_with_unit_digits')
@classmethod @classmethod
def __setup__(cls): def __setup__(cls):
@@ -224,17 +236,17 @@ class SaleLine(metaclass=PoolMeta):
If(Eval('_parent_sale.sale_type') == 'maintenance', If(Eval('_parent_sale.sale_type') == 'maintenance',
[('type', '=', 'service'), [('type', '=', 'service'),
('maintenance_activity', '=', True)], [])) ('maintenance_activity', '=', True)], []))
cls.product.domain.append(If(Eval('_parent_sale.sale_type') == 'replaces', cls.product.domain.append(
[('replacement', '=', True)], [])) If(Eval('_parent_sale.sale_type') == 'replaces',
[('replacement', '=', True)], []))
def on_change_with_unit_digits(self, name=None): @fields.depends(
if self.unit: 'product', 'unit', 'quantity', 'sale',
return self.unit.digits '_parent_sale.party', '_parent_sale.sale_type',
return 2 methods=[
'_get_tax_rule_pattern',
@fields.depends('product', 'unit', 'quantity', 'sale', '_get_context_sale_price',
'_parent_sale.party', '_parent_sale.sale_type', methods=['_get_tax_rule_pattern', 'on_change_with_amount'])
'_get_context_sale_price', 'on_change_with_amount'])
def on_change_product(self): def on_change_product(self):
Product = Pool().get('product.product') Product = Pool().get('product.product')
if not self.product: if not self.product:
@@ -253,7 +265,8 @@ class SaleLine(metaclass=PoolMeta):
self.product_equipment = False self.product_equipment = False
party = self.sale.party party = self.sale.party
# Set taxes before unit_price to have taxes in context of sale price # Set taxes before unit_price
# to have taxes in context of sale price
taxes = [] taxes = []
pattern = self._get_tax_rule_pattern() pattern = self._get_tax_rule_pattern()
for tax in self.product.customer_taxes_used: for tax in self.product.customer_taxes_used:
@@ -273,11 +286,13 @@ class SaleLine(metaclass=PoolMeta):
category = self.product.sale_uom.category category = self.product.sale_uom.category
if not self.unit or self.unit.category != category: if not self.unit or self.unit.category != category:
self.unit = self.product.sale_uom self.unit = self.product.sale_uom
self.unit_digits = self.product.sale_uom.digits # self.unit_digits = self.product.sale_uom.digits
with Transaction().set_context(self._get_context_sale_price()): with Transaction().set_context(self._get_context_sale_price()):
self.unit_price = Product.get_sale_price([self.product], self.unit_price = Product.get_sale_price(
self.quantity or 0)[self.product.id] [self.product],
self.quantity or 0
)[self.product.id]
if self.unit_price: if self.unit_price:
self.unit_price = self.unit_price.quantize( self.unit_price = self.unit_price.quantize(
@@ -325,7 +340,7 @@ class SaleLine(metaclass=PoolMeta):
move = Move() move = Move()
move.quantity = quantity move.quantity = quantity
move.uom = self.unit move.unit = self.unit
move.product = self.product move.product = self.product
move.from_location = self.from_location move.from_location = self.from_location
move.to_location = self.to_location move.to_location = self.to_location
@@ -356,7 +371,8 @@ class ConfirmSaleDate(Wizard):
start = StateView('optical_equipment.confirm_sale_date.form', start = StateView('optical_equipment.confirm_sale_date.form',
'optical_equipment.confirm_sale_date_view_form', [ 'optical_equipment.confirm_sale_date_view_form', [
Button('Confirmar', 'confirm_date', 'tryton-ok', default=True), Button('Confirmar', 'confirm_date',
'tryton-ok', default=True),
]) ])
confirm_date = StateAction('sale.act_sale_form') confirm_date = StateAction('sale.act_sale_form')

145
sale.xml
View File

@@ -2,76 +2,79 @@
<!--This file file is part of Tryton. The COPYRIGHT file at the top level <!--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. --> of this repository contains the full copyright notices and license terms. -->
<tryton> <tryton>
<record model="ir.ui.view" id="sale_view_tree"> <data>
<field name="model">sale.sale</field> <record model="ir.ui.view" id="sale_view_tree">
<field name="inherit" ref="sale.sale_view_tree"/> <field name="model">sale.sale</field>
<field name="name">sale_tree</field> <field name="inherit" ref="sale.sale_view_tree"/>
</record> <field name="name">sale_tree</field>
<record model="ir.ui.view" id="sale_view_form"> </record>
<field name="model">sale.sale</field> <record model="ir.ui.view" id="sale_view_form">
<field name="inherit" ref="sale.sale_view_form"/> <field name="model">sale.sale</field>
<field name="name">sale_form</field> <field name="inherit" ref="sale.sale_view_form"/>
</record> <field name="name">sale_form</field>
<record model="ir.ui.view" id="product_view_list_sale_line"> </record>
<field name="model">product.product</field> <record model="ir.ui.view" id="product_view_list_sale_line">
<field name="inherit" ref="sale.product_view_list_sale_line"/> <field name="model">product.product</field>
<field name="name">product_list_sale_line</field> <field name="inherit" ref="sale.product_view_list_sale_line"/>
</record> <field name="name">product_list_sale_line</field>
<record model="ir.sequence" id="sequence_quote_sale"> </record>
<field name="name">Sale Quote</field> <record model="ir.sequence" id="sequence_quote_sale">
<field name="sequence_type" ref="sale.sequence_type_sale"/> <field name="name">Sale Quote</field>
</record> <field name="sequence_type" ref="sale.sequence_type_sale"/>
<record model="ir.action.report" id="sale.report_sale"> </record>
<field name="active" eval="False"/> <record model="ir.action.report" id="sale.report_sale">
</record> <field name="active" eval="False"/>
<record model="ir.model.button" id="report_balance_party_sale"> </record>
<field name="name">report</field> <record model="ir.model.button" id="report_balance_party_sale">
<field name="string">Estado de Cuenta</field> <field name="name">report</field>
<field name="model" search="[('model', '=', 'sale.sale')]"/> <field name="string">Estado de Cuenta</field>
</record> <field name="model" search="[('model', '=', 'sale.sale')]"/>
<record model="ir.ui.view" id="confirm_sale_date_view_form"> </record>
<field name="model">optical_equipment.confirm_sale_date.form</field> <record model="ir.ui.view" id="confirm_sale_date_view_form">
<field name="type">form</field> <field name="model">optical_equipment.confirm_sale_date.form</field>
<field name="name">confirm_sale_date_form</field> <field name="type">form</field>
</record> <field name="name">confirm_sale_date_form</field>
<record model="ir.action.wizard" id="wizard_confirm_sale_date"> </record>
<field name="name">Confirm Sale Date</field> <record model="ir.action.wizard" id="wizard_confirm_sale_date">
<field name="wiz_name">optical_equipment.confirm_sale_date</field> <field name="name">Confirm Sale Date</field>
</record> <field name="wiz_name">optical_equipment.confirm_sale_date</field>
<record model="ir.action.report" id="report_sale"> </record>
<field name="name">Sale Equipments</field> <record model="ir.action.report" id="report_sale">
<field name="model">sale.sale</field> <field name="name">Sale Equipments</field>
<field name="report_name">sale.sale</field> <field name="model">sale.sale</field>
<field name="report">optical_equipment/report/Sale_Internal.fodt</field> <field name="report_name">sale.sale</field>
<field name="single" eval="True"/> <field name="report">optical_equipment/report/Sale_Internal.fodt</field>
</record> <field name="single" eval="True"/>
<record model="ir.action.keyword" id="report_sale_keyword"> </record>
<field name="keyword">form_print</field> <record model="ir.action.keyword" id="report_sale_keyword">
<field name="model">sale.sale,-1</field> <field name="keyword">form_print</field>
<field name="action" ref="report_sale"/> <field name="model">sale.sale,-1</field>
</record> <field name="action" ref="report_sale"/>
<record model="ir.action.report" id="report_sale_internal"> </record>
<field name="name">Sale Equipments Internal</field> <record model="ir.action.report" id="report_sale_internal">
<field name="model">sale.sale</field> <field name="name">Sale Equipments Internal</field>
<field name="report_name">sale.sale</field> <field name="model">sale.sale</field>
<field name="report">optical_equipment/report/Sale.fodt</field> <field name="report_name">sale.sale</field>
<field name="single" eval="True"/> <field name="report">optical_equipment/report/Sale.fodt</field>
</record> <field name="single" eval="True"/>
<record model="ir.action.keyword" id="report_sale_internal_keyword"> </record>
<field name="keyword">form_print</field> <record model="ir.action.keyword" id="report_sale_internal_keyword">
<field name="model">sale.sale,-1</field> <field name="keyword">form_print</field>
<field name="action" ref="report_sale_internal"/> <field name="model">sale.sale,-1</field>
</record> <field name="action" ref="report_sale_internal"/>
</record>
<record model="ir.action.report" id="report_payment"> <record model="ir.action.report" id="report_payment">
<field name="name">Payment</field> <field name="name">Payment</field>
<field name="model">account.statement.line</field> <field name="model">account.statement.line</field>
<field name="report_name">account.statement.line</field> <field name="report_name">account.statement.line</field>
<field name="report">optical_equipment/report/Payment.fodt</field> <field name="report">optical_equipment/report/Payment.fodt</field>
<field name="single" eval="True"/> <field name="single" eval="True"/>
</record> </record>
<record model="ir.action.keyword" id="report_payment_keyword"> <!--
<field name="keyword">form_print</field> <record model="ir.action.keyword" id="report_payment_keyword">
<field name="model">account.statement.line,-1</field> <field name="keyword">form_print</field>
<field name="action" ref="report_payment"/> <field name="model">account.statement.line,-1</field>
</record> <field name="action" ref="report_payment"/>
</record> -->
</data>
</tryton> </tryton>

View File

@@ -2,9 +2,11 @@
<!--This file file is part of Tryton. The COPYRIGHT file at the top level of <!--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 repository contains the full copyright notices and license terms. -->
<tryton> <tryton>
<record model="ir.ui.view" id="shipment_out_view_form"> <data>
<field name="model">stock.shipment.out</field> <record model="ir.ui.view" id="shipment_out_view_form">
<field name="inherit" ref="stock.shipment_out_view_form"/> <field name="model">stock.shipment.out</field>
<field name="name">shipment_out_form</field> <field name="inherit" ref="stock.shipment_out_view_form"/>
</record> <field name="name">shipment_out_form</field>
</record>
</data>
</tryton> </tryton>

View File

@@ -0,0 +1,2 @@
# This file is part of Tryton. The COPYRIGHT file at the top level of
# this repository contains the full copyright notices and license terms.

41863
tests/files/database.dump Normal file

File diff suppressed because one or more lines are too long

BIN
tests/files/signature.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

View File

@@ -0,0 +1,495 @@
===========================
Optical Equipment Scenario
===========================
Imports::
>>> from proteus import Model, Wizard
>>> from trytond.tests.tools import activate_modules, set_user
>>> from datetime import date, timedelta, datetime
>>> import xml.etree.ElementTree as ET
>>> from trytond.modules.company.tests.tools import create_company, get_company
>>> from trytond.modules.account.tests.tools import (create_chart, create_fiscalyear, create_tax, get_accounts)
>>> from trytond.modules.account_invoice.tests.tools import (create_payment_term, set_fiscalyear_invoice_sequences)
>>> from decimal import Decimal
>>> import datetime
>>> today = datetime.date.today()
>>> from trytond.tools import file_open
Activate modules::
>>> config = activate_modules('optical_equipment')
Create company::
>>> _ = create_company()
>>> company = get_company()
Create user admin::
>>> Group = Model.get("res.group")
>>> User = Model.get("res.user")
>>> user = User(config.user)
>>> user.login = "admin"
>>> user.save()
>>> group, = Group().find(["name", "=", "Administration"])
>>> group
proteus.Model.get('res.group')(1)
>>> group_equipment, = Group().find(["name", "=", "Equipment Administration"])
>>> group_equipment
proteus.Model.get('res.group')(18)
>>> group.users.append(user)
>>> group.save()
>>> group_equipment.users
[proteus.Model.get('res.user')(1)]
Set employee::
>>> User = Model.get('res.user')
>>> Party = Model.get('party.party')
>>> Employee = Model.get('company.employee')
>>> employee_party = Party(name="Employee")
>>> employee_party.save()
>>> employee = Employee(party=employee_party)
>>> employee.save()
>>> user = User(config.user)
>>> user.employees.append(employee)
>>> user.employee = employee
>>> user.save()
>>> set_user(user.id)
Create fiscal year::
>>> fiscalyear = set_fiscalyear_invoice_sequences(create_fiscalyear(company))
>>> fiscalyear.click('create_period')
Create chart of accounts::
>>> _ = create_chart(company)
>>> accounts = get_accounts(company)
>>> accounts
{'receivable': proteus.Model.get('account.account')(5), 'payable': proteus.Model.get('account.account')(4), 'revenue': proteus.Model.get('account.account')(6), 'expense': proteus.Model.get('account.account')(3), 'cash': proteus.Model.get('account.account')(2), 'tax': proteus.Model.get('account.account')(7)}
>>> revenue = accounts['revenue']
>>> expense = accounts['expense']
>>> cash = accounts['cash']
>>> Journal = Model.get('account.journal')
>>> PaymentMethod = Model.get('account.invoice.payment.method')
>>> cash_journal, = Journal.find([('type', '=', 'cash')])
>>> cash_journal.save()
>>> payment_method = PaymentMethod()
>>> payment_method.name = 'Cash'
>>> payment_method.journal = cash_journal
>>> payment_method.credit_account = cash
>>> payment_method.debit_account = cash
>>> payment_method.save()
Create tax::
>>> tax = create_tax(Decimal('.10'))
>>> tax.save()
Create configuration equipment::
>>> Config = Model.get("optical_equipment.configuration")
>>> UOM = Model.get("product.uom")
>>> celsius = UOM.find([("name", "=", "Celsius")])
>>> celsius
[proteus.Model.get('product.uom')(39)]
>>> moisture = UOM.find([("name", "=", "Relative Humedity")])
>>> moisture
[proteus.Model.get('product.uom')(42)]
>>> config = Config().find([])[0]
>>> equipment_sequence, = Model.get("ir.sequence").find(["name", "=", "Equipment"])
>>> equipment_sequence
proteus.Model.get('ir.sequence')(14)
>>> config.technician_responsible = employee
>>> with file_open("optical_equipment/tests/files/signature.png", "rb") as signature:
... config.technician_signature = signature.read()
>>> config.invima = "RH-202309-02409"
>>> config.equipment_sequence = equipment_sequence
>>> maintenance_sequence, = Model.get("ir.sequence").find(["name", "=", "Maintenance"])
>>> maintenance_sequence
proteus.Model.get('ir.sequence')(15)
>>> config.maintenance_sequence = maintenance_sequence
>>> agended_sequence, = Model.get("ir.sequence").find(["name", "=", "Agended"])
>>> agended_sequence
proteus.Model.get('ir.sequence')(13)
>>> config.agended_sequence = agended_sequence
>>> contract_sequence, = Model.get("ir.sequence").find(["name", "=", "Contract"])
>>> contract_sequence
proteus.Model.get('ir.sequence')(12)
>>> config.contract_sequence = contract_sequence
>>> sale_quote_number, = Model.get("ir.sequence").find(["name", "=", "Sale Quote"])
>>> sale_quote_number
proteus.Model.get('ir.sequence')(16)
>>> config.sale_quote_number = sale_quote_number
>>> config.temperature_min = 19
>>> config.temperature_max = 21
>>> config.temperature_uom = celsius[0]
>>> config.moisture_min = 43
>>> config.moisture_max = 45
>>> config.moisture_uom = moisture[0]
>>> config.save()
Create supplier::
>>> Party = Model.get('party.party')
>>> supplier = Party(name='Supplier')
>>> supplier.save()
Create customer type optica::
>>> customer_optica = Party(name='Customer optica', customer_type='optica')
>>> customer_optica.save()
>>> customer_optica.customer_type
'optica'
Create customer type ips::
>>> customer_ips = Party(name='Customer ips', customer_type='ips')
>>> customer_ips.save()
>>> customer_ips.customer_type
'ips'
Creaate contact optica::
>>> local_phone = customer_optica.contact_mechanisms.new()
>>> local_phone.type = 'phone'
>>> local_phone.value = '666666666'
>>> local_phone.value
'666666666'
Creaate contact ips::
>>> local_phone = customer_ips.contact_mechanisms.new()
>>> local_phone.type = 'phone'
>>> local_phone.value = '666666666'
>>> local_phone.value
'666666666'
Create account categories::
>>> ProductCategory = Model.get('product.category')
>>> optical_equitment_category = ProductCategory(name="Optical Equipment")
>>> optical_equitment_category.accounting = True
>>> optical_equitment_category.account_expense = expense
>>> optical_equitment_category.account_revenue = revenue
>>> children_1 = optical_equitment_category.childs.new(name="Optical Mobiliario")
>>> optical_equitment_category.save()
>>> len(optical_equitment_category.childs)
1
Create taxes::
>>> optical_equitment_category_tax, = optical_equitment_category.duplicate()
>>> optical_equitment_category_tax.customer_taxes.append(tax)
>>> optical_equitment_category_tax.save()
Create mark, model and reference category::
>>> mark_category = ProductCategory(name="ADLER")
>>> mark_category.save()
>>> model_category = ProductCategory(name="ADLER_01", parent=mark_category)
>>> model_category.save()
>>> reference_category = ProductCategory(name="ADLER_01", parent=model_category)
>>> reference_category.save()
>>> mark_category.childs
[proteus.Model.get('product.category')(6)]
Create product optical equipment::
>>> ProductUom = Model.get('product.uom')
>>> unit, = ProductUom.find([('name', '=', 'Unit')])
>>> ProductTemplate = Model.get('product.template')
>>> template = ProductTemplate()
>>> template.name = 'UNIDAD REFRACCION ESTANDAR'
>>> template.default_uom = unit
>>> template.type = 'goods'
>>> template.salable = True
>>> template.purchasable = True
>>> template.equipment = True
>>> template.list_price = Decimal('10')
>>> template.account_category = optical_equitment_category_tax
>>> template.maintenance_required = True
Mark Maintenance Activities::
>>> template.initial_operation = True
>>> template.check_equipment = True
>>> template.check_electric_system = True
>>> template.clean_int_ext = True
>>> template.preventive_activities = "Se verificaron las condiciones ambientales, se verificó estado físico del equipo, se verificó funcionamiento, se verificó tomas eléctricas y conexiones, se verificó el estado de los pulsadores, se verificó que el motor de la silla suba y baje, se realizó limpieza general, se lubricaron partes que lo requieren, se confirmó nuevamente funcionamiento."
Mark Calibration Required::
>>> template.calibration = True
>>> template.uncertainy_pattern = 0.1
>>> template.k_pattern = '-5.00'
>>> UsePattern = Model.get('optical_equipment.use_pattern')
>>> schematic_eye, = UsePattern.find([('name_pattern', '=', 'Schematic Eye')])
>>> template.use_pattern = schematic_eye
>>> k_pattern = template.k_pattern_list.new(pattern=-5)
>>> k_pattern.save()
>>> template.MEP = 0.1
>>> template.Usubi = 200
>>> template.resolution_type = 'digital'
>>> template.d_resolution = 0.25
>>> template.equipment_type = 'mobiliario_optico'
>>> template.biomedical_class = 'diagnostico'
>>> template.main_tecnology = 'electronico'
>>> template.mark_category = mark_category
>>> template.model_category = model_category
>>> template.use = 'medico'
>>> template.reference_category = reference_category
>>> template.save()
>>> len(template.k_pattern_list)
1
>>> product, = template.products
>>> product.name
'UNIDAD REFRACCION ESTANDAR'
Create Product Maintenance Service::
>>> maintenanceServiceProduct = ProductTemplate()
>>> maintenanceServiceProduct.name = 'Mantenimiento Correctivo'
>>> maintenanceServiceProduct.maintenance_activity = True
>>> maintenanceServiceProduct.default_uom = unit
>>> maintenanceServiceProduct.type = 'service'
>>> maintenanceServiceProduct.salable = True
>>> maintenanceServiceProduct.purchasable = True
>>> maintenanceServiceProduct.list_price = Decimal('10')
>>> maintenanceServiceProduct.account_category = optical_equitment_category_tax
>>> maintenanceServiceProduct.save()
>>> product1, = maintenanceServiceProduct.products
>>> product1.name
'Mantenimiento Correctivo'
Create payment term::
>>> payment_term = create_payment_term()
>>> payment_term.save()
Purchase 5 products:
>>> Purchase = Model.get('purchase.purchase')
>>> PurchaseLine = Model.get('purchase.line')
>>> purchase = Purchase()
>>> purchase.party = supplier
>>> purchase.payment_term = payment_term
>>> purchase.invoice_method = 'order'
>>> purchase_line = PurchaseLine()
>>> purchase.lines.append(purchase_line)
>>> purchase_line.product = product
>>> purchase_line.quantity = 2.0
>>> purchase_line.product_equipment
True
>>> purchase_line.unit_price = Decimal('6182237.0000')
>>> purchase_line.health_register = 'COL123evergreen'
>>> purchase.click('quote')
>>> purchase.click('confirm')
>>> purchase.click('create_equipments')
>>> Equipment = Model.get('optical_equipment.equipment')
>>> equipments = Equipment.find()
>>> equipments
[proteus.Model.get('optical_equipment.equipment')(1), proteus.Model.get('optical_equipment.equipment')(2)]
>>> len(equipments)
2
>>> purchase.equipment_create
1
Finalize the purchase inventory movements::
>>> for move in purchase.moves:
... move.click('do')
Registred equipment without serial::
>>> equipment_1 = equipments[0]
>>> equipment_2 = equipments[1]
>>> equipment_1.click('registred') # doctest: +IGNORE_EXCEPTION_DETAIL
Traceback (most recent call last):
...
UserError: ...
>>> equipment_1.serial = "2020DM-0021167"
>>> equipment_1.click('registred')
>>> equipment_2.serial = "2020DM-002119"
>>> equipment_2.click('registred')
First sale::
>>> Sale = Model.get('sale.sale')
>>> SaleLine = Model.get('sale.line')
>>> sale = Sale()
>>> sale.party = customer_optica
>>> sale.contact = local_phone
>>> sale.description = 'El producto se debe entregar el fin de semana'
>>> sale.sale_date = today
>>> sale.sale_type = 'equipments'
>>> sale.payment_term = payment_term
>>> sale.invoice_method = 'order'
>>> sale_line = SaleLine()
>>> sale.lines.append(sale_line)
>>> sale_line.product = product
>>> sale_line.quantity = 2.0
>>> sale_line = SaleLine()
>>> sale.lines.append(sale_line)
>>> sale_line.type = 'comment'
>>> sale_line.description = 'Comment'
>>> sale_line = SaleLine()
>>> sale.lines.append(sale_line)
>>> sale_line.product = product
>>> sale_line.quantity = 3.0
>>> sale.click('quote')
>>> SaleConfirmDate = sale.click('confirm')
>>> SaleConfirmDate.form.sale_date == today
True
>>> SaleConfirmDate.execute('confirm_date')
>>> sale.state
'processing'
>>> sale.shipments
[proteus.Model.get('stock.shipment.out')(1)]
Duplicate Sale::
>>> sale.duplicate()
[proteus.Model.get('sale.sale')(2)]
Return Sale::
>>> SaleReturn = Wizard('sale.return_sale', [sale])
>>> SaleReturn.execute('return_')
Verify that the sale state could be returned to the draft state::
>>> sale.click("draft")
>>> sale.state
'draft'
>>> sale_line = SaleLine()
>>> sale.lines.append(sale_line)
>>> sale_line.product = product
>>> sale_line.quantity = 2.0
>>> sale.click('quote')
>>> SaleConfirmDate = sale.click('confirm')
>>> SaleConfirmDate.execute('confirm_date')
>>> sale.shipments
[proteus.Model.get('stock.shipment.out')(1), proteus.Model.get('stock.shipment.out')(2)]
Verify that the shipment cannot be assigned if the shipment lines do not have equipment::
>>> shipment_one = sale.shipments[0]
>>> shipment_one.click('pick') # doctest: +IGNORE_EXCEPTION_DETAIL
Traceback (most recent call last):
...
ValidationError: ...
Restrict assignment when the shipment has no serialized items::
>>> shipment_one = sale.shipments[0]
>>> line_one = shipment_one.inventory_moves[0]
>>> line_one.equipment = equipment_1
>>> line_one.equipment_serial
'2020DM-0021167'
>>> line_two = shipment_one.inventory_moves[1]
>>> line_two.equipment = equipment_2
>>> line_two.equipment_serial
'2020DM-002119'
>>> shipment_one.click('assign_try')
>>> shipment_one.click('pick')
>>> shipment_one.click('pack')
>>> shipment_one.click('done')
Create a new Maintenance Service::
>>> shipment_one.click('maintenance_initial')
>>> MantenanceServices = Model.get("optical_equipment_maintenance.service")
>>> mantenanceServices, = MantenanceServices.find()
>>> mantenanceServices
proteus.Model.get('optical_equipment_maintenance.service')(1)
>>> mantenanceServices.state
'draft'
>>> MaintenanceLines = Model.get("optical_equipment.maintenance")
>>> maintenanceLines = MaintenanceLines.find()
>>> maintenanceLines
[proteus.Model.get('optical_equipment.maintenance')(1), proteus.Model.get('optical_equipment.maintenance')(2)]
>>> maintenanceLines[0].state
'draft'
>>> maintenance_1 = maintenanceLines[0]
>>> maintenance_2 = maintenanceLines[1]
>>> maintenance_1.equipment.state
'uncontrated'
>>> maintenance_1.equipment.propietary == customer_optica
True
>>> maintenance_1.equipment.propietary_address.street
>>> maintenance_2.equipment.state
'uncontrated'
>>> maintenance_2.equipment.propietary == customer_optica
True
>>> maintenance_2.equipment.propietary_address.street
Assing schedule to maintenance service::
>>> AssingSchedule = Wizard('optical_equipment_maintenance.assing_agended', [mantenanceServices])
>>> AssingSchedule.form.estimated_agended = datetime.datetime.now()
>>> AssingSchedule.form.technical = employee
>>> AssingSchedule.execute('assing_agended')
>>> mantenanceServices.state
'agended'
>>> mantenanceServices.click('in_progress')
>>> mantenanceServices.state
'in_progress'
>>> mantenanceServices.lines
[proteus.Model.get('optical_equipment.maintenance')(1), proteus.Model.get('optical_equipment.maintenance')(2)]
Calibrate Maintenance Lines::
>>> mantenance_lines = mantenanceServices.lines
>>> mantenance_line_one = mantenance_lines[0]
>>> mantenance_line_two = mantenance_lines[1]
>>> mantenance_line_one.click('samples')
>>> len(mantenance_line_one.lines_calibration)
5
>>> mantenance_line_one.click('calibrate')
>>> mantenance_line_one.calibration_total
[proteus.Model.get('optical_equipment.maintenance.calibration')(1)]
>>> len(mantenance_line_one.graph_calibration)
14857
>>> mantenance_line_one.click('finished')
>>> mantenance_line_one.state
'finished'
Finished Maintenance Service::
>>> mantenanceServices.click('finished') # doctest: +IGNORE_EXCEPTION_DETAIL
Traceback (most recent call last):
...
ValidationError: ...
>>> mantenance_line_two.click('samples')
>>> len(mantenance_line_two.lines_calibration)
5
>>> mantenance_line_two.click('calibrate')
>>> mantenance_line_two.calibration_total
[proteus.Model.get('optical_equipment.maintenance.calibration')(2)]
>>> len(mantenance_line_two.graph_calibration)
14857
>>> mantenance_line_two.click('finished')
>>> mantenanceServices.click('finished')
>>> mantenanceServices.state
'finished'
Create a New Contract::
Sale Maintenance Service::
>>> sale2 = Sale()
>>> sale2.party = customer_optica
>>> sale2.contact = local_phone
>>> sale2.description = 'El producto se debe entregar el fin de semana'
>>> sale2.sale_date = today
>>> sale2.sale_type = 'maintenance'
>>> sale2.maintenance_type = 'corrective'
>>> sale2.payment_term = payment_term
>>> sale2.invoice_method = 'order'
>>> sale_line = SaleLine()
>>> sale2.lines.append(sale_line)
>>> sale_line.product = product1
>>> sale_line.quantity = 1.0
>>> sale2.click('quote')
>>> SaleConfirmDate = sale2.click('confirm')
>>> SaleConfirmDate.form.sale_date == today
True
>>> SaleConfirmDate.execute('confirm_date')
>>> sale2.state
'processing'
>>> sale2.shipments
[]

8
tests/test_scenario.py Normal file
View File

@@ -0,0 +1,8 @@
# This file is part of Tryton. The COPYRIGHT file at the top level of
# this repository contains the full copyright notices and license terms.
from trytond.tests.test_tryton import load_doc_tests
def load_tests(*args, **kwargs):
return load_doc_tests(__name__, __file__, *args, **kwargs)

View File

@@ -1,5 +1,5 @@
[tryton] [tryton]
version=6.8.0 version=7.0.0
depends: depends:
ir ir
company company
@@ -27,4 +27,5 @@ xml:
purchase.xml purchase.xml
sale.xml sale.xml
balance_sale_party.xml balance_sale_party.xml
shipment.xml shipment.xml
messages.xml

View File

@@ -2,7 +2,7 @@
<!-- 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. -->
<data> <data>
<xpath expr="//field[@name='street']" position="replace"> <!-- <xpath expr="//field[@name='street']" position="replace"> -->
<field name="street" expand="1"/> <!-- <field name="street" expand="1"/> -->
</xpath> <!-- </xpath> -->
</data> </data>

View File

@@ -0,0 +1,35 @@
<?xml version="1.0"?>
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
this repository contains the full copyright notices and license terms. -->
<form>
<label name="diopter"/>
<field name="diopter"/>
<label name="dev_std"/>
<field name="dev_std"/>
<label name="uncertain_type_A"/>
<field name="uncertain_type_A"/>
<label name="uncertain_pattern"/>
<field name="uncertain_pattern"/>
<label name="k_c_calibration"/>
<field name="k_c_calibration"/>
<label name="uncertain_U_b1"/>
<field name="uncertain_U_b1"/>
<label name="d_resolution"/>
<field name="d_resolution"/>
<label name="uncertain_U_b2_dig"/>
<field name="uncertain_U_b2_dig"/>
<label name="uncertain_U_b2_ana"/>
<field name="uncertain_U_b2_ana"/>
<label name="uncertain_combinated"/>
<field name="uncertain_combinated"/>
<label name="uncertain_eff"/>
<field name="uncertain_eff"/>
<label name="t_student"/>
<field name="t_student"/>
<label name="uncertain_expanded"/>
<field name="uncertain_expanded"/>
<label name="graph_dates"/>
<field name="graph_dates"/>
<label name="state"/>
<field name="state"/>
</form>

View File

@@ -33,8 +33,8 @@ this repository contains the full copyright notices and license terms. -->
<field name="history_equipments"/> <field name="history_equipments"/>
</page> </page>
<page string="Other Info" id="other"> <page string="Other Info" id="other">
<label name="company"/> <!-- <label name="company"/> -->
<field name="company"/> <!-- <field name="company"/> -->
</page> </page>
</notebook> </notebook>
<label name="price_contract"/> <label name="price_contract"/>

View File

@@ -1,9 +1,11 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<!-- 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. -->
<data> <form>
<xpath expr="/form/field[@name='maintenance_type']" position="after"> <!-- <xpath expr="/form/field[@name='maintenance_type']" position="after"> -->
<label name="equipment"/> <!-- <label name="equipment"/> -->
<field name="equipment"/> <!-- <field name="equipment"/> -->
</xpath> <!-- </xpath> -->
</data> <label name="equipment"/>
<field name="equipment"/>
</form>

View File

@@ -65,7 +65,7 @@
<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" view_ids="optical_equipment.calibration_total_view_tree,optical_equipment.calibration_total_view_form"/>
</group> </group>
</page> </page>
<page string="Graph" id="graph"> <page string="Graph" id="graph">

View File

@@ -0,0 +1,8 @@
<?xml version="1.0"?>
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
this repository contains the full copyright notices and license terms. -->
<data>
<xpath expr="//field[@name='name']" position="after">
<field name="attributes_name" expand="1"/>
</xpath>
</data>

View File

@@ -8,7 +8,7 @@
<xpath expr="//field[@name='number']" position="replace"> <xpath expr="//field[@name='number']" position="replace">
<field name="number"/> <field name="number"/>
</xpath> </xpath>
<xpath expr="//field[@name='untaxed_amount']" position="after"> <!-- <xpath expr="//field[@name='untaxed_amount']" position="after"> -->
<field name="residual_amount"/> <!-- <field name="residual_amount"/> -->
</xpath> <!-- </xpath> -->
</data> </data>

View File

@@ -2,13 +2,12 @@
<!-- 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. -->
<data> <data>
<xpath expr="/form/notebook/page[@id='general']/group[@id='checkboxes']" position="inside"> <xpath expr="/form/notebook/page[@id='general']/group[@id='checkboxes']"
<newline/> position="inside">
<label name="equipment"/> <label name="equipment"/>
<field name="equipment"/> <field name="equipment"/>
<label name="replacement"/> <label name="replacement"/>
<field name="replacement"/> <field name="replacement"/>
<newline/>
<label name="maintenance_activity"/> <label name="maintenance_activity"/>
<field name="maintenance_activity"/> <field name="maintenance_activity"/>
</xpath> </xpath>
@@ -113,7 +112,7 @@ this repository contains the full copyright notices and license terms. -->
<field name="check_calibration"/> <field name="check_calibration"/>
<newline/> <newline/>
<separator name="preventive" colspan="4"/> <separator name="preventive_activities" colspan="4"/>
<label name="preventive_activities"/> <label name="preventive_activities"/>
<field name="preventive_activities" colspan="3"/> <field name="preventive_activities" colspan="3"/>
@@ -121,11 +120,11 @@ this repository contains the full copyright notices and license terms. -->
</xpath> </xpath>
<xpath expr="/form/notebook/page[@id='measurements']/label[@name='length']" position="before"> <xpath expr="/form/notebook/page[@id='measurements']/label[@name='length']" position="before">
<newline/> <newline/>
<separator id="measurements_equipment" string="Measurements of Equipment" colspan="4"/> <separator id="measurements_equipment" string="Measurements of Equipment" colspan="4"/>
</xpath> </xpath>
<xpath <xpath
expr="/form/notebook/page[@id='measurements']" position="inside"> expr="/form/notebook/page[@id='measurements']" position="inside">
<separator id="enviromental_working_conditions" string="Enviromental Working Conditions" colspan="4"/> <separator id="enviromental_working_conditions" string="Enviromental Working Conditions" colspan="4"/>
<label name="temperature_min"/> <label name="temperature_min"/>
<field name="temperature_min"/> <field name="temperature_min"/>
<newline/> <newline/>
@@ -140,7 +139,7 @@ this repository contains the full copyright notices and license terms. -->
<field name="moisture_max"/> <field name="moisture_max"/>
<field name="moisture_uom"/> <field name="moisture_uom"/>
<separator id="electrical_conditions" string="Electrical Conditions" colspan="4"/> <separator id="electrical_conditions" string="Electrical Conditions" colspan="4"/>
<label name="electrical_equipment"/> <label name="electrical_equipment"/>
<field name="electrical_equipment"/> <field name="electrical_equipment"/>
<newline/> <newline/>
@@ -152,6 +151,6 @@ this repository contains the full copyright notices and license terms. -->
<field name="voltageAC_uom"/> <field name="voltageAC_uom"/>
<label name="voltageDC"/> <label name="voltageDC"/>
<field name="voltageDC"/> <field name="voltageDC"/>
<field name="voltageDC_uom"/> <field name="voltageDC_uom"/>
</xpath> </xpath>
</data> </data>