From ae639420cfbaf3ab48caf062a0d5783d63c8bad0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=80ngel=20=C3=80lvarez?= Date: Wed, 30 Jun 2021 12:16:37 +0200 Subject: [PATCH] add references on party --- __init__.py | 3 +++ locale/ca.po | 10 +++++++++- locale/es.po | 10 +++++++++- party.py | 11 +++++++++++ party.xml | 12 ++++++++++++ tryton.cfg | 1 + view/parcel_form.xml | 4 ++-- view/party_form.xml | 14 ++++++++++++++ 8 files changed, 61 insertions(+), 4 deletions(-) create mode 100644 party.py create mode 100644 party.xml create mode 100644 view/party_form.xml diff --git a/__init__.py b/__init__.py index 1725cb2..395ad35 100644 --- a/__init__.py +++ b/__init__.py @@ -2,10 +2,13 @@ # 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 party from . import plot + def register(): Pool.register( + party.Party, plot.Enclosure, plot.Crop, plot.DenominationOrigin, diff --git a/locale/ca.po b/locale/ca.po index 824786f..9f593dc 100644 --- a/locale/ca.po +++ b/locale/ca.po @@ -123,7 +123,7 @@ msgid "Irrigation" msgstr "Irrigació" msgctxt "field:agronomics.parcel,max_production:" -msgid "Max. Production" +msgid "Max Production" msgstr "Producció Màxima" msgctxt "field:agronomics.parcel,plant_number:" @@ -190,6 +190,14 @@ msgctxt "field:agronomics.plantation,party:" msgid "Party" msgstr "Tercers" +msgctxt "field:party.party,parcels:" +msgid "Parcels" +msgstr "Parceles" + +msgctxt "field:party.party,plantations:" +msgid "Plantation" +msgstr "Plantacións" + msgctxt "model:agronomics.beneficiary,name:" msgid "Beneficiaries" msgstr "Beneficiaris" diff --git a/locale/es.po b/locale/es.po index 4a17de4..1ce04e2 100644 --- a/locale/es.po +++ b/locale/es.po @@ -123,7 +123,7 @@ msgid "Irrigation" msgstr "Irrigación" msgctxt "field:agronomics.parcel,max_production:" -msgid "Max. Production" +msgid "Max Production" msgstr "Producción Máxima" msgctxt "field:agronomics.parcel,plant_number:" @@ -190,6 +190,14 @@ msgctxt "field:agronomics.plantation,party:" msgid "Party" msgstr "Terceros" +msgctxt "field:party.party,parcels:" +msgid "Parcels" +msgstr "Parcelas" + +msgctxt "field:party.party,plantations:" +msgid "Plantation" +msgstr "Plantaciónes" + msgctxt "model:agronomics.beneficiary,name:" msgid "Beneficiaries" msgstr "Beneficiarios" diff --git a/party.py b/party.py new file mode 100644 index 0000000..1deccb0 --- /dev/null +++ b/party.py @@ -0,0 +1,11 @@ +# The COPYRIGHT file at the top level of this repository contains the full +# copyright notices and license terms. +from trytond.model import fields +from trytond.pool import PoolMeta + +class Party(metaclass=PoolMeta): + __name__ = 'party.party' + + plantations = fields.One2Many('agronomics.plantation', 'party', + 'Plantation') + parcels = fields.One2Many('agronomics.parcel', 'producer', 'Parcels') diff --git a/party.xml b/party.xml new file mode 100644 index 0000000..d38f4b3 --- /dev/null +++ b/party.xml @@ -0,0 +1,12 @@ + + + + + + party.party + + party_form + + + diff --git a/tryton.cfg b/tryton.cfg index 8c380b6..e0810ab 100644 --- a/tryton.cfg +++ b/tryton.cfg @@ -6,4 +6,5 @@ depends: product_classification_taxonomic xml: plot.xml + party.xml message.xml diff --git a/view/parcel_form.xml b/view/parcel_form.xml index 741518d..152c896 100644 --- a/view/parcel_form.xml +++ b/view/parcel_form.xml @@ -3,10 +3,10 @@