Default Incoterm party

This commit is contained in:
Raimon Esteve 2017-05-02 23:22:25 +02:00
parent 08c9303f29
commit 099a25657a
7 changed files with 72 additions and 5 deletions

View File

@ -1,11 +1,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 .incoterm import *
from . import incoterm
from . import party
def register():
Pool.register(
Category,
Incoterm,
incoterm.Category,
incoterm.Incoterm,
party.Party,
module='incoterm', type_='model')

View File

@ -40,7 +40,7 @@ msgstr "Data de modificació"
msgctxt "field:incoterm,write_uid:"
msgid "Write User"
msgstr "Usuari modificació"
msgstr "Usuari de modificació"
msgctxt "field:incoterm.category,create_date:"
msgid "Create Date"
@ -68,7 +68,15 @@ msgstr "Data de modificació"
msgctxt "field:incoterm.category,write_uid:"
msgid "Write User"
msgstr "Usuari modificació"
msgstr "Usuari de modificació"
msgctxt "field:party.party,incoterm:"
msgid "Incoterm"
msgstr "Incoterm"
msgctxt "field:party.party,incoterm_place:"
msgid "Incoterm Name Place"
msgstr "Nom del lloc incoterm"
msgctxt "model:incoterm,name:"
msgid "Incoterm"
@ -161,3 +169,7 @@ msgstr "Incoterm"
msgctxt "view:incoterm:"
msgid "Incoterms"
msgstr "Incoterms"
msgctxt "view:party.party:"
msgid "Incoterm"
msgstr "Incoterm"

View File

@ -70,6 +70,14 @@ msgctxt "field:incoterm.category,write_uid:"
msgid "Write User"
msgstr "Usuario de modificación"
msgctxt "field:party.party,incoterm:"
msgid "Incoterm"
msgstr "Incoterm"
msgctxt "field:party.party,incoterm_place:"
msgid "Incoterm Name Place"
msgstr "Nombre lugar incoterm"
msgctxt "model:incoterm,name:"
msgid "Incoterm"
msgstr "Incoterm"
@ -161,3 +169,7 @@ msgstr "Incoterm"
msgctxt "view:incoterm:"
msgid "Incoterms"
msgstr "Incoterms"
msgctxt "view:party.party:"
msgid "Incoterm"
msgstr "Incoterm"

13
party.py Normal file
View File

@ -0,0 +1,13 @@
# This file is part of Tryton. The COPYRIGHT file at the top level of
# this repository contains the full copyright notices and license terms.
from trytond.pool import PoolMeta
from trytond.model import fields
__all__ = ['Party']
class Party:
__metaclass__ = PoolMeta
__name__ = 'party.party'
incoterm = fields.Property(fields.Many2One('incoterm', 'Incoterm'))
incoterm_place = fields.Property(fields.Char('Incoterm Name Place'))

12
party.xml Normal file
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. -->
<tryton>
<data>
<record model="ir.ui.view" id="party_view_form">
<field name="model">party.party</field>
<field name="inherit" ref="party.party_view_form"/>
<field name="name">party_form</field>
</record>
</data>
</tryton>

View File

@ -2,5 +2,7 @@
version=4.3.0
depends:
ir
party
xml:
incoterm.xml
party.xml

14
view/party_form.xml Normal file
View File

@ -0,0 +1,14 @@
<?xml version="1.0"?>
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
this repository contains the full copyright notices and license terms. -->
<data>
<xpath expr="/form/notebook" position="inside">
<page string="Incoterm" id="incoterm">
<separator string="Incoterm" colspan="4" id="incoterm"/>
<label name="incoterm"/>
<field name="incoterm"/>
<label name="incoterm_place"/>
<field name="incoterm_place"/>
</page>
</xpath>
</data>