create model maintenance_service
This commit is contained in:
parent
9736b1baf3
commit
87a843754d
@ -164,6 +164,9 @@ class MaintenanceService(ModelSQL, ModelView):
|
|||||||
('finished', "Finished")
|
('finished', "Finished")
|
||||||
], "State",required=True, readonly=True, sort=False)
|
], "State",required=True, readonly=True, sort=False)
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def default_company():
|
||||||
|
return Transaction().context.get('company')
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def default_state(self):
|
def default_state(self):
|
||||||
|
2
sale.py
2
sale.py
@ -46,7 +46,7 @@ class Sale(metaclass=PoolMeta):
|
|||||||
propietary_address=cls.shipment_address,
|
propietary_address=cls.shipment_address,
|
||||||
state="draft"
|
state="draft"
|
||||||
)
|
)
|
||||||
#raise UserError(str(dir(maintenanceService)))
|
#raise UserError(str((maintenanceService)))
|
||||||
maintenanceService.save()
|
maintenanceService.save()
|
||||||
cls.agended = True
|
cls.agended = True
|
||||||
sale.save()
|
sale.save()
|
||||||
|
8
view/address_tree.xml
Normal file
8
view/address_tree.xml
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
<?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="//field[@name='name']" position="after">
|
||||||
|
<field name="street" expand="1"/>
|
||||||
|
</xpath>
|
||||||
|
</data>
|
7
view/maintenance_calendar.xml
Normal file
7
view/maintenance_calendar.xml
Normal 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. -->
|
||||||
|
<calendar
|
||||||
|
dtstart="estimated_agended"
|
||||||
|
dtend="estimated_agended">
|
||||||
|
</calendar>
|
45
view/maintenance_service_form.xml
Normal file
45
view/maintenance_service_form.xml
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
<?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 col="6">
|
||||||
|
<label name="maintenance_type"/>
|
||||||
|
<field name="maintenance_type"/>
|
||||||
|
<label name="propietary"/>
|
||||||
|
<field name="propietary"/>
|
||||||
|
<label name="propietary_address"/>
|
||||||
|
<field name="propietary_address"/>
|
||||||
|
<label name="code"/>
|
||||||
|
<field name="code"/>
|
||||||
|
<label name="description"/>
|
||||||
|
<field name="description" colspan="3"/>
|
||||||
|
<label name="reference"/>
|
||||||
|
<field name="reference"/>
|
||||||
|
<label name="sale_origin"/>
|
||||||
|
<field name="sale_origin"/>
|
||||||
|
<newline/>
|
||||||
|
<notebook colspan="6">
|
||||||
|
<page string="General" id="general">
|
||||||
|
<label name="state_agended"/>
|
||||||
|
<field name="state_agended"/>
|
||||||
|
<label name="estimated_agended"/>
|
||||||
|
<field name="estimated_agended"/>
|
||||||
|
<label name="technical"/>
|
||||||
|
<field name="technical"/>
|
||||||
|
</page>
|
||||||
|
<page string="Lines Of Mantenaince" id="lines_maintenance">
|
||||||
|
<field name="lines"/>
|
||||||
|
</page>
|
||||||
|
<page string="Other Info" id="other_info">
|
||||||
|
<label name="company"/>
|
||||||
|
<field name="company"/>
|
||||||
|
</page>
|
||||||
|
</notebook>
|
||||||
|
<newline/>
|
||||||
|
<label name="state"/>
|
||||||
|
<field name="state"/>
|
||||||
|
<group id="button">
|
||||||
|
<button name="agended"/>
|
||||||
|
<button name="in_progress"/>
|
||||||
|
<button name="finished"/>
|
||||||
|
</group>
|
||||||
|
</form>
|
9
view/maintenance_service_tree.xml
Normal file
9
view/maintenance_service_tree.xml
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
<?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="code"/>
|
||||||
|
<field name="company"/>
|
||||||
|
<field name="propietary"/>
|
||||||
|
<field name="propietary_address"/>
|
||||||
|
</tree>
|
12
view/sale_form.xml
Normal file
12
view/sale_form.xml
Normal 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. -->
|
||||||
|
<data>
|
||||||
|
<xpath expr="//field[@name='reference']" position="after">
|
||||||
|
<newline/>
|
||||||
|
<label name="sale_type"/>
|
||||||
|
<field name="sale_type"/>
|
||||||
|
<label name="agended"/>
|
||||||
|
<field name="agended"/>
|
||||||
|
</xpath>
|
||||||
|
</data>
|
Loading…
Reference in New Issue
Block a user