Initial import from Docker volume
This commit is contained in:
17
modules/purchase_trade/build/lib/trytond/modules/purchase_trade/__init__.py
Executable file
17
modules/purchase_trade/build/lib/trytond/modules/purchase_trade/__init__.py
Executable file
@@ -0,0 +1,17 @@
|
||||
# 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 Pool
|
||||
|
||||
from . import purchase, price
|
||||
|
||||
|
||||
def register():
|
||||
Pool.register(
|
||||
purchase.Line,
|
||||
price.Component,
|
||||
price.Rule,
|
||||
price.Period,
|
||||
price.Pricing,
|
||||
price.Trigger,
|
||||
module='purchase', type_='model')
|
||||
63
modules/purchase_trade/build/lib/trytond/modules/purchase_trade/price.py
Executable file
63
modules/purchase_trade/build/lib/trytond/modules/purchase_trade/price.py
Executable file
@@ -0,0 +1,63 @@
|
||||
# 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.model import fields
|
||||
from trytond.pool import Pool, PoolMeta
|
||||
from trytond.pyson import Bool, Eval, Id
|
||||
from trytond.model import (ModelSQL, ModelView)
|
||||
|
||||
class Component(ModelSQL, ModelView):
|
||||
"Component"
|
||||
__name__ = 'price.component'
|
||||
|
||||
line = fields.Many2One('purchase.line',"Line")
|
||||
fix_type = fields.Many2One('price.fixtype',"Fixation type")
|
||||
ratio = fields.Numeric("%")
|
||||
price_index = fields.Many2One('price.price',"Price index")
|
||||
price_value = fields.Numeric("Price")
|
||||
calendar = fields.Many2One('price.calendar',"Calendar")
|
||||
rule = fields.Many2One('price.rule',"Price rules")
|
||||
nbdays = fields.Integer("Nb days")
|
||||
quota = fields.Numeric("Quota")
|
||||
|
||||
class Rule(ModelSQL,ModelView):
|
||||
"Rule"
|
||||
__name__ = 'price.rule'
|
||||
|
||||
name = fields.Char("Name")
|
||||
triggers = fields.One2Many('price.trigger','rule',"Triggers")
|
||||
periods = fields.One2Many('price.period','rule',"Periods")
|
||||
|
||||
class Trigger(ModelSQL,ModelView):
|
||||
"Trigger"
|
||||
__name__ = "Trigger"
|
||||
|
||||
rule = fields.Many2One('price.rule',"Trigger")
|
||||
trigger = fields.Selection([
|
||||
(None, ''),
|
||||
('bldate', 'BL date'),
|
||||
('ctdate', 'Contract date'),
|
||||
], 'Trigger')
|
||||
before = fields.Integer("Nb days before")
|
||||
after = fields.Integer("Nb days after")
|
||||
|
||||
class Period(ModelSQL,ModelView):
|
||||
"Period"
|
||||
__name__ = 'price.period'
|
||||
|
||||
rule = fields.Many2One('price.rule',"Rules")
|
||||
from = fields.Date("From")
|
||||
to = fields.Date("To")
|
||||
|
||||
class Pricing(ModelSQL,ModelView):
|
||||
"Pricing"
|
||||
__name__ = 'price.pricing'
|
||||
|
||||
pricing_date = fields.Date("Date")
|
||||
price_component = fields.Many2One('price.component',"Component")
|
||||
quantity = fields.Numeric("Qt")
|
||||
settl_price = fields.Numeric("Settl. price")
|
||||
fixed_qt = fields.Numeric("Fixed qt")
|
||||
fixed_qt_price = fields.Numeric("Fixed qt price")
|
||||
unfixed_qt = fields.Numeric("Unfixed qt")
|
||||
unfixed_qt_price = fields.Numeric("Unfixed qt price")
|
||||
eod_price = fields.Numeric("EOD price")
|
||||
12
modules/purchase_trade/build/lib/trytond/modules/purchase_trade/purchase.py
Executable file
12
modules/purchase_trade/build/lib/trytond/modules/purchase_trade/purchase.py
Executable file
@@ -0,0 +1,12 @@
|
||||
# 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.model import fields
|
||||
from trytond.pool import Pool, PoolMeta
|
||||
from trytond.pyson import Bool, Eval, Id
|
||||
from trytond.model import (ModelSQL, ModelView)
|
||||
|
||||
class Line(metaclass=PoolMeta):
|
||||
__name__ = 'purchase.line'
|
||||
|
||||
price_components = fields.One2Many('price.component','line',"Components")
|
||||
price_pricing = fields.One2Many('price.pricing','line',"Pricing")
|
||||
12
modules/purchase_trade/build/lib/trytond/modules/purchase_trade/purchase.xml
Executable file
12
modules/purchase_trade/build/lib/trytond/modules/purchase_trade/purchase.xml
Executable 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="purchase_line_view_form">
|
||||
<field name="model">purchase.line</field>
|
||||
<field name="inherit" ref="purchase.purchase_line_view_form"/>
|
||||
<field name="name">purchase_line_form</field>
|
||||
</record>
|
||||
</data>
|
||||
</tryton>
|
||||
@@ -0,0 +1,8 @@
|
||||
[tryton]
|
||||
version=7.2.7
|
||||
depends:
|
||||
ir
|
||||
purchase
|
||||
res
|
||||
xml:
|
||||
purchase.xml
|
||||
@@ -0,0 +1,18 @@
|
||||
<form>
|
||||
<label name="fix_type"/>
|
||||
<field name="fix_type"/>
|
||||
<label name="ratio"/>
|
||||
<field name="ratio"/>
|
||||
<label name="price_index"/>
|
||||
<field name="price_index"/>
|
||||
<label name="price_value"/>
|
||||
<field name="price_value"/>
|
||||
<label name="calendar"/>
|
||||
<field name="calendar"/>
|
||||
<label name="rule"/>
|
||||
<field name="rule"/>
|
||||
<label name="nbdays"/>
|
||||
<field name="nbdays"/>
|
||||
<label name="quota"/>
|
||||
<field name="quota"/>
|
||||
</form>
|
||||
@@ -0,0 +1,10 @@
|
||||
<tree>
|
||||
<field name="fix_type"/>
|
||||
<field name="ratio"/>
|
||||
<field name="price_index"/>
|
||||
<field name="price_value"/>
|
||||
<field name="calendar"/>
|
||||
<field name="rule"/>
|
||||
<field name="nbdays"/>
|
||||
<field name="quota"/>
|
||||
</tree>
|
||||
@@ -0,0 +1,10 @@
|
||||
<tree>
|
||||
<field name="fix_type"/>
|
||||
<field name="ratio"/>
|
||||
<field name="price_index"/>
|
||||
<field name="price_value"/>
|
||||
<field name="calendar"/>
|
||||
<field name="rule"/>
|
||||
<field name="nbdays"/>
|
||||
<field name="quota"/>
|
||||
</tree>
|
||||
@@ -0,0 +1,6 @@
|
||||
<form>
|
||||
<label name="from"/>
|
||||
<field name="from"/>
|
||||
<label name="to"/>
|
||||
<field name="to"/>
|
||||
</form>
|
||||
@@ -0,0 +1,4 @@
|
||||
<tree>
|
||||
<field name="from"/>
|
||||
<field name="to"/>
|
||||
</tree>
|
||||
@@ -0,0 +1,4 @@
|
||||
<tree>
|
||||
<field name="from"/>
|
||||
<field name="to"/>
|
||||
</tree>
|
||||
@@ -0,0 +1,20 @@
|
||||
<form>
|
||||
<label name="pricing_date"/>
|
||||
<field name="pricing_date"/>
|
||||
<label name="price_component"/>
|
||||
<field name="price_component"/>
|
||||
<label name="quantity"/>
|
||||
<field name="quantity"/>
|
||||
<label name="settl_price"/>
|
||||
<field name="settl_price"/>
|
||||
<label name="fixed_qt"/>
|
||||
<field name="fixed_qt"/>
|
||||
<label name="fixed_qt_price"/>
|
||||
<field name="fixed_qt_price"/>
|
||||
<label name="unfixed_qt"/>
|
||||
<field name="unfixed_qt"/>
|
||||
<label name="unfixed_qt_price"/>
|
||||
<field name="unfixed_qt_price"/>
|
||||
<label name="eod_price"/>
|
||||
<field name="eod_price"/>
|
||||
</form>
|
||||
@@ -0,0 +1,11 @@
|
||||
<tree>
|
||||
<field name="pricing_date"/>
|
||||
<field name="price_component"/>
|
||||
<field name="quantity"/>
|
||||
<field name="settl_price"/>
|
||||
<field name="fixed_qt"/>
|
||||
<field name="fixed_qt_price"/>
|
||||
<field name="unfixed_qt"/>
|
||||
<field name="unfixed_qt_price"/>
|
||||
<field name="eod_price"/>
|
||||
</tree>
|
||||
@@ -0,0 +1,11 @@
|
||||
<tree>
|
||||
<field name="pricing_date"/>
|
||||
<field name="price_component"/>
|
||||
<field name="quantity"/>
|
||||
<field name="settl_price"/>
|
||||
<field name="fixed_qt"/>
|
||||
<field name="fixed_qt_price"/>
|
||||
<field name="unfixed_qt"/>
|
||||
<field name="unfixed_qt_price"/>
|
||||
<field name="eod_price"/>
|
||||
</tree>
|
||||
@@ -0,0 +1,15 @@
|
||||
<?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/notebook" position="inside">
|
||||
<page string="Components" col="4" id="components">
|
||||
<field name="price_components" mode="tree,form" colspan="4"
|
||||
view_ids="price.component_view_tree_sequence,price.component_view_form"/>
|
||||
</page>
|
||||
<page string="Pricing" col="4" id="pricing">
|
||||
<field name="price_pricing" mode="tree,form" colspan="4"
|
||||
view_ids="price.pricing_view_tree_sequence,price.pricing_view_form"/>
|
||||
</page>
|
||||
</xpath>
|
||||
</data>
|
||||
@@ -0,0 +1,11 @@
|
||||
<form>
|
||||
<label name="name"/>
|
||||
<field name="name"/>
|
||||
<label name="triggers"/>
|
||||
<field name="triggers" mode="tree,form" colspan="4"
|
||||
view_ids="price.trigger_view_tree_sequence,price.trigger_view_form"/>
|
||||
<label name="periods"/>
|
||||
<field name="periods" mode="tree,form" colspan="4"
|
||||
view_ids="price.period_view_tree_sequence,price.period_view_form"/>
|
||||
|
||||
</form>
|
||||
@@ -0,0 +1,3 @@
|
||||
<tree>
|
||||
<field name="name"/>
|
||||
</tree>
|
||||
@@ -0,0 +1,3 @@
|
||||
<tree>
|
||||
<field name="name"/>
|
||||
</tree>
|
||||
@@ -0,0 +1,8 @@
|
||||
<form>
|
||||
<label name="trigger"/>
|
||||
<field name="trigger"/>
|
||||
<label name="before"/>
|
||||
<field name="before"/>
|
||||
<label name="after"/>
|
||||
<field name="after"/>
|
||||
</form>
|
||||
@@ -0,0 +1,5 @@
|
||||
<tree>
|
||||
<field name="trigger"/>
|
||||
<field name="before"/>
|
||||
<field name="after"/>
|
||||
</tree>
|
||||
@@ -0,0 +1,5 @@
|
||||
<tree>
|
||||
<field name="trigger"/>
|
||||
<field name="before"/>
|
||||
<field name="after"/>
|
||||
</tree>
|
||||
Reference in New Issue
Block a user