changeset 49d7a3c1f368 in modules/stock:default
details: https://hg.tryton.org/modules/stock?cmd=changeset;node=49d7a3c1f368
description:
Add link button
issue9051
review280841002
diffstat:
icons/tryton-shipment-in.svg | 1 +
icons/tryton-shipment-out.svg | 1 +
party.xml | 2 ++
stock.xml | 9 +++++++++
view/party_form.xml | 4 ++++
5 files changed, 17 insertions(+), 0 deletions(-)
diffs (63 lines):
diff -r eeefb51f1d8b -r 49d7a3c1f368 icons/tryton-shipment-in.svg
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/icons/tryton-shipment-in.svg Mon Apr 13 12:21:55 2020 +0200
@@ -0,0 +1,1 @@
+<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24"
width="24" style="transform: scale(-1,1)"><path d="M0 0h24v24H0z"
fill="none"/><path d="M20 8h-3V4H3c-1.1 0-2 .9-2 2v11h2c0 1.66 1.34 3 3
3s3-1.34 3-3h6c0 1.66 1.34 3 3 3s3-1.34 3-3h2v-5l-3-4zM6 18.5c-.83
0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5zm13.5-9l1.96
2.5H17V9.5h2.5zm-1.5 9c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5
1.5-.67 1.5-1.5 1.5z"/></svg>
diff -r eeefb51f1d8b -r 49d7a3c1f368 icons/tryton-shipment-out.svg
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/icons/tryton-shipment-out.svg Mon Apr 13 12:21:55 2020 +0200
@@ -0,0 +1,1 @@
+<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24"
width="24"><path d="M0 0h24v24H0z" fill="none"/><path d="M20 8h-3V4H3c-1.1 0-2
.9-2 2v11h2c0 1.66 1.34 3 3 3s3-1.34 3-3h6c0 1.66 1.34 3 3 3s3-1.34
3-3h2v-5l-3-4zM6 18.5c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67
1.5-1.5 1.5zm13.5-9l1.96 2.5H17V9.5h2.5zm-1.5 9c-.83 0-1.5-.67-1.5-1.5s.67-1.5
1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5z"/></svg>
\ No newline at end of file
diff -r eeefb51f1d8b -r 49d7a3c1f368 party.xml
--- a/party.xml Sun Apr 12 09:03:25 2020 +0200
+++ b/party.xml Mon Apr 13 12:21:55 2020 +0200
@@ -15,6 +15,7 @@
<field name="domain"
eval="[If(Eval('active_ids', []) == [Eval('active_id')],
('customer', '=', Eval('active_id')), ('customer', 'in', Eval('active_ids')))]"
pyson="1"/>
+ <field name="search_value" eval="[('state', 'not in', ['done',
'cancel'])]" pyson="1"/>
</record>
<record model="ir.action.keyword"
id="act_open_purchase_keyword1">
@@ -34,6 +35,7 @@
<field name="domain"
eval="[If(Eval('active_ids', []) == [Eval('active_id')],
('supplier', '=', Eval('active_id')), ('supplier', 'in', Eval('active_ids')))]"
pyson="1"/>
+ <field name="search_value" eval="[('state', 'not in', ['done',
'cancel'])]" pyson="1"/>
</record>
<record model="ir.action.keyword"
id="act_open_purchase_keyword2">
diff -r eeefb51f1d8b -r 49d7a3c1f368 stock.xml
--- a/stock.xml Sun Apr 12 09:03:25 2020 +0200
+++ b/stock.xml Mon Apr 13 12:21:55 2020 +0200
@@ -32,6 +32,15 @@
<field name="name">tryton-stock</field>
<field name="path">icons/tryton-stock.svg</field>
</record>
+ <record model="ir.ui.icon" id="stock_shipment_in">
+ <field name="name">tryton-shipment-in</field>
+ <field name="path">icons/tryton-shipment-in.svg</field>
+ </record>
+ <record model="ir.ui.icon" id="stock_shipment_out">
+ <field name="name">tryton-shipment-out</field>
+ <field name="path">icons/tryton-shipment-out.svg</field>
+ </record>
+
<menuitem name="Inventory & Stock" sequence="3" id="menu_stock"
icon="tryton-stock"/>
<record model="ir.ui.menu-res.group"
id="menu_stock_group_stock">
diff -r eeefb51f1d8b -r 49d7a3c1f368 view/party_form.xml
--- a/view/party_form.xml Sun Apr 12 09:03:25 2020 +0200
+++ b/view/party_form.xml Mon Apr 13 12:21:55 2020 +0200
@@ -2,6 +2,10 @@
<!-- 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="//group[@id='links']" position="inside">
+ <link icon="tryton-shipment-out" name="stock.act_shipment_out_form2"
empty="hide"/>
+ <link icon="tryton-shipment-in" name="stock.act_shipment_out_form3"
empty="hide"/>
+ </xpath>
<xpath expr="/form/notebook" position="inside">
<page string="Stock" id="stock">
<label name="customer_location"/>