Add One2Many to selections on carrier

This allow to copy also the selection when copying a carrier.

issue8817
review270541005
This commit is contained in:
Cédric Krier
2019-12-05 22:29:59 +01:00
parent ecb5786094
commit 0523f9a7db
5 changed files with 20 additions and 2 deletions
+2
View File
@@ -1,3 +1,5 @@
* Add One2Many to selections on carrier
Version 5.4.0 - 2019-11-04
* Bug fixes (see mercurial logs for details)
+1
View File
@@ -24,6 +24,7 @@ class Carrier(ModelSQL, ModelView):
('product', 'Product Price'),
], 'Carrier Cost Method', required=True,
help='Method to compute carrier cost.')
selections = fields.One2Many('carrier.selection', 'carrier', "Selections")
@staticmethod
def default_carrier_cost_method():
+9 -2
View File
@@ -77,7 +77,14 @@ this repository contains the full copyright notices and license terms. -->
<record model="ir.ui.view" id="carrier_selection_view_list">
<field name="model">carrier.selection</field>
<field name="type">tree</field>
<field name="name">selection_tree</field>
<field name="priority" eval="10"/>
<field name="name">selection_list</field>
</record>
<record model="ir.ui.view" id="carrier_selection_view_list_sequence">
<field name="model">carrier.selection</field>
<field name="type">tree</field>
<field name="priority" eval="20"/>
<field name="name">selection_list_sequence</field>
</record>
<record model="ir.action.act_window" id="act_carrier_selection_form">
@@ -87,7 +94,7 @@ this repository contains the full copyright notices and license terms. -->
<record model="ir.action.act_window.view"
id="act_carrier_selection_form_view1">
<field name="sequence" eval="10"/>
<field name="view" ref="carrier_selection_view_list"/>
<field name="view" ref="carrier_selection_view_list_sequence"/>
<field name="act_window" ref="act_carrier_selection_form"/>
</record>
<record model="ir.action.act_window.view"
+8
View 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. -->
<tree>
<field name="from_country" expand="1"/>
<field name="to_country" expand="1"/>
<field name="carrier" expand="2"/>
</tree>