Create new model agronomics.contract and agronomics.contract.line. (#13)

Use agronomics.contract instead of purchase_contract in agronomics.weighing.
Change the way we calculate the contract to use in weighing model.
Pyflakes
Locales

Task #047246
This commit is contained in:
juanjo-nan 2022-04-01 12:10:22 +02:00 committed by GitHub
parent b09bcaec8e
commit 8a1bc5edda
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 1138 additions and 92 deletions

View file

@ -2,6 +2,7 @@
# The COPYRIGHT file at the top level of this repository contains
# the full copyright notices and license terms.
from trytond.pool import Pool
from . import contract
from . import party
from . import plot
from . import product
@ -14,6 +15,9 @@ from . import price_list
def register():
Pool.register(
contract.AgronomicsContractProductPriceListTypePriceList,
contract.AgronomicsContract,
contract.AgronomicsContractLine,
party.Party,
plot.Enclosure,
plot.Crop,

207
contract.py Normal file
View file

@ -0,0 +1,207 @@
# The COPYRIGHT file at the top level of this repository contains the full
# copyright notices and license terms.
from trytond.model import fields, Workflow, ModelView, ModelSQL
from trytond.pyson import Eval
from decimal import Decimal
from trytond.pyson import If
from trytond.exceptions import UserError
from trytond.pool import Pool
from trytond.i18n import gettext
_STATES = {
'readonly': Eval('state') != 'draft',
}
_DEPENDS = ['state']
class AgronomicsContractProductPriceListTypePriceList(ModelSQL, ModelView):
"Agronomics Contract Product Price List Type Price List"
__name__ = 'agronomics.contract-product.price_list.type-product.price_list'
contract = fields.Many2One('agronomics.contract', "Contract")
price_list_type = fields.Many2One(
'product.price_list.type', "Price List Type")
price_list = fields.Many2One('product.price_list', "Price List")
class AgronomicsContract(Workflow, ModelSQL, ModelView):
"Agronomics Contract"
__name__ = 'agronomics.contract'
reference = fields.Char('Reference')
state = fields.Selection([
('draft', 'Draft'),
('active', 'Active'),
('cancelled', "Cancelled"),
('done', 'Done'),
], 'State', readonly=True, required=True)
crop = fields.Many2One(
'agronomics.crop', "Crop", states=_STATES, depends=_DEPENDS,
required=True)
start_date = fields.Function(
fields.Date('Start Date'), 'on_change_with_start_date')
end_date = fields.Function(
fields.Date('End Date'), 'on_change_with_start_date')
producer = fields.Many2One(
'party.party', "Producer", states=_STATES, depends=_DEPENDS,
required=True)
price_list_types = fields.One2Many(
'agronomics.contract-product.price_list.type-product.price_list',
'contract', "Price List Types", states=_STATES, depends=_DEPENDS)
lines = fields.One2Many(
'agronomics.contract.line', 'contract', "Lines", states=_STATES,
depends=_DEPENDS)
weighings = fields.One2Many('agronomics.weighing', 'purchase_contract',
"Weighings", readonly=True)
@classmethod
def __setup__(cls):
super(AgronomicsContract, cls).__setup__()
cls._transitions |= set((
('draft', 'active'),
('active', 'cancelled'),
('active', 'done'),
('active', 'draft'),
('cancelled', 'draft'),
))
cls._buttons.update({
'draft': {
'invisible': ~Eval('state').in_(['cancelled', 'active']),
'icon': If(Eval('state') == 'cancelled', 'tryton-undo',
'tryton-back'),
},
'active': {
'invisible': Eval('state') != 'draft',
'icon': 'tryton-forward',
},
'cancel': {
'invisible': Eval('state') != 'active',
'icon': 'tryton-cancel',
},
'done': {
'invisible': Eval('state') != 'active',
'icon': 'tryton-ok',
},
})
@staticmethod
def default_state():
return 'draft'
def get_rec_name(self, name):
ret = self.producer.rec_name
if self.start_date:
ret += ' - %s' % (self.start_date)
return ret
@fields.depends('crop')
def on_change_with_start_date(self, name=None):
if self.crop:
return self.crop.start_date
return None
@fields.depends('crop')
def on_change_with_end_date(self, name=None):
if self.crop:
return self.crop.end_date
return None
@classmethod
@ModelView.button
@Workflow.transition('draft')
def draft(cls, contracts):
pass
@classmethod
@ModelView.button
@Workflow.transition('active')
def active(cls, contracts):
pool = Pool()
ContractLine = pool.get('agronomics.contract.line')
for contract in contracts:
for line in contract.lines:
active_lines = ContractLine.search([
('contract.crop', '=', contract.crop),
('parcel', '=', line.parcel),
('contract.state', '=', 'active'),
])
if active_lines:
raise UserError(gettext(
'agronomics.msg_cant_active_contract',
contract=contract.rec_name,
parcel=line.parcel.rec_name))
@classmethod
@ModelView.button
@Workflow.transition('cancelled')
def cancel(cls, contracts):
pass
@classmethod
@ModelView.button
@Workflow.transition('done')
def done(cls, contracts):
pass
class AgronomicsContractLine(ModelSQL, ModelView):
"Agronomics Contract Line"
__name__ = 'agronomics.contract.line'
contract = fields.Many2One('agronomics.contract', 'Contract', required=True,
ondelete='CASCADE')
parcel = fields.Many2One('agronomics.parcel', "Parcel",
domain=[
('producer', '=', Eval('_parent_contract.producer')),
('crop', '=', Eval('_parent_contract.crop'))
])
product = fields.Function(
fields.Many2One('product.template', "Product"),
'on_change_with_product')
unit = fields.Function(fields.Many2One('product.uom', "Unit"),
'on_change_with_unit')
unit_digits = fields.Function(fields.Integer("Unit Digits"),
'on_change_with_unit_digits')
agreed_quantity = fields.Float("Agreed Quantity",
digits=(16, Eval('unit_digits', 2)), depends=['unit_digits'])
purchased_quantity = fields.Function(
fields.Float("Purchased Quantity", digits=(16, Eval('unit_digits', 2)),
depends=['unit_digits']),'on_change_with_purchased_quantity')
remaining_quantity = fields.Function(
fields.Float("Remaining Quantity", digits=(16, Eval('unit_digits', 2)),
depends=['unit_digits']), 'on_change_with_remaining_quantity')
@fields.depends('parcel')
def on_change_with_product(self, name=None):
if self.parcel:
return self.parcel.product.id
return None
@fields.depends('product', methods=['on_change_with_product'])
def on_change_with_unit(self, name=None):
if self.product:
return self.product.purchase_uom.id
return None
@fields.depends('unit')
def on_change_with_unit_digits(self, name=None):
if self.unit:
return self.unit.digits
return 2
@fields.depends('parcel')
def on_change_with_purchased_quantity(self, name=None):
if self.parcel:
if self.parcel.purchased_quantity:
return self.parcel.purchased_quantity
return Decimal(0)
@fields.depends('agreed_quantity', 'purchased_quantity')
def on_change_with_remaining_quantity(self, name=None):
if self.agreed_quantity:
if self.purchased_quantity:
return self.agreed_quantity - self.purchased_quantity
else:
return self.agreed_quantity
return None

121
contract.xml Normal file
View file

@ -0,0 +1,121 @@
<?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>
<!-- agronomics.contract -->
<record model="ir.ui.view" id="agronomics_contract_view_form">
<field name="model">agronomics.contract</field>
<field name="type">form</field>
<field name="name">contract_form</field>
</record>
<record model="ir.ui.view" id="agronomics_contract_view_tree">
<field name="model">agronomics.contract</field>
<field name="type">tree</field>
<field name="name">contract_tree</field>
</record>
<record model="ir.action.act_window" id="act_agronomics_contract_action">
<field name="name">Agronomics Contract</field>
<field name="res_model">agronomics.contract</field>
</record>
<record model="ir.action.act_window.view" id="act_agronomics_contract_form_view">
<field name="sequence" eval="10"/>
<field name="view" ref="agronomics_contract_view_tree"/>
<field name="act_window" ref="act_agronomics_contract_action"/>
</record>
<record model="ir.action.act_window.view" id="act_agronomics_contract_tree_view">
<field name="sequence" eval="20"/>
<field name="view" ref="agronomics_contract_view_form"/>
<field name="act_window" ref="act_agronomics_contract_action"/>
</record>
<menuitem parent="menu_agronomics" sequence="10"
action="act_agronomics_contract_action" id="menu_agronomics_contract_list"/>
<record model="ir.action.act_window.domain" id="act_agronomics_contract_draft">
<field name="name">Draft</field>
<field name="sequence" eval="10"/>
<field name="domain" eval="[('state', '=', 'draft')]" pyson="1"/>
<field name="act_window" ref="act_agronomics_contract_action"/>
</record>
<record model="ir.action.act_window.domain" id="act_agronomics_contract_active">
<field name="name">Active</field>
<field name="sequence" eval="20"/>
<field name="domain" eval="[('state', '=', 'active')]" pyson="1"/>
<field name="act_window" ref="act_agronomics_contract_action"/>
</record>
<record model="ir.action.act_window.domain" id="act_agronomics_contract_all">
<field name="name">All</field>
<field name="sequence" eval="30"/>
<field name="domain"/>
<field name="act_window" ref="act_agronomics_contract_action"/>
</record>
<!-- agronomics.contract.line -->
<record model="ir.ui.view" id="agronomics_contract_line_view_form">
<field name="model">agronomics.contract.line</field>
<field name="type">form</field>
<field name="name">contract_line_form</field>
</record>
<record model="ir.ui.view" id="agronomics_contract_line_view_tree">
<field name="model">agronomics.contract.line</field>
<field name="type">tree</field>
<field name="name">contract_line_tree</field>
</record>
<!-- agronomics.contract-product.price_list.type-product.price_list -->
<record model="ir.ui.view" id="agronomics_contract_product_price_list_type_product_price_list_view_form">
<field name="model">agronomics.contract-product.price_list.type-product.price_list</field>
<field name="type">form</field>
<field name="name">contract_price_list_price_list_type_form</field>
</record>
<record model="ir.ui.view" id="agronomics_contract_product_price_list_type_product_price_list_view_tree">
<field name="model">agronomics.contract-product.price_list.type-product.price_list</field>
<field name="type">tree</field>
<field name="name">contract_price_list_price_list_type_tree</field>
</record>
<!-- ir.model.button -->
<record model="ir.model.button" id="agronomics_contract_cancel_button">
<field name="name">cancel</field>
<field name="string">Cancel</field>
<field name="model" search="[('model', '=', 'agronomics.contract')]"/>
</record>
<record model="ir.model.button-res.group" id="agronomics_contract_cancel_button_group_agronomics">
<field name="button" ref="agronomics_contract_cancel_button"/>
<field name="group" ref="group_agronomics"/>
</record>
<record model="ir.model.button" id="agronomics_contract_active_button">
<field name="name">active</field>
<field name="string">Active</field>
<field name="model" search="[('model', '=', 'agronomics.contract')]"/>
</record>
<record model="ir.model.button-res.group" id="agronomics_contract_active_button_group_agronomics">
<field name="button" ref="agronomics_contract_active_button"/>
<field name="group" ref="group_agronomics"/>
</record>
<record model="ir.model.button" id="agronomics_contract_draft_button">
<field name="name">draft</field>
<field name="string">Draft</field>
<field name="model" search="[('model', '=', 'agronomics.contract')]"/>
</record>
<record model="ir.model.button-res.group" id="agronomics_contract_draft_button_group_agronomics">
<field name="button" ref="agronomics_contract_draft_button"/>
<field name="group" ref="group_agronomics"/>
</record>
<record model="ir.model.button" id="agronomics_contract_done_button">
<field name="name">done</field>
<field name="string">Done</field>
<field name="model" search="[('model', '=', 'agronomics.contract')]"/>
</record>
<record model="ir.model.button-res.group" id="purchase_contract_done_button_group_purchase">
<field name="button" ref="agronomics_contract_done_button"/>
<field name="group" ref="group_agronomics"/>
</record>
</data>
</tryton>

View file

@ -10,9 +10,9 @@ msgctxt "field:agronomics.beneficiary,party:"
msgid "Beneficiary"
msgstr "Beneficiari"
msgctxt "field:agronomics.beneficiary,percent:"
msgid "Percent"
msgstr "Percentatge"
msgctxt "field:agronomics.beneficiary,product_price_list_type:"
msgid "Product Price List Type"
msgstr ""
msgctxt "field:agronomics.beneficiary,weighing:"
msgid "Weighing"
@ -34,6 +34,92 @@ msgctxt "field:agronomics.container,name:"
msgid "Name"
msgstr "Nom"
msgctxt "field:agronomics.contract,crop:"
msgid "Crop"
msgstr "Collita"
msgctxt "field:agronomics.contract,end_date:"
msgid "End Date"
msgstr "Data finalització"
msgctxt "field:agronomics.contract,lines:"
msgid "Lines"
msgstr "Línies"
msgctxt "field:agronomics.contract,price_list_types:"
msgid "Price List Types"
msgstr "Tipus de tarifa"
msgctxt "field:agronomics.contract,producer:"
msgid "Producer"
msgstr "Productor"
msgctxt "field:agronomics.contract,reference:"
msgid "Reference"
msgstr "Referència"
msgctxt "field:agronomics.contract,start_date:"
msgid "Start Date"
msgstr "Data inicial"
msgctxt "field:agronomics.contract,state:"
msgid "State"
msgstr "Estat"
msgctxt "field:agronomics.contract,weighings:"
msgid "Weighings"
msgstr "Pesades"
msgctxt ""
"field:agronomics.contract-product.price_list.type-"
"product.price_list,contract:"
msgid "Contract"
msgstr "Contracte"
msgctxt ""
"field:agronomics.contract-product.price_list.type-"
"product.price_list,price_list:"
msgid "Price List"
msgstr "Tarifa"
msgctxt ""
"field:agronomics.contract-product.price_list.type-"
"product.price_list,price_list_type:"
msgid "Price List Type"
msgstr "Tipus de tarifa"
msgctxt "field:agronomics.contract.line,agreed_quantity:"
msgid "Agreed Quantity"
msgstr "Quantitat pactada"
msgctxt "field:agronomics.contract.line,contract:"
msgid "Contract"
msgstr "Contracte"
msgctxt "field:agronomics.contract.line,parcel:"
msgid "Parcel"
msgstr "Parcel·la"
msgctxt "field:agronomics.contract.line,product:"
msgid "Product"
msgstr "Productes"
msgctxt "field:agronomics.contract.line,purchased_quantity:"
msgid "Purchased Quantity"
msgstr "Quantitat comprada"
msgctxt "field:agronomics.contract.line,remaining_quantity:"
msgid "Remaining Quantity"
msgstr "Quantitat restant"
msgctxt "field:agronomics.contract.line,unit:"
msgid "Unit"
msgstr "Unitat"
msgctxt "field:agronomics.contract.line,unit_digits:"
msgid "Unit Digits"
msgstr "Dígits de la unitat"
msgctxt "field:agronomics.crop,code:"
msgid "Code"
msgstr "Codi"
@ -126,10 +212,6 @@ msgctxt "field:agronomics.parcel,beneficiaries:"
msgid "Beneficiaries"
msgstr "Beneficiaris"
msgctxt "field:agronomics.parcel,purchased_quantity:"
msgid "Bought Quantity"
msgstr "Quantitat comprada"
msgctxt "field:agronomics.parcel,crop:"
msgid "Crop"
msgstr "Collita"
@ -170,6 +252,10 @@ msgctxt "field:agronomics.parcel,product:"
msgid "Product"
msgstr "Producte"
msgctxt "field:agronomics.parcel,purchased_quantity:"
msgid "Bought Quantity"
msgstr "Quantitat comprada"
msgctxt "field:agronomics.parcel,remaining_quantity:"
msgid "Remainig Quantity"
msgstr "Quantitat restant"
@ -222,6 +308,14 @@ msgctxt "field:agronomics.plantation,party:"
msgid "Party"
msgstr "Tercers"
msgctxt "field:agronomics.plantation,plantation_owner:"
msgid "Plantation Owner"
msgstr ""
msgctxt "field:agronomics.plantation,plantation_year:"
msgid "Plantation Year"
msgstr ""
msgctxt "field:agronomics.weighing,all_do:"
msgid "All DO"
msgstr "Totes les DO"
@ -366,6 +460,15 @@ msgctxt "field:product.configuration,variant_deactivation_time:"
msgid "Variant Deactivation Time"
msgstr "Temps per desactivar variants"
msgctxt "field:product.price_list,product_price_list_type:"
msgid "Product Price List Type"
msgstr ""
#, fuzzy
msgctxt "field:product.price_list.type,name:"
msgid "Name"
msgstr "Nom"
msgctxt "field:product.product,agronomic_type:"
msgid "Agronomic Type"
msgstr "Tipus Agronòmic"
@ -402,9 +505,13 @@ msgctxt "field:product.product,production_quality_template:"
msgid "Production Quality Template"
msgstr "Plantilla Qualitat de producció"
msgctxt "field:product.product,quality_sample:"
msgid "Quality Sample"
msgstr "Mostra de qualitat"
msgctxt "field:product.product,quality_samples:"
msgid "Quality Samples"
msgstr ""
msgctxt "field:product.product,quality_tests:"
msgid "Quality Tests"
msgstr ""
msgctxt "field:product.product,quality_weighing:"
msgid "Quality Weighing"
@ -446,9 +553,10 @@ msgctxt "field:product.product,wine_alcohol_content_success:"
msgid "Alcohol Content Success"
msgstr ""
#, fuzzy
msgctxt "field:product.product,wine_botrytis:"
msgid "Botrytis"
msgstr ""
msgstr "Botrytis"
msgctxt "field:product.product,wine_botrytis_comment:"
msgid "Botrytis Comment"
@ -826,6 +934,16 @@ msgctxt "field:product.product-agronomics.ecological,product:"
msgid "Product"
msgstr "Producte"
#, fuzzy
msgctxt "field:product.product-quality.sample,product:"
msgid "Product"
msgstr "Productes"
#, fuzzy
msgctxt "field:product.product-quality.sample,sample:"
msgid "Sample"
msgstr "Mostra"
msgctxt "field:product.template,agronomic_type:"
msgid "Agronomic Type"
msgstr "Tipus Agronòmic"
@ -886,6 +1004,18 @@ msgctxt "field:production,output_distribution:"
msgid "Output Distribution"
msgstr "Distribució de sortides"
msgctxt "field:production,pass_certification:"
msgid "Pass Certification"
msgstr ""
msgctxt "field:production,pass_quality:"
msgid "Pass Quality"
msgstr ""
msgctxt "field:production,pass_quality_sample:"
msgid "Pass Quality Sample"
msgstr ""
msgctxt "field:production,production_template:"
msgid "Production Template"
msgstr "Plantilla de producció"
@ -1017,10 +1147,22 @@ msgctxt "field:production.template,outputs:"
msgid "Outputs"
msgstr "Sortides"
msgctxt "field:production.template,pass_certification:"
msgid "Pass Certification"
msgstr ""
msgctxt "field:production.template,pass_feature:"
msgid "Pass on Feature"
msgstr "Passar propietats"
msgctxt "field:production.template,pass_quality:"
msgid "Pass Quality"
msgstr ""
msgctxt "field:production.template,pass_quality_sample:"
msgid "Pass Quality Sample"
msgstr ""
msgctxt "field:production.template,quantity:"
msgid "Quantity"
msgstr "Quantitat"
@ -1079,6 +1221,16 @@ msgctxt "field:quality.quantitative.test.line,product:"
msgid "Product"
msgstr "Productes"
#, fuzzy
msgctxt "field:quality.sample,products:"
msgid "Products"
msgstr "Productes"
#, fuzzy
msgctxt "field:quality.sample,reference:"
msgid "Reference"
msgstr "Referència"
msgctxt "field:stock.location,material:"
msgid "Material"
msgstr "Material"
@ -1115,6 +1267,19 @@ msgctxt "model:agronomics.container,name:"
msgid "Container"
msgstr "Envàs"
msgctxt "model:agronomics.contract,name:"
msgid "Agronomics Contract"
msgstr "Contracte"
msgctxt ""
"model:agronomics.contract-product.price_list.type-product.price_list,name:"
msgid "Agronomics Contract Product Price List Type Price List"
msgstr ""
msgctxt "model:agronomics.contract.line,name:"
msgid "Agronomics Contract Line"
msgstr "Línia de contracte"
msgctxt "model:agronomics.crop,name:"
msgid "Crop"
msgstr "Collita"
@ -1171,6 +1336,10 @@ msgctxt "model:agronomics.weighing.center,name:"
msgid "Weighing Center"
msgstr "Centre de pesada"
msgctxt "model:ir.action,name:act_agronomics_contract_action"
msgid "Agronomics Contract"
msgstr ""
msgctxt "model:ir.action,name:act_certification_tree"
msgid "Certification"
msgstr "Certificació"
@ -1211,6 +1380,10 @@ msgctxt "model:ir.action,name:act_plantation_tree"
msgid "Plantation"
msgstr "Plantació"
msgctxt "model:ir.action,name:act_product_price_list_type_form"
msgid "Product Price List Type"
msgstr ""
msgctxt "model:ir.action,name:act_product_qualitative_test_lines"
msgid "Qualitative Lines"
msgstr "Línies qualitatives"
@ -1247,6 +1420,11 @@ msgctxt "model:ir.action,name:act_production_template_tree"
msgid "Production Template"
msgstr "Plantilla de producció"
#, fuzzy
msgctxt "model:ir.action,name:act_quality_sample"
msgid "Samples"
msgstr "Mostres"
msgctxt "model:ir.action,name:act_stock_location_material"
msgid "Materials"
msgstr ""
@ -1264,6 +1442,22 @@ msgctxt ""
msgid "Create Cost Price Distribution"
msgstr "Crear Distribució de costos"
#, fuzzy
msgctxt ""
"model:ir.action.act_window.domain,name:act_agronomics_contract_active"
msgid "Active"
msgstr "Actiu"
#, fuzzy
msgctxt "model:ir.action.act_window.domain,name:act_agronomics_contract_all"
msgid "All"
msgstr "Tots"
#, fuzzy
msgctxt "model:ir.action.act_window.domain,name:act_agronomics_contract_draft"
msgid "Draft"
msgstr "Esborrany"
msgctxt "model:ir.action.act_window.domain,name:act_weighing_domain_all"
msgid "All"
msgstr "Tots"
@ -1289,6 +1483,12 @@ msgstr ""
"Els Beneficiares de les collites \"%(crop)s\" i la plantació "
"\"%(plantation)s\" han de sumar 100."
msgctxt "model:ir.message,text:msg_cant_active_contract"
msgid ""
"The contract \"%(contract)s\" cant be activated because the parcel "
"\"%(parcel)s\" is in another active contract."
msgstr ""
msgctxt "model:ir.message,text:msg_check_cost_distribution"
msgid "The production \"%(production)s\" has same products in cost distribution."
msgstr ""
@ -1338,9 +1538,11 @@ msgstr ""
msgctxt "model:ir.message,text:msg_not_assigned_weight"
msgid ""
"The weight in \"%(weighing)s\" is not distributed and its not being forced to analysis"
"The weight in \"%(weighing)s\" is not distributed and its not being forced "
"to analysis"
msgstr ""
"El pes en \"%(weighing)s\" no està totalment distibuit i no s'ha forçat l'anàlisi"
"El pes en \"%(weighing)s\" no està totalment distibuit i no s'ha forçat "
"l'anàlisi"
msgctxt "model:ir.message,text:msg_uom_not_fit"
msgid ""
@ -1366,6 +1568,26 @@ msgstr ""
"El producte \"%(product)s\" no pot tenir més d'una collita degut al seu "
"tipus agronòmic"
#, fuzzy
msgctxt "model:ir.model.button,string:agronomics_contract_active_button"
msgid "Active"
msgstr "Actiu"
#, fuzzy
msgctxt "model:ir.model.button,string:agronomics_contract_cancel_button"
msgid "Cancel"
msgstr "Cancel·lat"
#, fuzzy
msgctxt "model:ir.model.button,string:agronomics_contract_done_button"
msgid "Done"
msgstr "Realitzat"
#, fuzzy
msgctxt "model:ir.model.button,string:agronomics_contract_draft_button"
msgid "Draft"
msgstr "Esborrany"
msgctxt ""
"model:ir.model.button,string:production_output_distribution_done_button"
msgid "Done"
@ -1395,10 +1617,29 @@ msgctxt "model:ir.model.button,string:weighing_process_button"
msgid "Process"
msgstr "Processa"
msgctxt "model:ir.rule.group,name:rule_group_quality_configuration_company"
msgid "Quality Configuration Company"
msgstr ""
#, fuzzy
msgctxt "model:ir.rule.group,name:rule_group_quality_sample"
msgid "Quality Sample"
msgstr "Mostra de qualitat"
#, fuzzy
msgctxt "model:ir.sequence,name:sequence_sample"
msgid "Sample"
msgstr "Mostra"
msgctxt "model:ir.sequence,name:sequence_weighing"
msgid "Weighing"
msgstr "Pesada"
#, fuzzy
msgctxt "model:ir.sequence.type,name:sequence_type_sample"
msgid "Quality Sample"
msgstr "Mostra de qualitat"
msgctxt "model:ir.sequence.type,name:sequence_type_weighing"
msgid "Weighing"
msgstr "Pesada"
@ -1411,6 +1652,10 @@ msgctxt "model:ir.ui.menu,name:menu_agronomics"
msgid "Agronomics"
msgstr "Agronomics"
msgctxt "model:ir.ui.menu,name:menu_agronomics_contract_list"
msgid "Agronomics Contract"
msgstr ""
msgctxt "model:ir.ui.menu,name:menu_certification_list"
msgid "Certification"
msgstr "Certificació"
@ -1455,10 +1700,19 @@ msgctxt "model:ir.ui.menu,name:menu_plantation_list"
msgid "Plantation"
msgstr "Plantació"
msgctxt "model:ir.ui.menu,name:menu_product_price_list_type_form"
msgid "Product Price List Type"
msgstr ""
msgctxt "model:ir.ui.menu,name:menu_production_template_list"
msgid "Production Template"
msgstr "Plantilla de producció"
#, fuzzy
msgctxt "model:ir.ui.menu,name:menu_quality_sample"
msgid "Samples"
msgstr "Mostres"
msgctxt "model:ir.ui.menu,name:menu_weighing_center_list"
msgid "Weighing Center"
msgstr "Centre de pesada"
@ -1471,6 +1725,10 @@ msgctxt "model:ir.ui.menu,name:menuitem_stock_location_material"
msgid "Materials"
msgstr ""
msgctxt "model:product.price_list.type,name:"
msgid "Product Price List Type"
msgstr ""
msgctxt "model:product.product-agronomics.crop,name:"
msgid "Product - Crop"
msgstr "Producte - Collita"
@ -1483,6 +1741,10 @@ msgctxt "model:product.product-agronomics.ecological,name:"
msgid "Product - Ecological"
msgstr "Producte - Ecològic"
msgctxt "model:product.product-quality.sample,name:"
msgid "Product - Quality Sample"
msgstr ""
msgctxt "model:product.variety,name:"
msgid "Product Variety"
msgstr "Varietat"
@ -1524,53 +1786,62 @@ msgctxt "model:production.template.outputs-product.template,name:"
msgid "Production Template Inputs- Product Template"
msgstr ""
#, fuzzy
msgctxt "model:quality.proof,name:wine_alcohol_content"
msgid "Grau alcohol"
msgstr ""
msgstr "Grau alcohol"
#, fuzzy
msgctxt "model:quality.proof,name:wine_botrytis"
msgid "Botrytis"
msgstr ""
msgstr "Botrytis"
msgctxt "model:quality.proof,name:wine_clogging"
msgid "Colmatacio"
msgstr ""
#, fuzzy
msgctxt "model:quality.proof,name:wine_color_intensity"
msgid "Intensitat colorant"
msgstr ""
msgstr "Intensitat colorant"
#, fuzzy
msgctxt "model:quality.proof,name:wine_density"
msgid "Densitat"
msgstr ""
msgstr "Densitat"
#, fuzzy
msgctxt "model:quality.proof,name:wine_free_sulphur"
msgid "Sulfuros lliure"
msgstr ""
msgstr "Sulfuros lliure"
#, fuzzy
msgctxt "model:quality.proof,name:wine_glucose_fructose"
msgid "Glucosa/fructosa"
msgstr ""
msgstr "Glucosa/fructosa"
msgctxt "model:quality.proof,name:wine_lactic_acid"
msgid "Àcil lactica"
msgstr ""
#, fuzzy
msgctxt "model:quality.proof,name:wine_likely_alcohol_content"
msgid "Grau esperat"
msgstr ""
msgstr "Grau esperat"
#, fuzzy
msgctxt "model:quality.proof,name:wine_malic_acid"
msgid "Àcid màlic"
msgstr ""
msgstr "Àcid màlic"
msgctxt "model:quality.proof,name:wine_notes"
msgid "Observacions"
msgstr ""
#, fuzzy
msgctxt "model:quality.proof,name:wine_observing_phase"
msgid "Fase visual"
msgstr ""
msgstr "Fase visual"
msgctxt "model:quality.proof,name:wine_overall_impression"
msgid "Impresió general"
@ -1580,93 +1851,108 @@ msgctxt "model:quality.proof,name:wine_ph"
msgid "PH"
msgstr ""
#, fuzzy
msgctxt "model:quality.proof,name:wine_protein_stability"
msgid "Estabilitat proteica"
msgstr ""
msgstr "Estabilitat proteica"
msgctxt "model:quality.proof,name:wine_smelling_phase"
msgid "Fase olfactiva"
msgstr ""
#, fuzzy
msgctxt "model:quality.proof,name:wine_tartaric_acidity"
msgid "Acidesa tartàric"
msgstr ""
msgstr "Acidesa tartàric"
#, fuzzy
msgctxt "model:quality.proof,name:wine_tartaric_stability"
msgid "Estabilitat tartarica"
msgstr ""
msgstr "Estabilitat tartarica"
msgctxt "model:quality.proof,name:wine_tasting_phase"
msgid "Fase gustativa"
msgstr ""
#, fuzzy
msgctxt "model:quality.proof,name:wine_temperature"
msgid "Temperatura"
msgstr ""
msgstr "Temperatura"
#, fuzzy
msgctxt "model:quality.proof,name:wine_tone"
msgid "Tonalitat"
msgstr ""
msgstr "Tonalitat"
msgctxt "model:quality.proof,name:wine_total_sulphur"
msgid "Sulfurós Total"
msgstr ""
#, fuzzy
msgctxt "model:quality.proof,name:wine_turbidity"
msgid "Terbolesa"
msgstr ""
msgstr "Terbolesa"
msgctxt "model:quality.proof,name:wine_volatility"
msgid "Volatil"
msgstr ""
#, fuzzy
msgctxt "model:quality.proof.method,name:wine_alcohol_content_method"
msgid "Grau alcohol"
msgstr ""
msgstr "Grau alcohol"
#, fuzzy
msgctxt "model:quality.proof.method,name:wine_botrytis_method"
msgid "Botrytis"
msgstr ""
msgstr "Botrytis"
msgctxt "model:quality.proof.method,name:wine_clogging_method"
msgid "Colmatacio"
msgstr ""
#, fuzzy
msgctxt "model:quality.proof.method,name:wine_color_intensity_method"
msgid "Intensitat colorant"
msgstr ""
msgstr "Intensitat colorant"
#, fuzzy
msgctxt "model:quality.proof.method,name:wine_density_method"
msgid "Densitat"
msgstr ""
msgstr "Densitat"
#, fuzzy
msgctxt "model:quality.proof.method,name:wine_free_sulphur_method"
msgid "Sulfuros lliure"
msgstr ""
msgstr "Sulfuros lliure"
#, fuzzy
msgctxt "model:quality.proof.method,name:wine_glucose_fructose_method"
msgid "Glucosa/fructosa"
msgstr ""
msgstr "Glucosa/fructosa"
msgctxt "model:quality.proof.method,name:wine_lactic_acid_method"
msgid "Àcil lactica"
msgstr ""
#, fuzzy
msgctxt "model:quality.proof.method,name:wine_likely_alcohol_content_method"
msgid "Grau esperat"
msgstr ""
msgstr "Grau esperat"
#, fuzzy
msgctxt "model:quality.proof.method,name:wine_malic_acid_method"
msgid "Àcid màlic"
msgstr ""
msgstr "Àcid màlic"
msgctxt "model:quality.proof.method,name:wine_notes_method"
msgid "Observacions"
msgstr ""
#, fuzzy
msgctxt "model:quality.proof.method,name:wine_observing_phase_method"
msgid "Fase visual"
msgstr ""
msgstr "Fase visual"
msgctxt "model:quality.proof.method,name:wine_overall_impression_method"
msgid "Impresió general"
@ -1676,41 +1962,47 @@ msgctxt "model:quality.proof.method,name:wine_ph_method"
msgid "PH"
msgstr ""
#, fuzzy
msgctxt "model:quality.proof.method,name:wine_protein_stability_method"
msgid "Estabilitat proteica"
msgstr ""
msgstr "Estabilitat proteica"
msgctxt "model:quality.proof.method,name:wine_smelling_phase_method"
msgid "Fase olfactiva"
msgstr ""
#, fuzzy
msgctxt "model:quality.proof.method,name:wine_tartaric_acidity_method"
msgid "Acidesa tartàric"
msgstr ""
msgstr "Acidesa tartàric"
#, fuzzy
msgctxt "model:quality.proof.method,name:wine_tartaric_stability_method"
msgid "Estabilitat tartarica"
msgstr ""
msgstr "Estabilitat tartarica"
msgctxt "model:quality.proof.method,name:wine_tasting_phase_method"
msgid "Fase gustativa"
msgstr ""
#, fuzzy
msgctxt "model:quality.proof.method,name:wine_temperature_method"
msgid "Temperatura"
msgstr ""
msgstr "Temperatura"
#, fuzzy
msgctxt "model:quality.proof.method,name:wine_tone_method"
msgid "Tonalitat"
msgstr ""
msgstr "Tonalitat"
msgctxt "model:quality.proof.method,name:wine_total_sulphur_method"
msgid "Sulfurós Total"
msgstr ""
#, fuzzy
msgctxt "model:quality.proof.method,name:wine_turbidity_method"
msgid "Terbolesa"
msgstr ""
msgstr "Terbolesa"
msgctxt "model:quality.proof.method,name:wine_volatility_method"
msgid "Volatil"
@ -1724,10 +2016,30 @@ msgctxt "model:res.group,name:group_agronomics_admin"
msgid "Agronomics Administration"
msgstr "Administració Agronomics"
msgctxt "model:res.group,name:group_quality_control_sample"
msgid "Quality Samples"
msgstr ""
msgctxt "model:stock.location.material,name:"
msgid "Location Material"
msgstr "Material Ubicació"
msgctxt "selection:agronomics.contract,state:"
msgid "Active"
msgstr "Actiu"
msgctxt "selection:agronomics.contract,state:"
msgid "Cancelled"
msgstr "Cancel·lat"
msgctxt "selection:agronomics.contract,state:"
msgid "Done"
msgstr "Realitzat"
msgctxt "selection:agronomics.contract,state:"
msgid "Draft"
msgstr "Esborrany"
msgctxt "selection:agronomics.weighing,state:"
msgid "Cancelled"
msgstr "Cancel·lat"

View file

@ -10,9 +10,9 @@ msgctxt "field:agronomics.beneficiary,party:"
msgid "Beneficiary"
msgstr "Beneficiario"
msgctxt "field:agronomics.beneficiary,percent:"
msgid "Percent"
msgstr "Porcentaje"
msgctxt "field:agronomics.beneficiary,product_price_list_type:"
msgid "Product Price List Type"
msgstr ""
msgctxt "field:agronomics.beneficiary,weighing:"
msgid "Weighing"
@ -34,6 +34,92 @@ msgctxt "field:agronomics.container,name:"
msgid "Name"
msgstr "Nombre"
msgctxt "field:agronomics.contract,crop:"
msgid "Crop"
msgstr "Cosecha"
msgctxt "field:agronomics.contract,end_date:"
msgid "End Date"
msgstr "Fecha finalización"
msgctxt "field:agronomics.contract,lines:"
msgid "Lines"
msgstr "Líneas"
msgctxt "field:agronomics.contract,price_list_types:"
msgid "Price List Types"
msgstr "Tipo de tarifa"
msgctxt "field:agronomics.contract,producer:"
msgid "Producer"
msgstr "Productor"
msgctxt "field:agronomics.contract,reference:"
msgid "Reference"
msgstr "Referencia"
msgctxt "field:agronomics.contract,start_date:"
msgid "Start Date"
msgstr "Fecha Inicio"
msgctxt "field:agronomics.contract,state:"
msgid "State"
msgstr "Estado"
msgctxt "field:agronomics.contract,weighings:"
msgid "Weighings"
msgstr "Pesadas"
msgctxt ""
"field:agronomics.contract-product.price_list.type-"
"product.price_list,contract:"
msgid "Contract"
msgstr "Contrato"
msgctxt ""
"field:agronomics.contract-product.price_list.type-"
"product.price_list,price_list:"
msgid "Price List"
msgstr "Tarifa"
msgctxt ""
"field:agronomics.contract-product.price_list.type-"
"product.price_list,price_list_type:"
msgid "Price List Type"
msgstr "Tipo de tarifa"
msgctxt "field:agronomics.contract.line,agreed_quantity:"
msgid "Agreed Quantity"
msgstr "Cantidad pactada"
msgctxt "field:agronomics.contract.line,contract:"
msgid "Contract"
msgstr "Contrato"
msgctxt "field:agronomics.contract.line,parcel:"
msgid "Parcel"
msgstr "Parcela"
msgctxt "field:agronomics.contract.line,product:"
msgid "Product"
msgstr "Productos"
msgctxt "field:agronomics.contract.line,purchased_quantity:"
msgid "Purchased Quantity"
msgstr "Cantidad comprada"
msgctxt "field:agronomics.contract.line,remaining_quantity:"
msgid "Remaining Quantity"
msgstr "Cantidad restante"
msgctxt "field:agronomics.contract.line,unit:"
msgid "Unit"
msgstr "Unidad"
msgctxt "field:agronomics.contract.line,unit_digits:"
msgid "Unit Digits"
msgstr "Dígitos unidad"
msgctxt "field:agronomics.crop,code:"
msgid "Code"
msgstr "Código"
@ -126,10 +212,6 @@ msgctxt "field:agronomics.parcel,beneficiaries:"
msgid "Beneficiaries"
msgstr "Beneficiarios"
msgctxt "field:agronomics.parcel,purchased_quantity:"
msgid "Bought Quantity"
msgstr "Cantidad comprada"
msgctxt "field:agronomics.parcel,crop:"
msgid "Crop"
msgstr "Cosecha"
@ -170,6 +252,10 @@ msgctxt "field:agronomics.parcel,product:"
msgid "Product"
msgstr "Producto"
msgctxt "field:agronomics.parcel,purchased_quantity:"
msgid "Bought Quantity"
msgstr "Cantidad comprada"
msgctxt "field:agronomics.parcel,remaining_quantity:"
msgid "Remainig Quantity"
msgstr "Cantidad restante"
@ -222,6 +308,14 @@ msgctxt "field:agronomics.plantation,party:"
msgid "Party"
msgstr "Terceros"
msgctxt "field:agronomics.plantation,plantation_owner:"
msgid "Plantation Owner"
msgstr ""
msgctxt "field:agronomics.plantation,plantation_year:"
msgid "Plantation Year"
msgstr ""
msgctxt "field:agronomics.weighing,all_do:"
msgid "All DO"
msgstr "Todos los DO"
@ -366,6 +460,15 @@ msgctxt "field:product.configuration,variant_deactivation_time:"
msgid "Variant Deactivation Time"
msgstr "Tiempo para desactivar variantes"
msgctxt "field:product.price_list,product_price_list_type:"
msgid "Product Price List Type"
msgstr ""
#, fuzzy
msgctxt "field:product.price_list.type,name:"
msgid "Name"
msgstr "Nombre"
msgctxt "field:product.product,agronomic_type:"
msgid "Agronomic Type"
msgstr "Tipo Agronómico"
@ -402,9 +505,13 @@ msgctxt "field:product.product,production_quality_template:"
msgid "Production Quality Template"
msgstr "Plantilla calidad producción"
msgctxt "field:product.product,quality_sample:"
msgid "Quality Sample"
msgstr "Muestra de calidad"
msgctxt "field:product.product,quality_samples:"
msgid "Quality Samples"
msgstr ""
msgctxt "field:product.product,quality_tests:"
msgid "Quality Tests"
msgstr ""
msgctxt "field:product.product,quality_weighing:"
msgid "Quality Weighing"
@ -826,6 +933,16 @@ msgctxt "field:product.product-agronomics.ecological,product:"
msgid "Product"
msgstr "Productos"
#, fuzzy
msgctxt "field:product.product-quality.sample,product:"
msgid "Product"
msgstr "Productos"
#, fuzzy
msgctxt "field:product.product-quality.sample,sample:"
msgid "Sample"
msgstr "Muestra"
msgctxt "field:product.template,agronomic_type:"
msgid "Agronomic Type"
msgstr "Tipo Agronómico"
@ -886,6 +1003,18 @@ msgctxt "field:production,output_distribution:"
msgid "Output Distribution"
msgstr "Distribución Salidas"
msgctxt "field:production,pass_certification:"
msgid "Pass Certification"
msgstr ""
msgctxt "field:production,pass_quality:"
msgid "Pass Quality"
msgstr ""
msgctxt "field:production,pass_quality_sample:"
msgid "Pass Quality Sample"
msgstr ""
msgctxt "field:production,production_template:"
msgid "Production Template"
msgstr "Plantilla producción"
@ -1017,10 +1146,22 @@ msgctxt "field:production.template,outputs:"
msgid "Outputs"
msgstr "Salidas"
msgctxt "field:production.template,pass_certification:"
msgid "Pass Certification"
msgstr ""
msgctxt "field:production.template,pass_feature:"
msgid "Pass on Feature"
msgstr "Pasar propiedades"
msgctxt "field:production.template,pass_quality:"
msgid "Pass Quality"
msgstr ""
msgctxt "field:production.template,pass_quality_sample:"
msgid "Pass Quality Sample"
msgstr ""
msgctxt "field:production.template,quantity:"
msgid "Quantity"
msgstr "Cantidad"
@ -1079,6 +1220,16 @@ msgctxt "field:quality.quantitative.test.line,product:"
msgid "Product"
msgstr "Productos"
#, fuzzy
msgctxt "field:quality.sample,products:"
msgid "Products"
msgstr "Productos"
#, fuzzy
msgctxt "field:quality.sample,reference:"
msgid "Reference"
msgstr "Referencia"
msgctxt "field:stock.location,material:"
msgid "Material"
msgstr "Material"
@ -1115,6 +1266,19 @@ msgctxt "model:agronomics.container,name:"
msgid "Container"
msgstr "Envase"
msgctxt "model:agronomics.contract,name:"
msgid "Agronomics Contract"
msgstr "Contrato"
msgctxt ""
"model:agronomics.contract-product.price_list.type-product.price_list,name:"
msgid "Agronomics Contract Product Price List Type Price List"
msgstr ""
msgctxt "model:agronomics.contract.line,name:"
msgid "Agronomics Contract Line"
msgstr "Línea de contacto"
msgctxt "model:agronomics.crop,name:"
msgid "Crop"
msgstr "Cosecha"
@ -1171,6 +1335,10 @@ msgctxt "model:agronomics.weighing.center,name:"
msgid "Weighing Center"
msgstr "Centro de pesada"
msgctxt "model:ir.action,name:act_agronomics_contract_action"
msgid "Agronomics Contract"
msgstr ""
msgctxt "model:ir.action,name:act_certification_tree"
msgid "Certification"
msgstr "Certificación"
@ -1211,6 +1379,10 @@ msgctxt "model:ir.action,name:act_plantation_tree"
msgid "Plantation"
msgstr "Plantación"
msgctxt "model:ir.action,name:act_product_price_list_type_form"
msgid "Product Price List Type"
msgstr ""
msgctxt "model:ir.action,name:act_product_qualitative_test_lines"
msgid "Qualitative Lines"
msgstr "Líneas cualitativas"
@ -1248,6 +1420,11 @@ msgctxt "model:ir.action,name:act_production_template_tree"
msgid "Production Template"
msgstr "Plantilla producción"
#, fuzzy
msgctxt "model:ir.action,name:act_quality_sample"
msgid "Samples"
msgstr "Muestras"
msgctxt "model:ir.action,name:act_stock_location_material"
msgid "Materials"
msgstr ""
@ -1265,6 +1442,22 @@ msgctxt ""
msgid "Create Cost Price Distribution"
msgstr "Crear distribución de precio de costo"
#, fuzzy
msgctxt ""
"model:ir.action.act_window.domain,name:act_agronomics_contract_active"
msgid "Active"
msgstr "Activo"
#, fuzzy
msgctxt "model:ir.action.act_window.domain,name:act_agronomics_contract_all"
msgid "All"
msgstr "Todos"
#, fuzzy
msgctxt "model:ir.action.act_window.domain,name:act_agronomics_contract_draft"
msgid "Draft"
msgstr "Esborany"
msgctxt "model:ir.action.act_window.domain,name:act_weighing_domain_all"
msgid "All"
msgstr "Todos"
@ -1290,6 +1483,12 @@ msgstr ""
"Los beneficiarios de la cosecha \"%(crop)s\" y de la plantación "
"\"%(plantation)s\" han de sumar 100."
msgctxt "model:ir.message,text:msg_cant_active_contract"
msgid ""
"The contract \"%(contract)s\" cant be activated because the parcel "
"\"%(parcel)s\" is in another active contract."
msgstr ""
msgctxt "model:ir.message,text:msg_check_cost_distribution"
msgid "The production \"%(production)s\" has same products in cost distribution."
msgstr ""
@ -1340,9 +1539,11 @@ msgstr ""
msgctxt "model:ir.message,text:msg_not_assigned_weight"
msgid ""
"The weight in \"%(weighin)s\" is not distributed and its not being forced to analysis"
"The weight in \"%(weighing)s\" is not distributed and its not being forced "
"to analysis"
msgstr ""
"El peso en \"%(weighin)s\" no está totalmente distribuido i no se ha forzado el anàlisis"
"El peso en \"%(weighin)s\" no está totalmente distribuido i no se ha forzado"
" el anàlisis"
msgctxt "model:ir.message,text:msg_uom_not_fit"
msgid ""
@ -1368,6 +1569,26 @@ msgstr ""
"El producto \"%(product)s\" no puede tener más de una cosecha debido a su "
"Tipo Agronómico"
#, fuzzy
msgctxt "model:ir.model.button,string:agronomics_contract_active_button"
msgid "Active"
msgstr "Activo"
#, fuzzy
msgctxt "model:ir.model.button,string:agronomics_contract_cancel_button"
msgid "Cancel"
msgstr "Cancel·lar"
#, fuzzy
msgctxt "model:ir.model.button,string:agronomics_contract_done_button"
msgid "Done"
msgstr "Realizar"
#, fuzzy
msgctxt "model:ir.model.button,string:agronomics_contract_draft_button"
msgid "Draft"
msgstr "Esborany"
msgctxt ""
"model:ir.model.button,string:production_output_distribution_done_button"
msgid "Done"
@ -1397,10 +1618,29 @@ msgctxt "model:ir.model.button,string:weighing_process_button"
msgid "Process"
msgstr "Procesar"
msgctxt "model:ir.rule.group,name:rule_group_quality_configuration_company"
msgid "Quality Configuration Company"
msgstr ""
#, fuzzy
msgctxt "model:ir.rule.group,name:rule_group_quality_sample"
msgid "Quality Sample"
msgstr "Muestra de calidad"
#, fuzzy
msgctxt "model:ir.sequence,name:sequence_sample"
msgid "Sample"
msgstr "Muestra"
msgctxt "model:ir.sequence,name:sequence_weighing"
msgid "Weighing"
msgstr "Pesada"
#, fuzzy
msgctxt "model:ir.sequence.type,name:sequence_type_sample"
msgid "Quality Sample"
msgstr "Muestra de calidad"
msgctxt "model:ir.sequence.type,name:sequence_type_weighing"
msgid "Weighing"
msgstr "Pesada"
@ -1413,6 +1653,10 @@ msgctxt "model:ir.ui.menu,name:menu_agronomics"
msgid "Agronomics"
msgstr "Agronomics"
msgctxt "model:ir.ui.menu,name:menu_agronomics_contract_list"
msgid "Agronomics Contract"
msgstr ""
msgctxt "model:ir.ui.menu,name:menu_certification_list"
msgid "Certification"
msgstr "Certificación"
@ -1457,10 +1701,19 @@ msgctxt "model:ir.ui.menu,name:menu_plantation_list"
msgid "Plantation"
msgstr "Plantación"
msgctxt "model:ir.ui.menu,name:menu_product_price_list_type_form"
msgid "Product Price List Type"
msgstr ""
msgctxt "model:ir.ui.menu,name:menu_production_template_list"
msgid "Production Template"
msgstr "Plantilla producción"
#, fuzzy
msgctxt "model:ir.ui.menu,name:menu_quality_sample"
msgid "Samples"
msgstr "Muestras"
msgctxt "model:ir.ui.menu,name:menu_weighing_center_list"
msgid "Weighing Center"
msgstr "Centro de pesada"
@ -1473,6 +1726,10 @@ msgctxt "model:ir.ui.menu,name:menuitem_stock_location_material"
msgid "Materials"
msgstr ""
msgctxt "model:product.price_list.type,name:"
msgid "Product Price List Type"
msgstr ""
msgctxt "model:product.product-agronomics.crop,name:"
msgid "Product - Crop"
msgstr "Producto - Cosecha"
@ -1485,6 +1742,10 @@ msgctxt "model:product.product-agronomics.ecological,name:"
msgid "Product - Ecological"
msgstr "Producto - Ecológico"
msgctxt "model:product.product-quality.sample,name:"
msgid "Product - Quality Sample"
msgstr ""
msgctxt "model:product.variety,name:"
msgid "Product Variety"
msgstr "Variedad de producto"
@ -1538,21 +1799,25 @@ msgctxt "model:quality.proof,name:wine_clogging"
msgid "Colmatacio"
msgstr ""
#, fuzzy
msgctxt "model:quality.proof,name:wine_color_intensity"
msgid "Intensitat colorant"
msgstr ""
msgstr "Intensitat colorant"
#, fuzzy
msgctxt "model:quality.proof,name:wine_density"
msgid "Densitat"
msgstr ""
msgstr "Densitat"
#, fuzzy
msgctxt "model:quality.proof,name:wine_free_sulphur"
msgid "Sulfuros lliure"
msgstr ""
msgstr "Sulfuros lliure"
#, fuzzy
msgctxt "model:quality.proof,name:wine_glucose_fructose"
msgid "Glucosa/fructosa"
msgstr ""
msgstr "Glucosa/fructosa"
msgctxt "model:quality.proof,name:wine_lactic_acid"
msgid "Àcil lactica"
@ -1562,17 +1827,19 @@ msgctxt "model:quality.proof,name:wine_likely_alcohol_content"
msgid "Grau esperat"
msgstr ""
#, fuzzy
msgctxt "model:quality.proof,name:wine_malic_acid"
msgid "Àcid màlic"
msgstr ""
msgstr "Àcid màlic"
msgctxt "model:quality.proof,name:wine_notes"
msgid "Observacions"
msgstr "Observaciones"
#, fuzzy
msgctxt "model:quality.proof,name:wine_observing_phase"
msgid "Fase visual"
msgstr ""
msgstr "Fase visual"
msgctxt "model:quality.proof,name:wine_overall_impression"
msgid "Impresió general"
@ -1582,41 +1849,47 @@ msgctxt "model:quality.proof,name:wine_ph"
msgid "PH"
msgstr ""
#, fuzzy
msgctxt "model:quality.proof,name:wine_protein_stability"
msgid "Estabilitat proteica"
msgstr ""
msgstr "Estabilitat proteica"
msgctxt "model:quality.proof,name:wine_smelling_phase"
msgid "Fase olfactiva"
msgstr ""
#, fuzzy
msgctxt "model:quality.proof,name:wine_tartaric_acidity"
msgid "Acidesa tartàric"
msgstr ""
msgstr "Acidesa tartàric"
#, fuzzy
msgctxt "model:quality.proof,name:wine_tartaric_stability"
msgid "Estabilitat tartarica"
msgstr ""
msgstr "Estabilitat tartarica"
msgctxt "model:quality.proof,name:wine_tasting_phase"
msgid "Fase gustativa"
msgstr ""
#, fuzzy
msgctxt "model:quality.proof,name:wine_temperature"
msgid "Temperatura"
msgstr ""
msgstr "Temperatura"
#, fuzzy
msgctxt "model:quality.proof,name:wine_tone"
msgid "Tonalitat"
msgstr ""
msgstr "Tonalitat"
msgctxt "model:quality.proof,name:wine_total_sulphur"
msgid "Sulfurós Total"
msgstr ""
#, fuzzy
msgctxt "model:quality.proof,name:wine_turbidity"
msgid "Terbolesa"
msgstr ""
msgstr "Terbolesa"
msgctxt "model:quality.proof,name:wine_volatility"
msgid "Volatil"
@ -1634,21 +1907,25 @@ msgctxt "model:quality.proof.method,name:wine_clogging_method"
msgid "Colmatacio"
msgstr ""
#, fuzzy
msgctxt "model:quality.proof.method,name:wine_color_intensity_method"
msgid "Intensitat colorant"
msgstr ""
msgstr "Intensitat colorant"
#, fuzzy
msgctxt "model:quality.proof.method,name:wine_density_method"
msgid "Densitat"
msgstr ""
msgstr "Densitat"
#, fuzzy
msgctxt "model:quality.proof.method,name:wine_free_sulphur_method"
msgid "Sulfuros lliure"
msgstr ""
msgstr "Sulfuros lliure"
#, fuzzy
msgctxt "model:quality.proof.method,name:wine_glucose_fructose_method"
msgid "Glucosa/fructosa"
msgstr ""
msgstr "Glucosa/fructosa"
msgctxt "model:quality.proof.method,name:wine_lactic_acid_method"
msgid "Àcil lactica"
@ -1658,17 +1935,19 @@ msgctxt "model:quality.proof.method,name:wine_likely_alcohol_content_method"
msgid "Grau esperat"
msgstr ""
#, fuzzy
msgctxt "model:quality.proof.method,name:wine_malic_acid_method"
msgid "Àcid màlic"
msgstr ""
msgstr "Àcid màlic"
msgctxt "model:quality.proof.method,name:wine_notes_method"
msgid "Observacions"
msgstr "Observaciones"
#, fuzzy
msgctxt "model:quality.proof.method,name:wine_observing_phase_method"
msgid "Fase visual"
msgstr ""
msgstr "Fase visual"
msgctxt "model:quality.proof.method,name:wine_overall_impression_method"
msgid "Impresió general"
@ -1678,41 +1957,47 @@ msgctxt "model:quality.proof.method,name:wine_ph_method"
msgid "PH"
msgstr ""
#, fuzzy
msgctxt "model:quality.proof.method,name:wine_protein_stability_method"
msgid "Estabilitat proteica"
msgstr ""
msgstr "Estabilitat proteica"
msgctxt "model:quality.proof.method,name:wine_smelling_phase_method"
msgid "Fase olfactiva"
msgstr ""
#, fuzzy
msgctxt "model:quality.proof.method,name:wine_tartaric_acidity_method"
msgid "Acidesa tartàric"
msgstr ""
msgstr "Acidesa tartàric"
#, fuzzy
msgctxt "model:quality.proof.method,name:wine_tartaric_stability_method"
msgid "Estabilitat tartarica"
msgstr ""
msgstr "Estabilitat tartarica"
msgctxt "model:quality.proof.method,name:wine_tasting_phase_method"
msgid "Fase gustativa"
msgstr ""
#, fuzzy
msgctxt "model:quality.proof.method,name:wine_temperature_method"
msgid "Temperatura"
msgstr ""
msgstr "Temperatura"
#, fuzzy
msgctxt "model:quality.proof.method,name:wine_tone_method"
msgid "Tonalitat"
msgstr ""
msgstr "Tonalitat"
msgctxt "model:quality.proof.method,name:wine_total_sulphur_method"
msgid "Sulfurós Total"
msgstr ""
#, fuzzy
msgctxt "model:quality.proof.method,name:wine_turbidity_method"
msgid "Terbolesa"
msgstr ""
msgstr "Terbolesa"
msgctxt "model:quality.proof.method,name:wine_volatility_method"
msgid "Volatil"
@ -1726,10 +2011,30 @@ msgctxt "model:res.group,name:group_agronomics_admin"
msgid "Agronomics Administration"
msgstr "Agronomics Administración"
msgctxt "model:res.group,name:group_quality_control_sample"
msgid "Quality Samples"
msgstr ""
msgctxt "model:stock.location.material,name:"
msgid "Location Material"
msgstr "Material Ubicación"
msgctxt "selection:agronomics.contract,state:"
msgid "Active"
msgstr "Activo"
msgctxt "selection:agronomics.contract,state:"
msgid "Cancelled"
msgstr "Cancelado"
msgctxt "selection:agronomics.contract,state:"
msgid "Done"
msgstr "Realizar"
msgctxt "selection:agronomics.contract,state:"
msgid "Draft"
msgstr "Esborany"
msgctxt "selection:agronomics.weighing,state:"
msgid "Cancelled"
msgstr "Cancelado"

View file

@ -39,6 +39,8 @@ this repository contains the full copyright notices and license terms. -->
<record model="ir.message" id="msg_not_assigned_weight">
<field name="text">The weight in "%(weighing)s" is not distributed and its not being forced to analysis</field>
</record>
<record model="ir.message" id="msg_cant_active_contract">
<field name="text">The contract "%(contract)s" cant be activated because the parcel "%(parcel)s" is in another active contract.</field>
</record>
</data>
</tryton>

View file

@ -2,9 +2,7 @@
# this repository contains the full copyright notices and license terms.
from trytond.model import fields, ModelSQL, ModelView
from trytond.pool import Pool
from trytond.i18n import gettext
from trytond.exceptions import UserError
from trytond.transaction import Transaction
class Enclosure(ModelSQL, ModelView):
"Enclosure"
@ -165,9 +163,7 @@ class Beneficiaries(ModelSQL, ModelView):
@classmethod
def __register__(cls, module_name):
cursor = Transaction().connection.cursor()
table = cls.__table_handler__(module_name)
sql_table = cls.__table__()
# Migration from #047773
if table.column_exist('percent'):

View file

@ -13,6 +13,7 @@ depends:
production
stock
xml:
contract.xml
plot.xml
party.xml
product.xml

35
view/contract_form.xml Normal file
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="reference"/>
<field name="reference"/>
<newline/>
<label name="producer"/>
<field name="producer"/>
<label name="crop"/>
<field name="crop"/>
<label name="start_date"/>
<field name="start_date"/>
<label name="end_date"/>
<field name="end_date"/>
<notebook>
<page name="lines">
<field name="lines" colspan="4"/>
</page>
<page name="price_list_types">
<field name="price_list_types" colspan="4"/>
</page>
<page name="weighings">
<field name="weighings" colspan="4"/>
</page>
</notebook>
<group id="buttons" col="6" colspan="4">
<label name="state"/>
<field name="state"/>
<button name="draft"/>
<button name="active"/>
<button name="cancel"/>
<button name="done"/>
</group>
</form>

View file

@ -0,0 +1,19 @@
<?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="parcel"/>
<field name="parcel"/>
<label name="contract"/>
<field name="contract"/>
<label name="product"/>
<field name="product"/>
<label name="unit"/>
<field name="unit"/>
<label name="agreed_quantity"/>
<field name="agreed_quantity"/>
<label name="purchased_quantity"/>
<field name="purchased_quantity"/>
<label name="remaining_quantity"/>
<field name="remaining_quantity"/>
</form>

View file

@ -0,0 +1,11 @@
<?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. -->
<tree>
<field name="contract"/>
<field name="parcel"/>
<field name="product"/>
<field name="agreed_quantity"/>
<field name="purchased_quantity"/>
<field name="remaining_quantity"/>
</tree>

View file

@ -0,0 +1,12 @@
<?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="contract"/>
<field name="contract"/>
<newline/>
<label name="price_list_type"/>
<field name="price_list_type"/>
<label name="price_list"/>
<field name="price_list"/>
</form>

View file

@ -0,0 +1,7 @@
<?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. -->
<tree editable="1">
<field name="price_list_type"/>
<field name="price_list"/>
</tree>

10
view/contract_tree.xml Normal file
View file

@ -0,0 +1,10 @@
<?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. -->
<tree>
<field name="reference"/>
<field name="producer"/>
<field name="crop"/>
<field name="start_date"/>
<field name="end_date"/>
</tree>

View file

@ -6,8 +6,6 @@ from trytond.pool import Pool
from trytond.i18n import gettext
from trytond.exceptions import UserError
from trytond.transaction import Transaction
from trytond.wizard import (Wizard, StateView, StateTransition, StateAction,
Button)
from datetime import datetime
class WeighingCenter(ModelSQL, ModelView):
@ -40,7 +38,7 @@ class Weighing(Workflow, ModelSQL, ModelView):
'required': True
}, depends=['state'])
purchase_contract = fields.Many2One('purchase.contract',
purchase_contract = fields.Many2One('agronomics.contract',
'Purchase Contract', states={
'readonly': Eval('state').in_(READONLY),
'required': True
@ -244,6 +242,9 @@ class Weighing(Workflow, ModelSQL, ModelView):
@fields.depends('plantations')
def on_change_with_purchase_contract(self):
pool = Pool()
ContractLine = pool.get('agronomics.contract.line')
parcel = self.get_parcel()
if not parcel:
return
@ -251,12 +252,15 @@ class Weighing(Workflow, ModelSQL, ModelView):
producer = parcel.producer and parcel.producer.id
if not producer:
return
Contract = Pool().get('purchase.contract')
contracts = Contract.search([('party', '=', producer)], limit=1)
if not contracts:
contract_lines = ContractLine.search([
('parcel', '=', parcel),
('contract.producer', '=', producer),
('contract.state', '=', 'active'),
], limit=1)
if not contract_lines:
return
contract, = contracts
contract = contract_lines[0].contract
return contract and contract.id
@fields.depends('weight', 'tara')