Create 'Equipment' in 'sale.subscription
This commit is contained in:
parent
56b3d0db32
commit
e197ecf527
@ -1,5 +1,5 @@
|
||||
from trytond.pool import Pool
|
||||
from . import party, product, purchase, sale, equipment
|
||||
from . import party, product, purchase, sale, equipment, subscription
|
||||
|
||||
def register():
|
||||
Pool.register(
|
||||
@ -10,4 +10,6 @@ def register():
|
||||
purchase.Line,
|
||||
sale.SaleLine,
|
||||
equipment.OpticalEquipment,
|
||||
subscription.Subscription,
|
||||
subscription.SubscriptionEquipment,
|
||||
module='optical_equipment', type_='model')
|
||||
|
10
equipment.py
10
equipment.py
@ -8,6 +8,7 @@ class OpticalEquipment(ModelSQL, ModelView):
|
||||
company = fields.Many2One('company.company', "Company")
|
||||
location = fields.Many2One('stock.location', "Location")
|
||||
party = fields.Many2One('party.party', "Party")
|
||||
#equipment_party = fields.Many2Many('optical.equipment-party.party', 'party', 'equipment', "Equipments")
|
||||
party_address = fields.Many2One('party.address', "Party Address")
|
||||
#origin = fields.reference("Origin", selection='get_origin', select=True)
|
||||
product = fields.Many2One('product.product', "Product")
|
||||
@ -31,3 +32,12 @@ class OpticalEquipment(ModelSQL, ModelView):
|
||||
@staticmethod
|
||||
def get_origin():
|
||||
return None
|
||||
"""
|
||||
class OpticalEquipmentParty(ModelSQL):
|
||||
'Optical Equipment - Party'
|
||||
__name__ = 'optical.equipment-party.party'
|
||||
_table = 'optical_equipment_party_party'
|
||||
|
||||
party = fields.Many2One('party.party', 'Party', select=True)
|
||||
equipment = fields.Many2One('optical.equipment', 'Equipment', select=True)
|
||||
"""
|
||||
|
@ -2,6 +2,3 @@ from trytond.pool import PoolMeta
|
||||
|
||||
class Measurements(metaclass=PoolMeta):
|
||||
__name__ = 'product.measurements'
|
||||
|
||||
|
||||
|
||||
|
1
party.py
1
party.py
@ -1,5 +1,6 @@
|
||||
from trytond.pool import PoolMeta
|
||||
from trytond.model import ModelSQL, ModelView, fields
|
||||
from . import equipment
|
||||
|
||||
_CLIENT_TYPE = [('ips', 'IPS'),
|
||||
('optica', 'Optica')]
|
||||
|
@ -9,10 +9,12 @@ depends:
|
||||
sale
|
||||
stock
|
||||
country
|
||||
sale_subscription
|
||||
xml:
|
||||
party.xml
|
||||
product.xml
|
||||
equipment.xml
|
||||
sale.xml
|
||||
purchase.xml
|
||||
uom.xml
|
||||
uom.xml
|
||||
subscription.xml
|
@ -6,4 +6,8 @@ this repository contains the full copyright notices and license terms. -->
|
||||
<label name="client_type"/>
|
||||
<field name="client_type"/>
|
||||
</xpath>
|
||||
<xpath expr="/form/notebook/page[@id='general']" position="after">
|
||||
<page string="Equipments Party" id="equipments_party">
|
||||
</page>
|
||||
</xpath>
|
||||
</data>
|
||||
|
Loading…
Reference in New Issue
Block a user