add fields 'campus' and 'party_related'
This commit is contained in:
parent
7e2648e114
commit
b61bcce44b
@ -1,9 +1,10 @@
|
|||||||
from trytond.pool import Pool
|
from trytond.pool import Pool
|
||||||
from . import (party, product, purchase, sale,
|
from . import (address, party, product, purchase, sale,
|
||||||
equipment, subscription, measurements)
|
equipment, subscription, measurements)
|
||||||
|
|
||||||
def register():
|
def register():
|
||||||
Pool.register(
|
Pool.register(
|
||||||
|
address.Address,
|
||||||
party.Party,
|
party.Party,
|
||||||
product.Template,
|
product.Template,
|
||||||
product.Product,
|
product.Product,
|
||||||
|
@ -1,9 +1,11 @@
|
|||||||
from trytond.pool import PoolMeta
|
from trytond.pool import PoolMeta
|
||||||
from trytond.model import fields
|
from trytond.model import fields
|
||||||
|
from trytond.pyson import Eval, If
|
||||||
|
|
||||||
|
|
||||||
class Address(metaclass=PoolMeta):
|
class Address(metaclass=PoolMeta):
|
||||||
__name__ = 'party.address'
|
__name__ = 'party.address'
|
||||||
|
|
||||||
campus = fields.Boolean("Campus")
|
campus = fields.Boolean("Campus")
|
||||||
party_related = fields.One2Many('party.party', "Party related")
|
party_related = fields.Many2One('party.party', "Party Related",
|
||||||
|
states ={ 'invisible': (Eval("campus"))})
|
||||||
|
@ -12,6 +12,7 @@ depends:
|
|||||||
country
|
country
|
||||||
sale_subscription
|
sale_subscription
|
||||||
xml:
|
xml:
|
||||||
|
address.xml
|
||||||
party.xml
|
party.xml
|
||||||
product.xml
|
product.xml
|
||||||
measurements.xml
|
measurements.xml
|
||||||
|
13
view/address_form.xml
Normal file
13
view/address_form.xml
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
<?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" position="inside">
|
||||||
|
<label name="party_related"/>
|
||||||
|
<field name="party_related"/>
|
||||||
|
</xpath>
|
||||||
|
<xpath expr="/form/group[@id='checkboxes']" position="inside">
|
||||||
|
<label name="campus"/>
|
||||||
|
<field name="campus"/>
|
||||||
|
</xpath>
|
||||||
|
</data>
|
Loading…
Reference in New Issue
Block a user