Skip to content

Commit b5e9abc

Browse files
legalsylvainAshishHirapara
authored andcommitted
[ADD] server_action_navigate
1 parent 52c3496 commit b5e9abc

22 files changed

+1340
-0
lines changed

server_action_navigate/README.rst

Lines changed: 130 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
1+
=========================
2+
Server Actions - Navigate
3+
=========================
4+
5+
.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
6+
!! This file is generated by oca-gen-addon-readme !!
7+
!! changes will be overwritten. !!
8+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
9+
10+
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
11+
:target: https://odoo-community.org/page/development-status
12+
:alt: Beta
13+
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
14+
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
15+
:alt: License: AGPL-3
16+
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fserver--backend-lightgray.png?logo=github
17+
:target: https://github.com/OCA/server-backend/tree/12.0/server_action_navigate
18+
:alt: OCA/server-backend
19+
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
20+
:target: https://translation.odoo-community.org/projects/server-backend-12-0/server-backend-12-0-server_action_navigate
21+
:alt: Translate me on Weblate
22+
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
23+
:target: https://runbot.odoo-community.org/runbot/253/12.0
24+
:alt: Try me on Runbot
25+
26+
|badge1| |badge2| |badge3| |badge4| |badge5|
27+
28+
This module provides a generic tool to have the possibility to see a list of
29+
records associated to a given selection of records. This is basically the UI version of ``recordset.mapped('field1.field2')``.
30+
31+
For example, if you use the sale module, you can configure an action to see
32+
all the products that have been sold for a given selection of sale orders.
33+
34+
**Table of contents**
35+
36+
.. contents::
37+
:local:
38+
39+
Configuration
40+
=============
41+
42+
* Go to 'Setting / Technical / Actions / Server Actions'
43+
44+
* Create a new item
45+
46+
.. figure:: https://raw.githubusercontent.com/OCA/server-backend/12.0/server_action_navigate/static/description/ir_actions_server_form.png
47+
48+
* Set a name that will be used for the Contextual Action
49+
50+
* Choose a model
51+
52+
* Select 'Navigate' option in the field 'Action To Do'
53+
54+
* Then, select a field of this model. It can be a ``one2many``, ``many2many``,
55+
``many2one`` field.
56+
57+
* You can then optionally select another fields (#2) that belong to the previous
58+
selected field (#1) relation model
59+
60+
* Once done, click on the 'Create Contextual Action' to generate a new 'More options'
61+
button.
62+
63+
64+
**Extra options**
65+
66+
* You can define groups whose members will have access to that option.
67+
68+
* You can select an action that will be used to display the target field list.
69+
70+
Usage
71+
=====
72+
73+
* Go to a tree view, for a model for which you have defined a navigation action.
74+
75+
* click on 'Action' Button
76+
77+
.. figure:: https://raw.githubusercontent.com/OCA/server-backend/12.0/server_action_navigate/static/description/sale_order_tree.png
78+
79+
80+
* then click on the name of the configured Action and see the results
81+
82+
.. figure:: https://raw.githubusercontent.com/OCA/server-backend/12.0/server_action_navigate/static/description/product_product_tree.png
83+
84+
Bug Tracker
85+
===========
86+
87+
Bugs are tracked on `GitHub Issues <https://github.com/OCA/server-backend/issues>`_.
88+
In case of trouble, please check there if your issue has already been reported.
89+
If you spotted it first, help us smashing it by providing a detailed and welcomed
90+
`feedback <https://github.com/OCA/server-backend/issues/new?body=module:%20server_action_navigate%0Aversion:%2012.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
91+
92+
Do not contact contributors directly about support or help with technical issues.
93+
94+
Credits
95+
=======
96+
97+
Authors
98+
~~~~~~~
99+
100+
* GRAP
101+
102+
Contributors
103+
~~~~~~~~~~~~
104+
105+
* Sylvain LE GAL (https://www.twitter.com/legalsylvain)
106+
107+
Maintainers
108+
~~~~~~~~~~~
109+
110+
This module is maintained by the OCA.
111+
112+
.. image:: https://odoo-community.org/logo.png
113+
:alt: Odoo Community Association
114+
:target: https://odoo-community.org
115+
116+
OCA, or the Odoo Community Association, is a nonprofit organization whose
117+
mission is to support the collaborative development of Odoo features and
118+
promote its widespread use.
119+
120+
.. |maintainer-legalsylvain| image:: https://github.com/legalsylvain.png?size=40px
121+
:target: https://github.com/legalsylvain
122+
:alt: legalsylvain
123+
124+
Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:
125+
126+
|maintainer-legalsylvain|
127+
128+
This module is part of the `OCA/server-backend <https://github.com/OCA/server-backend/tree/12.0/server_action_navigate>`_ project on GitHub.
129+
130+
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

server_action_navigate/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from . import models
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Copyright (C) 2020 - Today: GRAP (http://www.grap.coop)
2+
# @author: Sylvain LE GAL (https://twitter.com/legalsylvain)
3+
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
4+
5+
{
6+
"name": "Server Actions - Navigate",
7+
"version": "12.0.1.0.0",
8+
"author": "GRAP, " "Odoo Community Association (OCA)",
9+
"summary": "Navigate between any items of any Odoo Models",
10+
"category": "Tools",
11+
"website": "https://github.com/OCA/server-ux",
12+
"license": "AGPL-3",
13+
"depends": ["base"],
14+
"maintainers": ["legalsylvain"],
15+
"data": [
16+
"security/ir.model.access.csv",
17+
"views/view_ir_actions_server.xml",
18+
],
19+
"demo": ["demo/ir_actions_server.xml"],
20+
}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
Copyright (C) 2020 - Today: GRAP (http://www.grap.coop)
4+
@author: Sylvain LE GAL (https://twitter.com/legalsylvain)
5+
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
6+
-->
7+
8+
<odoo>
9+
10+
<record id="navigate_partner_2_tags" model="ir.actions.server">
11+
<field name="name">See tags of Partners</field>
12+
<field name="state">navigate</field>
13+
<field name="model_id" ref="base.model_res_users"/>
14+
</record>
15+
16+
<record id="navigate_line_1" model="ir.actions.server.navigate.line">
17+
<field name="action_id" ref="navigate_partner_2_tags"/>
18+
<field name="sequence">1</field>
19+
<field name="field_id" ref="base.field_res_users__partner_id"/>
20+
</record>
21+
22+
<record id="navigate_line_2" model="ir.actions.server.navigate.line">
23+
<field name="action_id" ref="navigate_partner_2_tags"/>
24+
<field name="sequence">2</field>
25+
<field name="field_id" ref="base.field_res_partner__category_id"/>
26+
</record>
27+
28+
<function model="ir.actions.server" name="create_action">
29+
<value eval="[ref('navigate_partner_2_tags')]"/>
30+
</function>
31+
32+
</odoo>

0 commit comments

Comments
 (0)