changeset cd02cbef8325 in modules/sale_opportunity:default
details:
https://hg.tryton.org/modules/sale_opportunity?cmd=changeset;node=cd02cbef8325
description:
Add link button
issue9051
review280841002
diffstat:
icons/tryton-sale-opportunity.svg | 1 +
opportunity.xml | 5 +++++
party.xml | 7 +++++++
view/party_form.xml | 8 ++++++++
4 files changed, 21 insertions(+), 0 deletions(-)
diffs (56 lines):
diff -r 277d9fa8026c -r cd02cbef8325 icons/tryton-sale-opportunity.svg
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/icons/tryton-sale-opportunity.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="M21.41
11.58l-9-9C12.05 2.22 11.55 2 11 2H4c-1.1 0-2 .9-2 2v7c0 .55.22 1.05.59 1.42l9
9c.36.36.86.58 1.41.58.55 0 1.05-.22 1.41-.59l7-7c.37-.36.59-.86.59-1.41
0-.55-.23-1.06-.59-1.42zM5.5 7C4.67 7 4 6.33 4 5.5S4.67 4 5.5 4 7 4.67 7 5.5
6.33 7 5.5 7z"/></svg>
\ No newline at end of file
diff -r 277d9fa8026c -r cd02cbef8325 opportunity.xml
--- a/opportunity.xml Fri Apr 10 18:53:44 2020 +0200
+++ b/opportunity.xml Mon Apr 13 12:21:55 2020 +0200
@@ -3,6 +3,11 @@
this repository contains the full copyright notices and license terms. -->
<tryton>
<data>
+ <record model="ir.ui.icon" id="sale_opportunity">
+ <field name="name">tryton-sale-opportunity</field>
+ <field name="path">icons/tryton-sale-opportunity.svg</field>
+ </record>
+
<record model="res.group" id="group_opportunity">
<field name="name">Sale Opportunity</field>
</record>
diff -r 277d9fa8026c -r cd02cbef8325 party.xml
--- a/party.xml Fri Apr 10 18:53:44 2020 +0200
+++ b/party.xml Mon Apr 13 12:21:55 2020 +0200
@@ -3,12 +3,19 @@
this repository contains the full copyright notices and license terms. -->
<tryton>
<data>
+ <record model="ir.ui.view" id="party_view_form">
+ <field name="model">party.party</field>
+ <field name="inherit" ref="party.party_view_form"/>
+ <field name="name">party_form</field>
+ </record>
+
<record model="ir.action.act_window" id="act_opportunity_form2">
<field name="name">Sales Leads/Opportunities</field>
<field name="res_model">sale.opportunity</field>
<field name="domain"
eval="[If(Eval('active_ids', []) == [Eval('active_id')],
('party', '=', Eval('active_id')), ('party', 'in', Eval('active_ids')))]"
pyson="1"/>
+ <field name="search_value" eval="[('state', 'not in', ['won',
'cancelled', 'lost'])]" pyson="1"/>
</record>
<record model="ir.action.keyword"
id="act_open_sale_opportunity_keyword1">
diff -r 277d9fa8026c -r cd02cbef8325 view/party_form.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/view/party_form.xml Mon Apr 13 12:21:55 2020 +0200
@@ -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="//group[@id='links']" position="inside">
+ <link icon="tryton-sale-opportunity"
name="sale_opportunity.act_opportunity_form2" empty="hide"/>
+ </xpath>
+</data>