Update to 5.4
This commit is contained in:
parent
8e16949685
commit
575cd55ea7
|
@ -1,5 +1,5 @@
|
|||
Copyright (C) 2017-2018 Ignacio Parszyk <iparszyk@kalenislims.com>
|
||||
Copyright (C) 2013-2018 Sebastián Marró <smarro@kalenislims.com>
|
||||
Copyright (C) 2017-2020 Ignacio Parszyk <iparszyk@kalenislims.com>
|
||||
Copyright (C) 2013-2020 Sebastián Marró <smarro@kalenislims.com>
|
||||
Copyright (C) 2013-2016 Luis Falcon <falcon@gnu.org>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
# This file is part of lims module for Tryton.
|
||||
# The COPYRIGHT file at the top level of this repository contains
|
||||
# the full copyright notices and license terms.
|
||||
import sys
|
||||
import logging
|
||||
import operator
|
||||
from datetime import datetime
|
||||
|
@ -176,7 +177,7 @@ class Typification(ModelSQL, ModelView):
|
|||
def search_views_field(cls, name, clause):
|
||||
return [(name[:-5],) + tuple(clause[1:])]
|
||||
|
||||
@fields.depends('analysis')
|
||||
@fields.depends('analysis', '_parent_analysis.state')
|
||||
def on_change_with_valid_readonly(self, name=None):
|
||||
if self.analysis and self.analysis.state == 'disabled':
|
||||
return True
|
||||
|
@ -191,7 +192,7 @@ class Typification(ModelSQL, ModelView):
|
|||
method = methods[0]
|
||||
self.method = method
|
||||
|
||||
@fields.depends('analysis')
|
||||
@fields.depends('analysis', '_parent_analysis.methods')
|
||||
def on_change_with_method_domain(self, name=None):
|
||||
methods = []
|
||||
if self.analysis and self.analysis.methods:
|
||||
|
@ -1491,7 +1492,6 @@ class Analysis(Workflow, ModelSQL, ModelView):
|
|||
class AnalysisIncluded(ModelSQL, ModelView):
|
||||
'Included Analysis'
|
||||
__name__ = 'lims.analysis.included'
|
||||
_rec_name = 'included_analysis'
|
||||
|
||||
analysis = fields.Many2One('lims.analysis', 'Analysis', required=True,
|
||||
ondelete='CASCADE', select=True)
|
||||
|
@ -1560,7 +1560,7 @@ class AnalysisIncluded(ModelSQL, ModelView):
|
|||
laboratory = laboratories[0]
|
||||
self.laboratory = laboratory
|
||||
|
||||
@fields.depends('included_analysis')
|
||||
@fields.depends('included_analysis', '_parent_included_analysis.type')
|
||||
def on_change_with_analysis_type(self, name=None):
|
||||
res = ''
|
||||
if self.included_analysis:
|
||||
|
@ -1873,7 +1873,6 @@ class AnalysisIncluded(ModelSQL, ModelView):
|
|||
class AnalysisLaboratory(ModelSQL, ModelView):
|
||||
'Analysis - Laboratory'
|
||||
__name__ = 'lims.analysis-laboratory'
|
||||
_rec_name = 'laboratory'
|
||||
|
||||
analysis = fields.Many2One('lims.analysis', 'Analysis',
|
||||
ondelete='CASCADE', select=True, required=True)
|
||||
|
@ -1915,12 +1914,11 @@ class AnalysisLabMethod(ModelSQL):
|
|||
class AnalysisDevice(DeactivableMixin, ModelSQL, ModelView):
|
||||
'Analysis Device'
|
||||
__name__ = 'lims.analysis.device'
|
||||
_rec_name = 'device'
|
||||
|
||||
analysis = fields.Many2One('lims.analysis', 'Analysis', required=True,
|
||||
ondelete='CASCADE', select=True)
|
||||
laboratory = fields.Many2One('lims.laboratory', 'Laboratory',
|
||||
required=True, depends=['_parent_analysis.laboratory_domain'],
|
||||
required=True, depends=['analysis'],
|
||||
domain=[('id', 'in', Eval('_parent_analysis',
|
||||
{}).get('laboratory_domain', [Eval('laboratory')]))])
|
||||
device = fields.Many2One('lims.lab.device', 'Device', required=True,
|
||||
|
@ -2264,11 +2262,14 @@ class CreateAnalysisProduct(Wizard):
|
|||
template.type = 'service'
|
||||
template.list_price = Decimal('1.0')
|
||||
template.cost_price = Decimal('1.0')
|
||||
template.salable = True
|
||||
try:
|
||||
template.salable = True
|
||||
template.sale_uom = uom
|
||||
template.accounts_category = True
|
||||
template.account_category = config_.analysis_product_category.id
|
||||
except AttributeError:
|
||||
pass
|
||||
template.default_uom = uom
|
||||
template.sale_uom = uom
|
||||
template.account_category = config_.analysis_product_category.id
|
||||
template.accounts_category = True
|
||||
|
||||
template.save()
|
||||
|
||||
|
|
|
@ -265,17 +265,14 @@ class Entry(Workflow, ModelSQL, ModelView):
|
|||
for c in self.party.addresses:
|
||||
if (c.report_contact_default and c not
|
||||
in a_report_contacts):
|
||||
value = ReportContacts(**ReportContacts.default_get(
|
||||
list(ReportContacts._fields.keys())))
|
||||
value.contact = c
|
||||
report_contacts.append(value)
|
||||
report_contact = ReportContacts()
|
||||
report_contact.contact = c
|
||||
report_contacts.append(report_contact)
|
||||
if (c.acknowledgment_contact_default and c not
|
||||
in a_acknowledgment_contacts):
|
||||
value = AcknowledgmentContacts(
|
||||
**AcknowledgmentContacts.default_get(
|
||||
list(AcknowledgmentContacts._fields.keys())))
|
||||
value.contact = c
|
||||
acknowledgment_contacts.append(value)
|
||||
acknowledgment_contact = AcknowledgmentContacts()
|
||||
acknowledgment_contact.contact = c
|
||||
acknowledgment_contacts.append(acknowledgment_contact)
|
||||
|
||||
self.email_report = email
|
||||
self.single_sending_report = single_sending
|
||||
|
@ -325,16 +322,15 @@ class Entry(Workflow, ModelSQL, ModelView):
|
|||
for c in self.invoice_party.addresses:
|
||||
if (c.invoice_contact_default and c not
|
||||
in a_invoice_contacts):
|
||||
value = InvoiceContacts(**InvoiceContacts.default_get(
|
||||
list(InvoiceContacts._fields.keys())))
|
||||
value.contact = c
|
||||
invoice_contacts.append(value)
|
||||
invoice_contact = InvoiceContacts()
|
||||
invoice_contact.contact = c
|
||||
invoice_contacts.append(invoice_contact)
|
||||
|
||||
self.invoice_contacts = invoice_contacts
|
||||
self.report_contacts = report_contacts
|
||||
self.acknowledgment_contacts = acknowledgment_contacts
|
||||
|
||||
@fields.depends('party')
|
||||
@fields.depends('party', '_parent_party.relations')
|
||||
def on_change_with_invoice_party_domain(self, name=None):
|
||||
Config = Pool().get('lims.configuration')
|
||||
|
||||
|
@ -961,7 +957,7 @@ class EntryDetailAnalysis(ModelSQL, ModelView):
|
|||
return Transaction().context.get('service')
|
||||
return None
|
||||
|
||||
@fields.depends('service')
|
||||
@fields.depends('service', '_parent_service.id')
|
||||
def on_change_with_service_view(self, name=None):
|
||||
if self.service:
|
||||
return self.service.id
|
||||
|
@ -999,7 +995,7 @@ class EntryDetailAnalysis(ModelSQL, ModelView):
|
|||
def default_report():
|
||||
return True
|
||||
|
||||
@fields.depends('analysis')
|
||||
@fields.depends('analysis', '_parent_analysis.type')
|
||||
def on_change_with_analysis_type(self, name=None):
|
||||
if self.analysis:
|
||||
return self.analysis.type
|
||||
|
|
|
@ -13,7 +13,3 @@ msgstr "Direcciones y contactos"
|
|||
msgctxt "model:ir.ui.menu,name:party.menu_address_form"
|
||||
msgid "Addresses"
|
||||
msgstr "Direcciones y contactos"
|
||||
|
||||
msgctxt "view:party.address:party."
|
||||
msgid "Addresses"
|
||||
msgstr "Direcciones y contactos"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0"?>
|
||||
<tryton>
|
||||
<data group="1">
|
||||
<data grouped="1">
|
||||
<record model="ir.message" id="msg_limits">
|
||||
<field name="text">Quantification limit must be greater than Detection limit</field>
|
||||
</record>
|
||||
|
|
|
@ -827,7 +827,8 @@ class NotebookLine(ModelSQL, ModelView):
|
|||
clause[2:3])
|
||||
return [('id', 'in', [x[0] for x in cursor.fetchall()])]
|
||||
|
||||
@fields.depends('method', 'party')
|
||||
@fields.depends('method', 'party',
|
||||
'_parent_method.results_estimated_waiting')
|
||||
def on_change_with_results_estimated_waiting(self, name=None):
|
||||
LabMethodWaitingTime = Pool().get('lims.lab.method.results_waiting')
|
||||
if self.method:
|
||||
|
@ -864,7 +865,7 @@ class NotebookLine(ModelSQL, ModelView):
|
|||
relativedelta(days=estimated_waiting))
|
||||
return date
|
||||
|
||||
@fields.depends('analysis')
|
||||
@fields.depends('analysis', '_parent_analysis.methods')
|
||||
def on_change_with_method_domain(self, name=None):
|
||||
methods = []
|
||||
if self.analysis and self.analysis.methods:
|
||||
|
@ -2559,7 +2560,7 @@ class NotebookLoadResultsFormulaProcess(ModelView):
|
|||
comments = fields.Text('Comments')
|
||||
comments_copy = fields.Boolean('Field copy')
|
||||
|
||||
@fields.depends('formula', 'variables')
|
||||
@fields.depends('formula', 'variables', '_parent_formula.formula')
|
||||
def on_change_with_result(self, name=None):
|
||||
if not self.formula or not self.variables:
|
||||
return None
|
||||
|
@ -2576,7 +2577,7 @@ class NotebookLoadResultsFormulaProcess(ModelView):
|
|||
|
||||
return str(value)
|
||||
|
||||
@fields.depends('formula')
|
||||
@fields.depends('formula', '_parent_formula.formula')
|
||||
def on_change_with_formula_formula(self, name=None):
|
||||
if self.formula:
|
||||
formula = self.formula.formula
|
||||
|
|
|
@ -172,7 +172,8 @@ class Planification(Workflow, ModelSQL, ModelView):
|
|||
def default_laboratory():
|
||||
return Transaction().context.get('laboratory', None)
|
||||
|
||||
@fields.depends('laboratory', 'state')
|
||||
@fields.depends('laboratory', 'state',
|
||||
methods=['_get_analysis_domain'])
|
||||
def on_change_with_analysis_domain(self, name=None):
|
||||
if not self.laboratory or self.state != 'draft':
|
||||
return []
|
||||
|
@ -838,7 +839,7 @@ class FractionReagent(ModelSQL, ModelView):
|
|||
def get_reagent_domain(self, name=None):
|
||||
return self.default_reagent_domain()
|
||||
|
||||
@fields.depends('product')
|
||||
@fields.depends('product', '_parent_product.quantity')
|
||||
def on_change_with_quantity(self, name=None):
|
||||
pool = Pool()
|
||||
Location = pool.get('stock.location')
|
||||
|
@ -853,7 +854,7 @@ class FractionReagent(ModelSQL, ModelView):
|
|||
product = Product(self.product.id)
|
||||
return product.quantity or 0
|
||||
|
||||
@fields.depends('product')
|
||||
@fields.depends('product', '_parent_product.default_uom')
|
||||
def on_change_with_default_uom(self, name=None):
|
||||
if self.product:
|
||||
return self.product.default_uom.id
|
||||
|
@ -1700,7 +1701,7 @@ class AddFractionControlStart(ModelView):
|
|||
generate_repetition = fields.Boolean('Generate repetition',
|
||||
states={'readonly': Eval('type') == 'exist'}, depends=['type'])
|
||||
|
||||
@fields.depends('planification', 'type')
|
||||
@fields.depends('planification', 'type', '_parent_planification.analysis')
|
||||
def on_change_with_fraction_domain(self, name=None):
|
||||
cursor = Transaction().connection.cursor()
|
||||
pool = Pool()
|
||||
|
@ -1748,7 +1749,9 @@ class AddFractionControlStart(ModelView):
|
|||
'WHERE nl.id IN (' + notebook_lines_ids + ')')
|
||||
return [x[0] for x in cursor.fetchall()]
|
||||
|
||||
@fields.depends('type', 'original_fraction', 'concentration_level')
|
||||
@fields.depends('type', 'original_fraction', 'concentration_level',
|
||||
'_parent_original_fraction.label',
|
||||
'_parent_concentration_level.description')
|
||||
def on_change_with_label(self, name=None):
|
||||
Date = Pool().get('ir.date')
|
||||
if self.type == 'exist':
|
||||
|
@ -2121,7 +2124,8 @@ class AddFractionRMBMZStart(ModelView):
|
|||
return False
|
||||
return True
|
||||
|
||||
@fields.depends('planification', 'type', 'rm_bmz_type')
|
||||
@fields.depends('planification', 'type', 'rm_bmz_type',
|
||||
'_parent_planification.analysis')
|
||||
def on_change_with_fraction_domain(self, name=None):
|
||||
cursor = Transaction().connection.cursor()
|
||||
pool = Pool()
|
||||
|
@ -2209,7 +2213,9 @@ class AddFractionRMBMZStart(ModelView):
|
|||
return [x[0] for x in cursor.fetchall()]
|
||||
|
||||
@fields.depends('type', 'rm_bmz_type', 'reference_fraction',
|
||||
'product_type', 'matrix', 'concentration_level')
|
||||
'product_type', 'matrix', 'concentration_level',
|
||||
'_parent_reference_fraction.label',
|
||||
'_parent_concentration_level.description')
|
||||
def on_change_with_label(self, name=None):
|
||||
Date = Pool().get('ir.date')
|
||||
if self.rm_bmz_type == 'exist':
|
||||
|
@ -2758,7 +2764,7 @@ class AddFractionBREStart(ModelView):
|
|||
concentration_level_invisible = fields.Boolean(
|
||||
'Concentration level invisible')
|
||||
|
||||
@fields.depends('planification', 'type')
|
||||
@fields.depends('planification', 'type', '_parent_planification.analysis')
|
||||
def on_change_with_fraction_domain(self, name=None):
|
||||
pool = Pool()
|
||||
Analysis = pool.get('lims.analysis')
|
||||
|
@ -3115,7 +3121,7 @@ class AddFractionMRTStart(ModelView):
|
|||
concentration_level_invisible = fields.Boolean(
|
||||
'Concentration level invisible')
|
||||
|
||||
@fields.depends('planification', 'type')
|
||||
@fields.depends('planification', 'type', '_parent_planification.analysis')
|
||||
def on_change_with_fraction_domain(self, name=None):
|
||||
pool = Pool()
|
||||
Analysis = pool.get('lims.analysis')
|
||||
|
@ -4357,7 +4363,8 @@ class CreateFractionControlStart(ModelView):
|
|||
(self.product_type.id,))
|
||||
return [x[0] for x in cursor.fetchall()]
|
||||
|
||||
@fields.depends('type', 'product_type', 'matrix')
|
||||
@fields.depends('type', 'product_type', 'matrix',
|
||||
'_parent_product_type.code', '_parent_matrix.code')
|
||||
def on_change_with_label(self, name=None):
|
||||
label = ''
|
||||
if self.type == 'coi':
|
||||
|
@ -5285,7 +5292,8 @@ class ReplaceTechnicianStart(ModelView):
|
|||
'lims.laboratory.professional', None, 'Substitute domain'),
|
||||
'on_change_with_substitute_domain')
|
||||
|
||||
@fields.depends('technician_replaced', 'planification')
|
||||
@fields.depends('technician_replaced', 'planification',
|
||||
'_parent_planification.laboratory')
|
||||
def on_change_with_substitute_domain(self, name=None):
|
||||
pool = Pool()
|
||||
UserLaboratory = pool.get('lims.user-laboratory')
|
||||
|
|
|
@ -1221,19 +1221,19 @@ class GenerateResultsReportResultMan(ModelView):
|
|||
reports_details = fields.One2Many('lims.results_report.version.detail',
|
||||
None, 'Reports details')
|
||||
|
||||
@fields.depends('report')
|
||||
@fields.depends('report', '_parent_report.party')
|
||||
def on_change_with_party(self, name=None):
|
||||
if self.report:
|
||||
return self.report.party.id
|
||||
return None
|
||||
|
||||
@fields.depends('report')
|
||||
@fields.depends('report', '_parent_report.notebook')
|
||||
def on_change_with_notebook(self, name=None):
|
||||
if self.report and self.report.notebook:
|
||||
return self.report.notebook.id
|
||||
return None
|
||||
|
||||
@fields.depends('report')
|
||||
@fields.depends('report', '_parent_report.report_grouper')
|
||||
def on_change_with_report_grouper(self, name=None):
|
||||
if self.report:
|
||||
return self.report.report_grouper
|
||||
|
@ -1257,7 +1257,7 @@ class GenerateResultsReportResultMan(ModelView):
|
|||
return version[0].report_type
|
||||
return None
|
||||
|
||||
@fields.depends('report')
|
||||
@fields.depends('report', '_parent_report.cie_fraction_type')
|
||||
def on_change_with_cie_fraction_type(self, name=None):
|
||||
if self.report:
|
||||
with Transaction().set_context(_check_access=False):
|
||||
|
|
|
@ -809,7 +809,9 @@ class Service(ModelSQL, ModelView):
|
|||
})
|
||||
|
||||
@fields.depends('analysis', 'fraction', 'typification_domain',
|
||||
'laboratory')
|
||||
'laboratory', '_parent_fraction.id',
|
||||
methods=['on_change_with_laboratory_domain',
|
||||
'on_change_with_method_domain', '_on_change_with_device_domain'])
|
||||
def on_change_analysis(self):
|
||||
Laboratory = Pool().get('lims.laboratory')
|
||||
laboratory = None
|
||||
|
@ -834,7 +836,7 @@ class Service(ModelSQL, ModelView):
|
|||
def default_analysis_domain():
|
||||
return Transaction().context.get('analysis_domain', [])
|
||||
|
||||
@fields.depends('fraction')
|
||||
@fields.depends('fraction', '_parent_fraction.id')
|
||||
def on_change_with_analysis_domain(self, name=None):
|
||||
if Transaction().context.get('analysis_domain'):
|
||||
return Transaction().context.get('analysis_domain')
|
||||
|
@ -844,13 +846,13 @@ class Service(ModelSQL, ModelView):
|
|||
def default_typification_domain():
|
||||
return Transaction().context.get('typification_domain', [])
|
||||
|
||||
@fields.depends('fraction')
|
||||
@fields.depends('fraction', '_parent_fraction.id')
|
||||
def on_change_with_typification_domain(self, name=None):
|
||||
if Transaction().context.get('typification_domain'):
|
||||
return Transaction().context.get('typification_domain')
|
||||
return []
|
||||
|
||||
@fields.depends('analysis')
|
||||
@fields.depends('analysis', '_parent_analysis.type')
|
||||
def on_change_with_analysis_type(self, name=None):
|
||||
if self.analysis:
|
||||
return self.analysis.type
|
||||
|
@ -862,7 +864,7 @@ class Service(ModelSQL, ModelView):
|
|||
return Transaction().context.get('fraction')
|
||||
return None
|
||||
|
||||
@fields.depends('fraction')
|
||||
@fields.depends('fraction', '_parent_fraction.id')
|
||||
def on_change_with_fraction_view(self, name=None):
|
||||
if self.fraction:
|
||||
return self.fraction.id
|
||||
|
@ -874,7 +876,7 @@ class Service(ModelSQL, ModelView):
|
|||
return Transaction().context.get('sample')
|
||||
return None
|
||||
|
||||
@fields.depends('fraction')
|
||||
@fields.depends('fraction', '_parent_fraction.sample')
|
||||
def on_change_with_sample(self, name=None):
|
||||
if self.fraction:
|
||||
result = self.get_fraction_field((self,), ('sample',))
|
||||
|
@ -887,7 +889,7 @@ class Service(ModelSQL, ModelView):
|
|||
return Transaction().context.get('entry')
|
||||
return None
|
||||
|
||||
@fields.depends('fraction')
|
||||
@fields.depends('fraction', '_parent_fraction.entry')
|
||||
def on_change_with_entry(self, name=None):
|
||||
if self.fraction:
|
||||
result = self.get_fraction_field((self,), ('entry',))
|
||||
|
@ -900,14 +902,15 @@ class Service(ModelSQL, ModelView):
|
|||
return Transaction().context.get('party')
|
||||
return None
|
||||
|
||||
@fields.depends('fraction')
|
||||
@fields.depends('fraction', '_parent_fraction.party')
|
||||
def on_change_with_party(self, name=None):
|
||||
if self.fraction:
|
||||
result = self.get_fraction_field((self,), ('party',))
|
||||
return result['party'][self.id]
|
||||
return None
|
||||
|
||||
@fields.depends('analysis', 'laboratory')
|
||||
@fields.depends('analysis', 'laboratory',
|
||||
methods=['_on_change_with_device_domain'])
|
||||
def on_change_laboratory(self):
|
||||
device = None
|
||||
if self.analysis and self.laboratory:
|
||||
|
@ -956,7 +959,8 @@ class Service(ModelSQL, ModelView):
|
|||
return []
|
||||
return [x[0] for x in res]
|
||||
|
||||
@fields.depends('analysis', 'laboratory')
|
||||
@fields.depends('analysis', 'laboratory',
|
||||
methods=['_on_change_with_device_domain'])
|
||||
def on_change_with_device_domain(self, name=None):
|
||||
return self._on_change_with_device_domain(self.analysis,
|
||||
self.laboratory)
|
||||
|
@ -1433,7 +1437,7 @@ class Fraction(ModelSQL, ModelView):
|
|||
def default_analysis_domain():
|
||||
return Transaction().context.get('analysis_domain', [])
|
||||
|
||||
@fields.depends('sample')
|
||||
@fields.depends('sample', '_parent_sample.id')
|
||||
def on_change_with_analysis_domain(self, name=None):
|
||||
if Transaction().context.get('analysis_domain'):
|
||||
return Transaction().context.get('analysis_domain')
|
||||
|
@ -1445,7 +1449,7 @@ class Fraction(ModelSQL, ModelView):
|
|||
def default_typification_domain():
|
||||
return Transaction().context.get('typification_domain', [])
|
||||
|
||||
@fields.depends('sample')
|
||||
@fields.depends('sample', '_parent_sample.id')
|
||||
def on_change_with_typification_domain(self, name=None):
|
||||
if Transaction().context.get('typification_domain'):
|
||||
return Transaction().context.get('typification_domain')
|
||||
|
@ -1457,7 +1461,7 @@ class Fraction(ModelSQL, ModelView):
|
|||
def default_product_type():
|
||||
return Transaction().context.get('product_type', None)
|
||||
|
||||
@fields.depends('sample')
|
||||
@fields.depends('sample', '_parent_sample.product_type')
|
||||
def on_change_with_product_type(self, name=None):
|
||||
if Transaction().context.get('product_type'):
|
||||
return Transaction().context.get('product_type')
|
||||
|
@ -1469,7 +1473,7 @@ class Fraction(ModelSQL, ModelView):
|
|||
def default_matrix():
|
||||
return Transaction().context.get('matrix', None)
|
||||
|
||||
@fields.depends('sample')
|
||||
@fields.depends('sample', '_parent_sample.matrix')
|
||||
def on_change_with_matrix(self, name=None):
|
||||
if Transaction().context.get('matrix'):
|
||||
return Transaction().context.get('matrix')
|
||||
|
@ -1557,7 +1561,7 @@ class Fraction(ModelSQL, ModelView):
|
|||
return [('type', clause[1], res_type)]
|
||||
return []
|
||||
|
||||
@fields.depends('sample')
|
||||
@fields.depends('sample', '_parent_sample.id')
|
||||
def on_change_with_sample_view(self, name=None):
|
||||
if self.sample:
|
||||
return self.sample.id
|
||||
|
@ -1569,7 +1573,7 @@ class Fraction(ModelSQL, ModelView):
|
|||
return Transaction().context.get('entry')
|
||||
return None
|
||||
|
||||
@fields.depends('sample')
|
||||
@fields.depends('sample', '_parent_sample.entry')
|
||||
def on_change_with_entry(self, name=None):
|
||||
if self.sample:
|
||||
result = self.get_sample_field((self,), ('entry',))
|
||||
|
@ -1582,7 +1586,7 @@ class Fraction(ModelSQL, ModelView):
|
|||
return Transaction().context.get('party')
|
||||
return None
|
||||
|
||||
@fields.depends('sample')
|
||||
@fields.depends('sample', '_parent_sample.party')
|
||||
def on_change_with_party(self, name=None):
|
||||
if self.sample:
|
||||
result = self.get_sample_field((self,), ('party',))
|
||||
|
@ -1594,7 +1598,7 @@ class Fraction(ModelSQL, ModelView):
|
|||
return Transaction().context.get('label', '')
|
||||
|
||||
@fields.depends('sample', 'special_type', 'con_original_fraction',
|
||||
'services', 'create_date')
|
||||
'services', 'create_date', '_parent_sample.label')
|
||||
def on_change_with_label(self, name=None):
|
||||
type = self.special_type
|
||||
if type == 'con':
|
||||
|
@ -1651,7 +1655,7 @@ class Fraction(ModelSQL, ModelView):
|
|||
return Transaction().context.get('package_type')
|
||||
return None
|
||||
|
||||
@fields.depends('sample')
|
||||
@fields.depends('sample', '_parent_sample.package_type')
|
||||
def on_change_with_package_type(self, name=None):
|
||||
if self.sample:
|
||||
result = self.get_sample_field((self,), ('package_type',))
|
||||
|
@ -1662,7 +1666,7 @@ class Fraction(ModelSQL, ModelView):
|
|||
def default_size():
|
||||
return Transaction().context.get('size', None)
|
||||
|
||||
@fields.depends('sample')
|
||||
@fields.depends('sample', '_parent_sample.size')
|
||||
def on_change_with_size(self, name=None):
|
||||
if self.sample:
|
||||
result = self.get_sample_field((self,), ('size',))
|
||||
|
@ -1675,7 +1679,7 @@ class Fraction(ModelSQL, ModelView):
|
|||
return Transaction().context.get('size_uom')
|
||||
return None
|
||||
|
||||
@fields.depends('sample')
|
||||
@fields.depends('sample', '_parent_sample.size_uom')
|
||||
def on_change_with_size_uom(self, name=None):
|
||||
if self.sample:
|
||||
result = self.get_sample_field((self,), ('size_uom',))
|
||||
|
@ -1688,7 +1692,7 @@ class Fraction(ModelSQL, ModelView):
|
|||
return Transaction().context.get('fraction_state')
|
||||
return None
|
||||
|
||||
@fields.depends('sample')
|
||||
@fields.depends('sample', '_parent_sample.package_state')
|
||||
def on_change_with_fraction_state(self, name=None):
|
||||
if self.sample:
|
||||
result = self.get_sample_field((self,), ('fraction_state',))
|
||||
|
@ -1734,7 +1738,7 @@ class Fraction(ModelSQL, ModelView):
|
|||
return True
|
||||
return False
|
||||
|
||||
@fields.depends('confirmed', 'type')
|
||||
@fields.depends('confirmed', 'type', '_parent_type.cie_fraction_type')
|
||||
def on_change_with_cie_fraction_type_available(self, name=None):
|
||||
if not self.confirmed and self.type and self.type.cie_fraction_type:
|
||||
return True
|
||||
|
@ -1755,7 +1759,7 @@ class Fraction(ModelSQL, ModelView):
|
|||
def load_services(cls, fractions):
|
||||
pass
|
||||
|
||||
@fields.depends('confirmed', 'sample')
|
||||
@fields.depends('confirmed', 'sample', '_parent_sample.entry')
|
||||
def on_change_with_button_confirm_available(self, name=None):
|
||||
if (not self.confirmed and self.sample and self.sample.entry and
|
||||
(self.sample.entry.state == 'ongoing')):
|
||||
|
@ -2440,7 +2444,9 @@ class Sample(ModelSQL, ModelView):
|
|||
for sample in samples:
|
||||
sample.warn_duplicated_label()
|
||||
|
||||
@fields.depends('product_type', 'matrix', 'zone')
|
||||
@fields.depends('product_type', 'matrix', 'zone',
|
||||
'_parent_product_type.restricted_entry',
|
||||
'_parent_matrix.restricted_entry', '_parent_zone.restricted_entry')
|
||||
def on_change_with_restricted_entry(self, name=None):
|
||||
return (self.product_type and self.product_type.restricted_entry and
|
||||
self.matrix and self.matrix.restricted_entry and
|
||||
|
@ -2596,7 +2602,7 @@ class Sample(ModelSQL, ModelView):
|
|||
return Transaction().context.get('entry')
|
||||
return None
|
||||
|
||||
@fields.depends('entry')
|
||||
@fields.depends('entry', '_parent_entry.id')
|
||||
def on_change_with_entry_view(self, name=None):
|
||||
if self.entry:
|
||||
return self.entry.id
|
||||
|
@ -2617,7 +2623,7 @@ class Sample(ModelSQL, ModelView):
|
|||
if party.entry_zone:
|
||||
return party.entry_zone.id
|
||||
|
||||
@fields.depends('entry')
|
||||
@fields.depends('entry', '_parent_entry.party')
|
||||
def on_change_with_party(self, name=None):
|
||||
if self.entry:
|
||||
result = self.get_entry_field((self,), ('party',))
|
||||
|
@ -2873,7 +2879,7 @@ class DuplicateSampleFromEntryStart(ModelView):
|
|||
date = fields.DateTime('Date', required=True)
|
||||
labels = fields.Text('Labels')
|
||||
|
||||
@fields.depends('sample')
|
||||
@fields.depends('sample', '_parent_sample.date')
|
||||
def on_change_with_date(self, name=None):
|
||||
if self.sample:
|
||||
return self.sample.date
|
||||
|
@ -4623,7 +4629,9 @@ class CreateSampleStart(ModelView):
|
|||
|
||||
return typified_analysis + typified_sets_groups + additional_analysis
|
||||
|
||||
@fields.depends('product_type', 'matrix', 'zone')
|
||||
@fields.depends('product_type', 'matrix', 'zone',
|
||||
'_parent_product_type.restricted_entry',
|
||||
'_parent_matrix.restricted_entry', '_parent_zone.restricted_entry')
|
||||
def on_change_with_restricted_entry(self, name=None):
|
||||
return (self.product_type and self.product_type.restricted_entry and
|
||||
self.matrix and self.matrix.restricted_entry and
|
||||
|
@ -4644,7 +4652,9 @@ class CreateSampleStart(ModelView):
|
|||
self.fraction_type.default_fraction_state):
|
||||
self.fraction_state = self.fraction_type.default_fraction_state
|
||||
|
||||
@fields.depends('fraction_type', 'storage_location')
|
||||
@fields.depends('fraction_type', 'storage_location',
|
||||
'_parent_fraction_type.max_storage_time',
|
||||
'_parent_storage_location.storage_time')
|
||||
def on_change_with_storage_time(self, name=None):
|
||||
if self.fraction_type and self.fraction_type.max_storage_time:
|
||||
return self.fraction_type.max_storage_time
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
[tryton]
|
||||
version=5.2.0
|
||||
version=5.4.0
|
||||
depends:
|
||||
carrier
|
||||
party_relationship
|
||||
|
|
|
@ -1,14 +1,8 @@
|
|||
<?xml version="1.0"?>
|
||||
<data>
|
||||
<xpath
|
||||
expr="/tree/field[@name='shipment']"
|
||||
position="replace">
|
||||
</xpath>
|
||||
<xpath
|
||||
expr="/tree/field[@name='state']"
|
||||
position="after">
|
||||
<field name="fraction"/>
|
||||
<field name="shipment"/>
|
||||
<field name="origin"/>
|
||||
</xpath>
|
||||
</data>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0"?>
|
||||
<data>
|
||||
<xpath
|
||||
expr="/form/group[@id='state_buttons']/group[@id='buttons']/button[@name='draft']"
|
||||
expr="/form/group[@id='buttons']/button[@name='draft']"
|
||||
position="replace">
|
||||
</xpath>
|
||||
</data>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
Copyright (C) 2017-2018 Ignacio Parszyk <iparszyk@kalenislims.com>
|
||||
Copyright (C) 2015-2018 Sebastián Marró <smarro@kalenislims.com>
|
||||
Copyright (C) 2017-2020 Ignacio Parszyk <iparszyk@kalenislims.com>
|
||||
Copyright (C) 2015-2020 Sebastián Marró <smarro@kalenislims.com>
|
||||
Copyright (C) 2015 Bruno M. Villasanti <bvillasanti@thymbra.com>
|
||||
Copyright (C) 2015-2016 Luis Falcon <falcon@gnu.org>
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0"?>
|
||||
<tryton>
|
||||
<data group="1">
|
||||
<data grouped="1">
|
||||
<record model="ir.message" id="msg_not_invoice_contacts">
|
||||
<field name="text">Invoice Contacts field must have a value</field>
|
||||
</record>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
[tryton]
|
||||
version=5.2.0
|
||||
version=5.4.0
|
||||
depends:
|
||||
lims
|
||||
account_invoice
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
Copyright (C) 2019 Ignacio Parszyk <iparszyk@kalenislims.com>
|
||||
Copyright (C) 2019 Sebastián Marró <smarro@kalenislims.com>
|
||||
Copyright (C) 2019-2020 Ignacio Parszyk <iparszyk@kalenislims.com>
|
||||
Copyright (C) 2019-2020 Sebastián Marró <smarro@kalenislims.com>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0"?>
|
||||
<tryton>
|
||||
<data group="1">
|
||||
<data grouped="1">
|
||||
<record model="ir.message" id="msg_delete_task">
|
||||
<field name="text">You can not delete task "%(task)s" because it is not in draft state</field>
|
||||
</record>
|
||||
|
|
|
@ -256,5 +256,32 @@
|
|||
<field name="action" ref="wiz_edit_task"/>
|
||||
</record>
|
||||
|
||||
<!-- Administrative Task Buttons -->
|
||||
|
||||
<record model="ir.model.button" id="administrative_task_pending_button">
|
||||
<field name="name">pending</field>
|
||||
<field name="model" search="[('model', '=', 'lims.administrative.task')]"/>
|
||||
</record>
|
||||
<record model="ir.model.button" id="administrative_task_reject_button">
|
||||
<field name="name">reject</field>
|
||||
<field name="model" search="[('model', '=', 'lims.administrative.task')]"/>
|
||||
</record>
|
||||
<record model="ir.model.button" id="administrative_task_ongoing_button">
|
||||
<field name="name">ongoing</field>
|
||||
<field name="model" search="[('model', '=', 'lims.administrative.task')]"/>
|
||||
</record>
|
||||
<record model="ir.model.button" id="administrative_task_standby_button">
|
||||
<field name="name">standby</field>
|
||||
<field name="model" search="[('model', '=', 'lims.administrative.task')]"/>
|
||||
</record>
|
||||
<record model="ir.model.button" id="administrative_task_discard_button">
|
||||
<field name="name">discard</field>
|
||||
<field name="model" search="[('model', '=', 'lims.administrative.task')]"/>
|
||||
</record>
|
||||
<record model="ir.model.button" id="administrative_task_do_button">
|
||||
<field name="name">do</field>
|
||||
<field name="model" search="[('model', '=', 'lims.administrative.task')]"/>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</tryton>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
[tryton]
|
||||
version=5.2.0
|
||||
version=5.4.0
|
||||
depends:
|
||||
lims
|
||||
xml:
|
||||
|
|
|
@ -32,7 +32,7 @@ class TemplateAnalysisSheet(ModelSQL, ModelView):
|
|||
pending_fractions = fields.Function(fields.Integer('Pending fractions'),
|
||||
'get_pending_fractions')
|
||||
|
||||
@fields.depends('interface')
|
||||
@fields.depends('interface', '_parent_interface.name')
|
||||
def on_change_with_name(self, name=None):
|
||||
if self.interface:
|
||||
return self.interface.name
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0"?>
|
||||
<tryton>
|
||||
<data group="1">
|
||||
<data grouped="1">
|
||||
<record model="ir.message" id="msg_sheet_compilation_unique">
|
||||
<field name="text">Compilation already in use by another Analysis Sheet</field>
|
||||
</record>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
[tryton]
|
||||
version=5.2.0
|
||||
version=5.4.0
|
||||
depends:
|
||||
lims
|
||||
lims_interface
|
||||
|
|
|
@ -16,9 +16,10 @@
|
|||
<label name="samples_qty"/>
|
||||
<field name="samples_qty"/>
|
||||
<label name="completion_percentage"/>
|
||||
<field name="completion_percentage" factor="100">
|
||||
<suffix name="completion_percentage" string="%"/>
|
||||
</field>
|
||||
<group col="2" id="completion_percentage">
|
||||
<field name="completion_percentage" factor="100" xexpand="0"/>
|
||||
<label name="completion_percentage" string="%" xalign="0.0" xexpand="1"/>
|
||||
</group>
|
||||
</group>
|
||||
<label name="compilation"/>
|
||||
<field name="compilation"/>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
Copyright (C) 2017-2018 Ignacio Parszyk <iparszyk@kalenislims.com>
|
||||
Copyright (C) 2015-2018 Sebastián Marró <smarro@kalenislims.com>
|
||||
Copyright (C) 2017-2020 Ignacio Parszyk <iparszyk@kalenislims.com>
|
||||
Copyright (C) 2015-2020 Sebastián Marró <smarro@kalenislims.com>
|
||||
Copyright (C) 2015-2016 Luis Falcon <falcon@gnu.org>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
[tryton]
|
||||
version=5.2.0
|
||||
version=5.4.0
|
||||
depends:
|
||||
lims
|
||||
analytic_account
|
||||
|
|
|
@ -85,6 +85,13 @@
|
|||
<field name="name">lab_device_maintenance_program_list</field>
|
||||
</record>
|
||||
|
||||
<!-- Device Maintenance Program Buttons -->
|
||||
|
||||
<record model="ir.model.button" id="device_maintenance_program_generate_maintenance_button">
|
||||
<field name="name">generate_maintenance</field>
|
||||
<field name="model" search="[('model', '=', 'lims.lab.device.maintenance.program')]"/>
|
||||
</record>
|
||||
|
||||
<!-- Wizard Generate Device Maintenance Calendar -->
|
||||
|
||||
<record model="ir.ui.view"
|
||||
|
@ -137,6 +144,21 @@
|
|||
<field name="method">lims.lab.device.maintenance|send_notice</field>
|
||||
</record>
|
||||
|
||||
<!-- Device Maintenance Buttons -->
|
||||
|
||||
<record model="ir.model.button" id="device_maintenance_pending_button">
|
||||
<field name="name">pending</field>
|
||||
<field name="model" search="[('model', '=', 'lims.lab.device.maintenance')]"/>
|
||||
</record>
|
||||
<record model="ir.model.button" id="device_maintenance_do_button">
|
||||
<field name="name">do</field>
|
||||
<field name="model" search="[('model', '=', 'lims.lab.device.maintenance')]"/>
|
||||
</record>
|
||||
<record model="ir.model.button" id="device_maintenance_discard_button">
|
||||
<field name="name">discard</field>
|
||||
<field name="model" search="[('model', '=', 'lims.lab.device.maintenance')]"/>
|
||||
</record>
|
||||
|
||||
<!-- Device Maintenance Menu -->
|
||||
|
||||
<menuitem name="Devices Maintenance" id="menu_device_maintenance"/>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0"?>
|
||||
<tryton>
|
||||
<data group="1">
|
||||
<data grouped="1">
|
||||
<record model="ir.message" id="lbl_device_maintenance">
|
||||
<field name="text">Device Maintenance</field>
|
||||
</record>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
[tryton]
|
||||
version=5.2.0
|
||||
version=5.4.0
|
||||
depends:
|
||||
lims
|
||||
lims_administrative_task
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
Copyright (C) 2017-2018 Ignacio Parszyk <iparszyk@kalenislims.com>
|
||||
Copyright (C) 2015-2018 Sebastián Marró <smarro@kalenislims.com>
|
||||
Copyright (C) 2017-2020 Ignacio Parszyk <iparszyk@kalenislims.com>
|
||||
Copyright (C) 2015-2020 Sebastián Marró <smarro@kalenislims.com>
|
||||
Copyright (C) 2015 Bruno M. Villasanti <bvillasanti@thymbra.com>
|
||||
Copyright (C) 2015-2016 Luis Falcon <falcon@gnu.org>
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0"?>
|
||||
<tryton>
|
||||
<data group="1">
|
||||
<data grouped="1">
|
||||
<record model="ir.message" id="msg_polisample">
|
||||
<field name="text">Polisample</field>
|
||||
</record>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
[tryton]
|
||||
version=5.2.0
|
||||
version=5.4.0
|
||||
depends:
|
||||
lims
|
||||
xml:
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
Copyright (C) 2019 Ignacio Parszyk <iparszyk@kalenislims.com>
|
||||
Copyright (C) 2019 Sebastián Marró <smarro@kalenislims.com>
|
||||
Copyright (C) 2019-2020 Ignacio Parszyk <iparszyk@kalenislims.com>
|
||||
Copyright (C) 2019-2020 Sebastián Marró <smarro@kalenislims.com>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -207,7 +207,7 @@ class Equipment(ModelSQL, ModelView):
|
|||
res.append(equipment)
|
||||
return res
|
||||
|
||||
@fields.depends('plant')
|
||||
@fields.depends('plant', '_parent_plant.party')
|
||||
def on_change_with_party(self, name=None):
|
||||
return self.get_party([self], name)[self.id]
|
||||
|
||||
|
@ -222,7 +222,7 @@ class Equipment(ModelSQL, ModelView):
|
|||
def search_party(cls, name, clause):
|
||||
return [('plant.party',) + tuple(clause[1:])]
|
||||
|
||||
@fields.depends('template')
|
||||
@fields.depends('template', '_parent_template.brand')
|
||||
def on_change_with_brand(self, name=None):
|
||||
return self.get_brand([self], name)[self.id]
|
||||
|
||||
|
@ -362,7 +362,7 @@ class Component(ModelSQL, ModelView):
|
|||
def search_party(cls, name, clause):
|
||||
return [('equipment.plant.party',) + tuple(clause[1:])]
|
||||
|
||||
@fields.depends('type')
|
||||
@fields.depends('type', '_parent_type.product_type')
|
||||
def on_change_with_product_type(self, name=None):
|
||||
return self.get_product_type([self], name)[self.id]
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0"?>
|
||||
<tryton>
|
||||
<data group="1">
|
||||
<data grouped="1">
|
||||
<record model="ir.message" id="lbl_component_missing_data">
|
||||
<field name="text">Missing data in Component</field>
|
||||
</record>
|
||||
|
|
|
@ -82,7 +82,7 @@ class Sample(metaclass=PoolMeta):
|
|||
if self.comercial_product and self.comercial_product.matrix:
|
||||
self.matrix = self.comercial_product.matrix.id
|
||||
|
||||
@fields.depends('product_type')
|
||||
@fields.depends('product_type', '_parent_product_type.attribute_set')
|
||||
def on_change_with_attributes_domain(self, name=None):
|
||||
pool = Pool()
|
||||
SampleAttributeAttributeSet = pool.get(
|
||||
|
@ -219,7 +219,8 @@ class CreateSampleStart(metaclass=PoolMeta):
|
|||
if self.comercial_product and self.comercial_product.matrix:
|
||||
self.matrix = self.comercial_product.matrix.id
|
||||
|
||||
@fields.depends('product_type', 'component')
|
||||
@fields.depends('product_type', 'component',
|
||||
'_parent_product_type.attribute_set')
|
||||
def on_change_with_attributes_domain(self, name=None):
|
||||
pool = Pool()
|
||||
SampleAttributeAttributeSet = pool.get(
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
[tryton]
|
||||
version=5.2.0
|
||||
version=5.4.0
|
||||
depends:
|
||||
lims
|
||||
lims_administrative_task
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
Copyright (C) 2017-2018 Ignacio Parszyk <iparszyk@kalenislims.com>
|
||||
Copyright (C) 2013-2018 Sebastián Marró <smarro@kalenislims.com>
|
||||
Copyright (C) 2017-2020 Ignacio Parszyk <iparszyk@kalenislims.com>
|
||||
Copyright (C) 2013-2020 Sebastián Marró <smarro@kalenislims.com>
|
||||
Copyright (C) 2013-2016 Luis Falcon <falcon@gnu.org>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0"?>
|
||||
<tryton>
|
||||
<data group="1">
|
||||
<data grouped="1">
|
||||
<record model="ir.message" id="msg_not_module">
|
||||
<field name="text">No module for importer type "%(module)s"</field>
|
||||
</record>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
[tryton]
|
||||
version=5.2.0
|
||||
version=5.4.0
|
||||
depends:
|
||||
lims
|
||||
xml:
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
Copyright (C) 2017-2018 Ignacio Parszyk <iparszyk@kalenislims.com>
|
||||
Copyright (C) 2014-2018 Sebastián Marró <smarro@kalenislims.com>
|
||||
Copyright (C) 2017-2020 Ignacio Parszyk <iparszyk@kalenislims.com>
|
||||
Copyright (C) 2014-2020 Sebastián Marró <smarro@kalenislims.com>
|
||||
Copyright (C) 2014-2016 Luis Falcon <falcon@gnu.org>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
[tryton]
|
||||
version=5.2.0
|
||||
version=5.4.0
|
||||
depends:
|
||||
lims_instrument
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
Copyright (C) 2017-2018 Ignacio Parszyk <iparszyk@kalenislims.com>
|
||||
Copyright (C) 2014-2018 Sebastián Marró <smarro@kalenislims.com>
|
||||
Copyright (C) 2017-2020 Ignacio Parszyk <iparszyk@kalenislims.com>
|
||||
Copyright (C) 2014-2020 Sebastián Marró <smarro@kalenislims.com>
|
||||
Copyright (C) 2014-2016 Luis Falcon <falcon@gnu.org>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
[tryton]
|
||||
version=5.2.0
|
||||
version=5.4.0
|
||||
depends:
|
||||
lims_instrument
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
Copyright (C) 2017-2018 Ignacio Parszyk <iparszyk@kalenislims.com>
|
||||
Copyright (C) 2014-2018 Sebastián Marró <smarro@kalenislims.com>
|
||||
Copyright (C) 2017-2020 Ignacio Parszyk <iparszyk@kalenislims.com>
|
||||
Copyright (C) 2014-2020 Sebastián Marró <smarro@kalenislims.com>
|
||||
Copyright (C) 2014-2016 Luis Falcon <falcon@gnu.org>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
[tryton]
|
||||
version=5.2.0
|
||||
version=5.4.0
|
||||
depends:
|
||||
lims_instrument
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
Copyright (C) 2019 Ignacio Parszyk <iparszyk@kalenislims.com>
|
||||
Copyright (C) 2019 Sebastián Marró <smarro@kalenislims.com>
|
||||
Copyright (C) 2019-2020 Ignacio Parszyk <iparszyk@kalenislims.com>
|
||||
Copyright (C) 2019-2020 Sebastián Marró <smarro@kalenislims.com>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -180,25 +180,25 @@ class Interface(Workflow, ModelSQL, ModelView):
|
|||
domain=[('interface', '=', Eval('id'))],
|
||||
states={
|
||||
'readonly': Eval('state') != 'draft',
|
||||
}, depends=['state'])
|
||||
}, depends=['state', 'id'])
|
||||
fraction_field = fields.Many2One('lims.interface.column',
|
||||
'Fraction field',
|
||||
domain=[('interface', '=', Eval('id'))],
|
||||
states={
|
||||
'readonly': Eval('state') != 'draft',
|
||||
}, depends=['state'])
|
||||
}, depends=['state', 'id'])
|
||||
repetition_field = fields.Many2One('lims.interface.column',
|
||||
'Repetition field',
|
||||
domain=[('interface', '=', Eval('id'))],
|
||||
states={
|
||||
'readonly': Eval('state') != 'draft',
|
||||
}, depends=['state'])
|
||||
}, depends=['state', 'id'])
|
||||
notebook_line_field = fields.Many2One('lims.interface.column',
|
||||
'Notebook line field',
|
||||
domain=[('interface', '=', Eval('id'))],
|
||||
states={
|
||||
'readonly': Eval('state') != 'draft',
|
||||
}, depends=['state'])
|
||||
}, depends=['state', 'id'])
|
||||
charset = fields.Selection([
|
||||
(None, ''),
|
||||
('utf-8', 'UTF-8'),
|
||||
|
@ -465,12 +465,12 @@ class Column(sequence_ordered(), ModelSQL, ModelView):
|
|||
'in an interface.')
|
||||
]
|
||||
|
||||
@fields.depends('name', 'alias',
|
||||
@fields.depends('name', 'alias', 'interface',
|
||||
'_parent_interface.columns', 'evaluation_order')
|
||||
def on_change_name(self):
|
||||
if not self.alias:
|
||||
self.alias = convert_to_symbol(self.name)
|
||||
if not self.evaluation_order:
|
||||
if not self.evaluation_order and self.interface:
|
||||
self.evaluation_order = len(self.interface.columns)
|
||||
|
||||
@fields.depends('interface', '_parent_interface.state')
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
[tryton]
|
||||
version=5.2.0
|
||||
version=5.4.0
|
||||
depends:
|
||||
lims
|
||||
xml:
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
Copyright (C) 2017-2018 Ignacio Parszyk <iparszyk@kalenislims.com>
|
||||
Copyright (C) 2013-2018 Sebastián Marró <smarro@kalenislims.com>
|
||||
Copyright (C) 2017-2020 Ignacio Parszyk <iparszyk@kalenislims.com>
|
||||
Copyright (C) 2013-2020 Sebastián Marró <smarro@kalenislims.com>
|
||||
Copyright (C) 2013-2016 Luis Falcon <falcon@gnu.org>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0"?>
|
||||
<tryton>
|
||||
<data group="1">
|
||||
<data grouped="1">
|
||||
<record model="ir.message" id="msg_quantity_multiple_required">
|
||||
<field name="text">Quantity multiple of output bom required.</field>
|
||||
</record>
|
||||
|
|
|
@ -52,7 +52,7 @@ class Production(metaclass=PoolMeta):
|
|||
'on_change_with_salable_product')
|
||||
comments = fields.Text('Comments')
|
||||
|
||||
@fields.depends('product')
|
||||
@fields.depends('product', '_parent_product.salable')
|
||||
def on_change_with_salable_product(self, name=None):
|
||||
if self.product:
|
||||
return self.product.salable
|
||||
|
|
|
@ -355,7 +355,8 @@ class Lot(metaclass=PoolMeta):
|
|||
def default_exclusive_glp():
|
||||
return False
|
||||
|
||||
@fields.depends('category', 'product')
|
||||
@fields.depends('category', 'product', '_parent_product.purchasable',
|
||||
'_parent_product.salable')
|
||||
def on_change_with_special_category(self, name=None):
|
||||
Config = Pool().get('lims.configuration')
|
||||
if self.category:
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
[tryton]
|
||||
version=5.2.0
|
||||
version=5.4.0
|
||||
depends:
|
||||
lims
|
||||
production
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
Copyright (C) 2017-2018 Ignacio Parszyk <iparszyk@kalenislims.com>
|
||||
Copyright (C) 2013-2018 Sebastián Marró <smarro@kalenislims.com>
|
||||
Copyright (C) 2017-2020 Ignacio Parszyk <iparszyk@kalenislims.com>
|
||||
Copyright (C) 2013-2020 Sebastián Marró <smarro@kalenislims.com>
|
||||
Copyright (C) 2013-2016 Luis Falcon <falcon@gnu.org>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0"?>
|
||||
<tryton>
|
||||
<data group="1">
|
||||
<data grouped="1">
|
||||
<record model="ir.message" id="msg_code_unique_id">
|
||||
<field name="text">Project code must be unique</field>
|
||||
</record>
|
||||
|
|
|
@ -79,7 +79,7 @@ class Entry(metaclass=PoolMeta):
|
|||
if 'project' not in cls.samples.depends:
|
||||
cls.samples.depends.append('project')
|
||||
|
||||
@fields.depends('project')
|
||||
@fields.depends('project', '_parent_project.type')
|
||||
def on_change_with_project_type(self, name=None):
|
||||
res = None
|
||||
if self.project:
|
||||
|
@ -100,7 +100,7 @@ class Sample(metaclass=PoolMeta):
|
|||
return Project(Transaction().context.get('project')).type
|
||||
return ''
|
||||
|
||||
@fields.depends('entry')
|
||||
@fields.depends('entry', '_parent_entry.project')
|
||||
def on_change_with_project_type(self, name=None):
|
||||
res = ''
|
||||
if self.entry and self.entry.project:
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
[tryton]
|
||||
version=5.2.0
|
||||
version=5.4.0
|
||||
depends:
|
||||
lims
|
||||
xml:
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
Copyright (C) 2017-2018 Ignacio Parszyk <iparszyk@kalenislims.com>
|
||||
Copyright (C) 2013-2018 Sebastián Marró <smarro@kalenislims.com>
|
||||
Copyright (C) 2017-2020 Ignacio Parszyk <iparszyk@kalenislims.com>
|
||||
Copyright (C) 2013-2020 Sebastián Marró <smarro@kalenislims.com>
|
||||
Copyright (C) 2013-2016 Luis Falcon <falcon@gnu.org>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
[tryton]
|
||||
version=5.2.0
|
||||
version=5.4.0
|
||||
depends:
|
||||
lims_project
|
||||
xml:
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
Copyright (C) 2017-2018 Ignacio Parszyk <iparszyk@kalenislims.com>
|
||||
Copyright (C) 2013-2018 Sebastián Marró <smarro@kalenislims.com>
|
||||
Copyright (C) 2017-2020 Ignacio Parszyk <iparszyk@kalenislims.com>
|
||||
Copyright (C) 2013-2020 Sebastián Marró <smarro@kalenislims.com>
|
||||
Copyright (C) 2013-2016 Luis Falcon <falcon@gnu.org>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0"?>
|
||||
<tryton>
|
||||
<data group="1">
|
||||
<data grouped="1">
|
||||
<record model="ir.message" id="msg_no_project_study_plan_sequence">
|
||||
<field name="text">There is no sequence for Study plan Projects for the work year "%(work_year)s".</field>
|
||||
</record>
|
||||
|
|
|
@ -521,52 +521,52 @@ class ProjectReferenceElement(ModelSQL, ModelView):
|
|||
location = fields.Many2One('stock.location', 'Location',
|
||||
domain=[('type', '=', 'storage')])
|
||||
|
||||
@fields.depends('input_product')
|
||||
@fields.depends('input_product', '_parent_input_product.common_name')
|
||||
def on_change_with_common_name(self, name=None):
|
||||
if self.input_product:
|
||||
return self.input_product.common_name
|
||||
|
||||
@fields.depends('input_product')
|
||||
@fields.depends('input_product', '_parent_input_product.chemical_name')
|
||||
def on_change_with_chemical_name(self, name=None):
|
||||
if self.input_product:
|
||||
return self.input_product.chemical_name
|
||||
|
||||
@fields.depends('input_product')
|
||||
@fields.depends('input_product', '_parent_input_product.cas_number')
|
||||
def on_change_with_cas_number(self, name=None):
|
||||
if self.input_product:
|
||||
return self.input_product.cas_number
|
||||
|
||||
@fields.depends('lot')
|
||||
@fields.depends('lot', '_parent_lot.purity_degree')
|
||||
def on_change_with_purity_degree(self, name=None):
|
||||
if self.lot and self.lot.purity_degree:
|
||||
return self.lot.purity_degree.id
|
||||
|
||||
@fields.depends('lot')
|
||||
@fields.depends('lot', '_parent_lot.stability')
|
||||
def on_change_with_stability(self, name=None):
|
||||
if self.lot:
|
||||
return self.lot.stability
|
||||
|
||||
@fields.depends('lot')
|
||||
@fields.depends('lot', '_parent_lot.homogeneity')
|
||||
def on_change_with_homogeneity(self, name=None):
|
||||
if self.lot:
|
||||
return self.lot.homogeneity
|
||||
|
||||
@fields.depends('lot')
|
||||
@fields.depends('lot', '_parent_lot.expiration_date')
|
||||
def on_change_with_expiration_date(self, name=None):
|
||||
if self.lot:
|
||||
return self.lot.expiration_date
|
||||
|
||||
@fields.depends('lot')
|
||||
@fields.depends('lot', '_parent_lot.reception_date')
|
||||
def on_change_with_reception_date(self, name=None):
|
||||
if self.lot:
|
||||
return self.lot.reception_date
|
||||
|
||||
@fields.depends('lot')
|
||||
@fields.depends('lot', '_parent_lot.formula')
|
||||
def on_change_with_formula(self, name=None):
|
||||
if self.lot:
|
||||
return self.lot.formula
|
||||
|
||||
@fields.depends('lot')
|
||||
@fields.depends('lot', '_parent_lot.molecular_weight')
|
||||
def on_change_with_molecular_weight(self, name=None):
|
||||
if self.lot:
|
||||
return self.lot.molecular_weight
|
||||
|
@ -713,10 +713,10 @@ class ProjectDeviationAndAmendment(ModelSQL, ModelView):
|
|||
number += count
|
||||
return str(number)
|
||||
|
||||
@fields.depends('_parent_project.stp_laboratory_professionals')
|
||||
@fields.depends('project', '_parent_project.stp_laboratory_professionals')
|
||||
def on_change_with_dev_amnd_prof_domain(self, name=None):
|
||||
professionals = []
|
||||
if self.project.stp_laboratory_professionals:
|
||||
if self.project and self.project.stp_laboratory_professionals:
|
||||
professionals = [pp.professional.id for pp in
|
||||
self.project.stp_laboratory_professionals if pp.professional]
|
||||
return professionals
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
[tryton]
|
||||
version=5.2.0
|
||||
version=5.4.0
|
||||
depends:
|
||||
lims_project
|
||||
lims_production
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
Copyright (C) 2017-2018 Ignacio Parszyk <iparszyk@kalenislims.com>
|
||||
Copyright (C) 2013-2018 Sebastián Marró <smarro@kalenislims.com>
|
||||
Copyright (C) 2017-2020 Ignacio Parszyk <iparszyk@kalenislims.com>
|
||||
Copyright (C) 2013-2020 Sebastián Marró <smarro@kalenislims.com>
|
||||
Copyright (C) 2013-2016 Luis Falcon <falcon@gnu.org>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0"?>
|
||||
<tryton>
|
||||
<data group="1">
|
||||
<data grouped="1">
|
||||
<record model="ir.message" id="msg_no_project_tas_sequence">
|
||||
<field name="text">There is no sequence for TAS Projects for the work year "%(work_year)s".</field>
|
||||
</record>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
[tryton]
|
||||
version=5.2.0
|
||||
version=5.4.0
|
||||
depends:
|
||||
lims_project
|
||||
extras_depend:
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
Copyright (C) 2017-2018 Ignacio Parszyk <iparszyk@kalenislims.com>
|
||||
Copyright (C) 2013-2018 Sebastián Marró <smarro@kalenislims.com>
|
||||
Copyright (C) 2017-2020 Ignacio Parszyk <iparszyk@kalenislims.com>
|
||||
Copyright (C) 2013-2020 Sebastián Marró <smarro@kalenislims.com>
|
||||
Copyright (C) 2013-2016 Luis Falcon <falcon@gnu.org>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0"?>
|
||||
<tryton>
|
||||
<data group="1">
|
||||
<data grouped="1">
|
||||
<record model="ir.message" id="msg_not_water">
|
||||
<field name="text">Please, select a "Water sampling" Project to print this report</field>
|
||||
</record>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
[tryton]
|
||||
version=5.2.0
|
||||
version=5.4.0
|
||||
depends:
|
||||
lims_project
|
||||
xml:
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
Copyright (C) 2017-2018 Ignacio Parszyk <iparszyk@kalenislims.com>
|
||||
Copyright (C) 2017-2018 Sebastián Marró <smarro@kalenislims.com>
|
||||
Copyright (C) 2017-2020 Ignacio Parszyk <iparszyk@kalenislims.com>
|
||||
Copyright (C) 2017-2020 Sebastián Marró <smarro@kalenislims.com>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
<?xml version="1.0"?>
|
||||
<tryton>
|
||||
<data>
|
||||
|
||||
<!-- Configuration -->
|
||||
|
||||
|
@ -40,4 +41,5 @@
|
|||
<menuitem action="act_sale_clause" id="menu_sale_clause"
|
||||
parent="sale.menu_configuration" sequence="20"/>
|
||||
|
||||
</data>
|
||||
</tryton>
|
||||
|
|
|
@ -69,7 +69,7 @@ class Sale(metaclass=PoolMeta):
|
|||
if len(invoice_party_domain) == 1:
|
||||
self.invoice_party = invoice_party_domain[0]
|
||||
|
||||
@fields.depends('party')
|
||||
@fields.depends('party', '_parent_party.relations')
|
||||
def on_change_with_invoice_party_domain(self, name=None):
|
||||
pool = Pool()
|
||||
Config = pool.get('lims.configuration')
|
||||
|
@ -215,7 +215,7 @@ class SaleLine(metaclass=PoolMeta):
|
|||
domain=['OR', ('id', '=', Eval('matrix')),
|
||||
('id', 'in', Eval('matrix_domain'))],
|
||||
states={'readonly': Eval('sale_state') != 'draft'},
|
||||
depends=['matrix_domain', 'services', 'sale_state'])
|
||||
depends=['matrix_domain', 'sale_state'])
|
||||
matrix_domain = fields.Function(fields.Many2Many('lims.matrix',
|
||||
None, None, 'Matrix domain'), 'on_change_with_matrix_domain')
|
||||
analysis = fields.Many2One('lims.analysis', 'Service',
|
||||
|
@ -352,7 +352,7 @@ class SaleLine(metaclass=PoolMeta):
|
|||
|
||||
return typified_analysis + typified_sets_groups + additional_analysis
|
||||
|
||||
@fields.depends('product', 'analysis')
|
||||
@fields.depends('product', 'analysis', '_parent_analysis.methods')
|
||||
def on_change_with_method_domain(self, name=None):
|
||||
Analysis = Pool().get('lims.analysis')
|
||||
if self.analysis:
|
||||
|
@ -370,7 +370,7 @@ class SaleLine(metaclass=PoolMeta):
|
|||
def default_method_invisible():
|
||||
return True
|
||||
|
||||
@fields.depends('product', 'analysis')
|
||||
@fields.depends('product', 'analysis', '_parent_analysis.type')
|
||||
def on_change_with_method_invisible(self, name=None):
|
||||
Analysis = Pool().get('lims.analysis')
|
||||
if self.analysis and self.analysis.type == 'analysis':
|
||||
|
@ -386,7 +386,7 @@ class SaleLine(metaclass=PoolMeta):
|
|||
def default_print_service_detail_invisible():
|
||||
return True
|
||||
|
||||
@fields.depends('product', 'analysis')
|
||||
@fields.depends('product', 'analysis', '_parent_analysis.type')
|
||||
def on_change_with_print_service_detail_invisible(self, name=None):
|
||||
Analysis = Pool().get('lims.analysis')
|
||||
if self.analysis and self.analysis.type in ('set', 'group'):
|
||||
|
|
|
@ -26,6 +26,9 @@ class CreateSampleStart(metaclass=PoolMeta):
|
|||
Date = pool.get('ir.date')
|
||||
SaleLine = pool.get('sale.line')
|
||||
|
||||
if not self.party:
|
||||
return []
|
||||
|
||||
today = Date.today()
|
||||
clause = [
|
||||
('sale.party', '=', self.party.id),
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
[tryton]
|
||||
version=5.2.0
|
||||
version=5.4.0
|
||||
depends:
|
||||
lims
|
||||
sale
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
Copyright (C) 2019 Ignacio Parszyk <iparszyk@kalenislims.com>
|
||||
Copyright (C) 2019 Sebastián Marró <smarro@kalenislims.com>
|
||||
Copyright (C) 2019-2020 Ignacio Parszyk <iparszyk@kalenislims.com>
|
||||
Copyright (C) 2019-2020 Sebastián Marró <smarro@kalenislims.com>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0"?>
|
||||
<tryton>
|
||||
<data group="1">
|
||||
<data grouped="1">
|
||||
<record model="ir.message" id="lbl_product_quotation">
|
||||
<field name="text">Product sold</field>
|
||||
</record>
|
||||
|
|
|
@ -162,7 +162,7 @@ class SaleLine(metaclass=PoolMeta):
|
|||
~Bool(Eval('_parent_sale', {}).get('plants', []))),
|
||||
},
|
||||
domain=[('party', '=', Eval('_parent_sale', {}).get('party', None))],
|
||||
depends=['_parent_sale', 'analysis', 'sale_state'])
|
||||
depends=['sale', 'analysis', 'sale_state'])
|
||||
equipments = fields.Many2Many('sale.line-lims.equipment',
|
||||
'line', 'equipment', 'Equipments',
|
||||
states={
|
||||
|
@ -176,7 +176,7 @@ class SaleLine(metaclass=PoolMeta):
|
|||
domain=[If(Bool(Eval('plants')),
|
||||
('plant', 'in', Eval('plants')),
|
||||
('plant', 'in', Eval('_parent_sale', {}).get('plants', [])))],
|
||||
depends=['plants', '_parent_sale', 'analysis', 'sale_state'])
|
||||
depends=['plants', 'sale', 'analysis', 'sale_state'])
|
||||
components = fields.Many2Many('sale.line-lims.component',
|
||||
'line', 'component', 'Components',
|
||||
states={
|
||||
|
@ -191,21 +191,21 @@ class SaleLine(metaclass=PoolMeta):
|
|||
('equipment', 'in', Eval('equipments')),
|
||||
('equipment', 'in', Eval('_parent_sale', {}).get(
|
||||
'equipments', [])))],
|
||||
depends=['equipments', '_parent_sale', 'analysis', 'sale_state'])
|
||||
depends=['equipments', 'sale', 'analysis', 'sale_state'])
|
||||
label_from = fields.Integer('Label from', readonly=True,
|
||||
states={
|
||||
'invisible': ~Bool(Eval('_parent_sale', {}).get(
|
||||
'lubrication_plan', False)),
|
||||
'readonly': Eval('sale_state') != 'draft',
|
||||
},
|
||||
depends=['_parent_sale', 'sale_state'])
|
||||
depends=['sale', 'sale_state'])
|
||||
label_to = fields.Integer('Label to', readonly=True,
|
||||
states={
|
||||
'invisible': ~Bool(Eval('_parent_sale', {}).get(
|
||||
'lubrication_plan', False)),
|
||||
'readonly': Eval('sale_state') != 'draft',
|
||||
},
|
||||
depends=['_parent_sale', 'sale_state'])
|
||||
depends=['sale', 'sale_state'])
|
||||
|
||||
@classmethod
|
||||
def __setup__(cls):
|
||||
|
@ -213,7 +213,7 @@ class SaleLine(metaclass=PoolMeta):
|
|||
cls.expiration_date.states['required'] = And(
|
||||
Bool(Eval('_parent_sale', {}).get('lubrication_plan', False)),
|
||||
Bool(Eval('analysis')))
|
||||
cls.expiration_date.depends.extend(['_parent_sale', 'analysis'])
|
||||
cls.expiration_date.depends.extend(['sale', 'analysis'])
|
||||
|
||||
@classmethod
|
||||
def _confirm_lines(cls, lines):
|
||||
|
|
|
@ -18,6 +18,9 @@ class CreateSampleStart(metaclass=PoolMeta):
|
|||
Date = pool.get('ir.date')
|
||||
SaleLine = pool.get('sale.line')
|
||||
|
||||
if not self.party:
|
||||
return []
|
||||
|
||||
today = Date.today()
|
||||
clause = [
|
||||
('sale.party', '=', self.party.id),
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
[tryton]
|
||||
version=5.2.0
|
||||
version=5.4.0
|
||||
depends:
|
||||
lims_sale
|
||||
lims_industry
|
||||
|
|
23
setup.py
23
setup.py
|
@ -1,16 +1,11 @@
|
|||
#!/usr/bin/env python
|
||||
#!/usr/bin/env python3
|
||||
# encoding: utf-8
|
||||
|
||||
from setuptools import setup
|
||||
import re
|
||||
import os
|
||||
import io
|
||||
try:
|
||||
from configparser import ConfigParser
|
||||
except ImportError:
|
||||
from ConfigParser import ConfigParser
|
||||
|
||||
MODULE2PREFIX = {}
|
||||
import os
|
||||
import re
|
||||
from configparser import ConfigParser
|
||||
from setuptools import setup
|
||||
|
||||
|
||||
def kalenis_test_suite():
|
||||
|
@ -35,7 +30,7 @@ def get_require_version(name):
|
|||
return require
|
||||
|
||||
|
||||
version = '5.2.0'
|
||||
version = '5.4.0'
|
||||
major_version, minor_version, _ = version.split('.', 2)
|
||||
major_version = int(major_version)
|
||||
minor_version = int(minor_version)
|
||||
|
@ -62,8 +57,7 @@ for name in os.listdir('.'):
|
|||
if re.match(r'^lims*', dep):
|
||||
continue
|
||||
if not re.match(r'(ir|res)(\W|$)', dep):
|
||||
prefix = MODULE2PREFIX.get(dep, 'trytond')
|
||||
requires.append(get_require_version('%s_%s' % (prefix, dep)))
|
||||
requires.append(get_require_version('trytond_%s' % dep))
|
||||
package = 'trytond.modules.%s' % name
|
||||
package_dir[package] = os.path.join('.', name)
|
||||
packages.append(package)
|
||||
|
@ -107,7 +101,9 @@ setup(name='kalenis_lims',
|
|||
'Intended Audience :: Other Audience',
|
||||
'License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)',
|
||||
'Natural Language :: English',
|
||||
'Natural Language :: Spanish',
|
||||
'Operating System :: OS Independent',
|
||||
'Programming Language :: Python :: 3',
|
||||
'Programming Language :: Python :: 3.5',
|
||||
'Programming Language :: Python :: 3.6',
|
||||
'Programming Language :: Python :: 3.7',
|
||||
|
@ -117,6 +113,7 @@ setup(name='kalenis_lims',
|
|||
'Topic :: Scientific/Engineering',
|
||||
],
|
||||
license='GPL-3',
|
||||
python_requires='>=3.5',
|
||||
install_requires=requires,
|
||||
dependency_links=dependency_links,
|
||||
zip_safe=False,
|
||||
|
|
Loading…
Reference in New Issue