forked from OCA/server-tools
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1443 from OCA/17.0
Syncing from upstream OCA/server-tools (17.0)
- Loading branch information
Showing
55 changed files
with
3,757 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,125 @@ | ||
========================= | ||
Extended view inheritance | ||
========================= | ||
|
||
.. | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
!! This file is generated by oca-gen-addon-readme !! | ||
!! changes will be overwritten. !! | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
!! source digest: sha256:cc3eeb2e6514c28a74085cfaf6c72c75677d641778f0fcf248155f48600ac86f | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
.. |badge1| image:: https://img.shields.io/badge/maturity-Mature-brightgreen.png | ||
:target: https://odoo-community.org/page/development-status | ||
:alt: Mature | ||
.. |badge2| image:: https://img.shields.io/badge/licence-LGPL--3-blue.png | ||
:target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html | ||
:alt: License: LGPL-3 | ||
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fserver--tools-lightgray.png?logo=github | ||
:target: https://github.com/OCA/server-tools/tree/17.0/base_view_inheritance_extension | ||
:alt: OCA/server-tools | ||
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png | ||
:target: https://translation.odoo-community.org/projects/server-tools-17-0/server-tools-17-0-base_view_inheritance_extension | ||
:alt: Translate me on Weblate | ||
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png | ||
:target: https://runboat.odoo-community.org/builds?repo=OCA/server-tools&target_branch=17.0 | ||
:alt: Try me on Runboat | ||
|
||
|badge1| |badge2| |badge3| |badge4| |badge5| | ||
|
||
This module was written to make it simple to add custom operators for | ||
view inheritance. | ||
|
||
**Table of contents** | ||
|
||
.. contents:: | ||
:local: | ||
|
||
Usage | ||
===== | ||
|
||
**Change a python dictionary (context for example)** | ||
|
||
.. code:: xml | ||
<field position="attributes"> | ||
<attribute name="context" operation="update"> | ||
{ | ||
"key": "value", | ||
} | ||
</attribute> | ||
</field> | ||
Note that views are subject to evaluation of xmlids anyways, so if you | ||
need to refer to some xmlid, say ``%(xmlid)s``. | ||
|
||
**Add text after and/or before than original** | ||
|
||
.. code:: xml | ||
<attribute name="$attribute" operation="text_add"> | ||
$text_before {old_value} $text_after | ||
</attribute> | ||
**Add domain with AND/OR join operator (AND if missed) allowing | ||
conditional changes** | ||
|
||
.. code:: xml | ||
<attribute name="$attribute" operation="domain_add" | ||
condition="$field_condition" join_operator="OR"> | ||
$domain_to_add | ||
</attribute> | ||
Known issues / Roadmap | ||
====================== | ||
|
||
- Support an ``eval`` attribute for our new node types. | ||
|
||
Bug Tracker | ||
=========== | ||
|
||
Bugs are tracked on `GitHub Issues <https://github.com/OCA/server-tools/issues>`_. | ||
In case of trouble, please check there if your issue has already been reported. | ||
If you spotted it first, help us to smash it by providing a detailed and welcomed | ||
`feedback <https://github.com/OCA/server-tools/issues/new?body=module:%20base_view_inheritance_extension%0Aversion:%2017.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_. | ||
|
||
Do not contact contributors directly about support or help with technical issues. | ||
|
||
Credits | ||
======= | ||
|
||
Authors | ||
------- | ||
|
||
* Therp BV | ||
|
||
Contributors | ||
------------ | ||
|
||
- Holger Brunn <[email protected]> | ||
- Ronald Portier <[email protected]> | ||
- `Tecnativa <https://www.tecnativa.com>`__: | ||
|
||
- Sergio Teruel | ||
- Carlos Dauden | ||
|
||
- Iván Todorovich <[email protected]> | ||
|
||
Maintainers | ||
----------- | ||
|
||
This module is maintained by the OCA. | ||
|
||
.. image:: https://odoo-community.org/logo.png | ||
:alt: Odoo Community Association | ||
:target: https://odoo-community.org | ||
|
||
OCA, or the Odoo Community Association, is a nonprofit organization whose | ||
mission is to support the collaborative development of Odoo features and | ||
promote its widespread use. | ||
|
||
This module is part of the `OCA/server-tools <https://github.com/OCA/server-tools/tree/17.0/base_view_inheritance_extension>`_ project on GitHub. | ||
|
||
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
from . import models |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Copyright 2016 Therp BV <https://therp.nl> | ||
# Copyright 2018 Tecnativa - Sergio Teruel | ||
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html). | ||
{ | ||
"name": "Extended view inheritance", | ||
"version": "17.0.1.0.0", | ||
"development_status": "Mature", | ||
"author": "Therp BV,Odoo Community Association (OCA)", | ||
"license": "LGPL-3", | ||
"category": "Hidden/Dependency", | ||
"summary": "Adds more operators for view inheritance", | ||
"website": "https://github.com/OCA/server-tools", | ||
"depends": ["base"], | ||
"external_dependencies": {"python": ["astor"]}, | ||
"demo": ["demo/ir_ui_view.xml"], | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<odoo> | ||
<record id="view_partner_simple_form" model="ir.ui.view"> | ||
<field name="model">res.partner</field> | ||
<field name="inherit_id" ref="base.view_partner_simple_form" /> | ||
<field name="arch" type="xml"> | ||
<xpath expr="." position="attributes"> | ||
<attribute name="string">Partner form</attribute> | ||
</xpath> | ||
<field name="parent_id" position="attributes"> | ||
<attribute name="context" operation="update"> | ||
{ | ||
"default_email": "[email protected]", | ||
"default_company_id": allowed_company_ids[0] | ||
} | ||
</attribute> | ||
</field> | ||
<!-- without operations, the standard handler should be called /--> | ||
<field name="parent_id" position="attributes"> | ||
<attribute name="name">parent_id</attribute> | ||
</field> | ||
<form position="inside"> | ||
<notebook> | ||
<page string="Phone numbers" name="phone_book" /> | ||
</notebook> | ||
</form> | ||
</field> | ||
</record> | ||
</odoo> |
29 changes: 29 additions & 0 deletions
29
base_view_inheritance_extension/i18n/base_view_inheritance_extension.pot
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# Translation of Odoo Server. | ||
# This file contains the translation of the following modules: | ||
# * base_view_inheritance_extension | ||
# | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: Odoo Server 17.0\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"Last-Translator: \n" | ||
"Language-Team: \n" | ||
"MIME-Version: 1.0\n" | ||
"Content-Type: text/plain; charset=UTF-8\n" | ||
"Content-Transfer-Encoding: \n" | ||
"Plural-Forms: \n" | ||
|
||
#. module: base_view_inheritance_extension | ||
#: model_terms:ir.ui.view,arch_db:base_view_inheritance_extension.view_partner_simple_form | ||
msgid "Partner form" | ||
msgstr "" | ||
|
||
#. module: base_view_inheritance_extension | ||
#: model_terms:ir.ui.view,arch_db:base_view_inheritance_extension.view_partner_simple_form | ||
msgid "Phone numbers" | ||
msgstr "" | ||
|
||
#. module: base_view_inheritance_extension | ||
#: model:ir.model,name:base_view_inheritance_extension.model_ir_ui_view | ||
msgid "View" | ||
msgstr "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# Translation of Odoo Server. | ||
# This file contains the translation of the following modules: | ||
# * base_view_inheritance_extension | ||
# | ||
# Translators: | ||
# Marc Tormo i Bochaca <[email protected]>, 2017 | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: Odoo Server 9.0c\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"POT-Creation-Date: 2017-04-19 17:59+0000\n" | ||
"PO-Revision-Date: 2017-04-19 17:59+0000\n" | ||
"Last-Translator: Marc Tormo i Bochaca <[email protected]>, 2017\n" | ||
"Language-Team: Catalan (https://www.transifex.com/oca/teams/23907/ca/)\n" | ||
"Language: ca\n" | ||
"MIME-Version: 1.0\n" | ||
"Content-Type: text/plain; charset=UTF-8\n" | ||
"Content-Transfer-Encoding: \n" | ||
"Plural-Forms: nplurals=2; plural=(n != 1);\n" | ||
|
||
#. module: base_view_inheritance_extension | ||
#: model_terms:ir.ui.view,arch_db:base_view_inheritance_extension.view_partner_simple_form | ||
msgid "Partner form" | ||
msgstr "Empresa de " | ||
|
||
#. module: base_view_inheritance_extension | ||
#: model_terms:ir.ui.view,arch_db:base_view_inheritance_extension.view_partner_simple_form | ||
msgid "Phone numbers" | ||
msgstr "" | ||
|
||
#. module: base_view_inheritance_extension | ||
#: model:ir.model.fields,field_description:base_view_inheritance_extension.field_ir_ui_view__smart_search | ||
msgid "Smart Search" | ||
msgstr "" | ||
|
||
#. module: base_view_inheritance_extension | ||
#: model:ir.model,name:base_view_inheritance_extension.model_ir_ui_view | ||
msgid "View" | ||
msgstr "" | ||
|
||
#~ msgid "ir.ui.view" | ||
#~ msgstr "ir.ui.view" | ||
|
||
#~ msgid "A new page" | ||
#~ msgstr "Una nova pàgina " |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# Translation of Odoo Server. | ||
# This file contains the translation of the following modules: | ||
# * base_view_inheritance_extension | ||
# | ||
# Translators: | ||
# Niki Waibel <[email protected]>, 2017 | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: Odoo Server 10.0\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"POT-Creation-Date: 2017-12-01 02:10+0000\n" | ||
"PO-Revision-Date: 2017-12-01 02:10+0000\n" | ||
"Last-Translator: Niki Waibel <[email protected]>, 2017\n" | ||
"Language-Team: German (https://www.transifex.com/oca/teams/23907/de/)\n" | ||
"Language: de\n" | ||
"MIME-Version: 1.0\n" | ||
"Content-Type: text/plain; charset=UTF-8\n" | ||
"Content-Transfer-Encoding: \n" | ||
"Plural-Forms: nplurals=2; plural=(n != 1);\n" | ||
|
||
#. module: base_view_inheritance_extension | ||
#: model_terms:ir.ui.view,arch_db:base_view_inheritance_extension.view_partner_simple_form | ||
msgid "Partner form" | ||
msgstr "" | ||
|
||
#. module: base_view_inheritance_extension | ||
#: model_terms:ir.ui.view,arch_db:base_view_inheritance_extension.view_partner_simple_form | ||
msgid "Phone numbers" | ||
msgstr "" | ||
|
||
#. module: base_view_inheritance_extension | ||
#: model:ir.model.fields,field_description:base_view_inheritance_extension.field_ir_ui_view__smart_search | ||
msgid "Smart Search" | ||
msgstr "" | ||
|
||
#. module: base_view_inheritance_extension | ||
#: model:ir.model,name:base_view_inheritance_extension.model_ir_ui_view | ||
msgid "View" | ||
msgstr "" | ||
|
||
#~ msgid "ir.ui.view" | ||
#~ msgstr "ir.ui.view" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# Translation of Odoo Server. | ||
# This file contains the translation of the following modules: | ||
# * base_view_inheritance_extension | ||
# | ||
# Translators: | ||
# Pedro M. Baeza <[email protected]>, 2017 | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: Odoo Server 10.0\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"POT-Creation-Date: 2017-12-01 02:10+0000\n" | ||
"PO-Revision-Date: 2023-09-03 00:14+0000\n" | ||
"Last-Translator: Ivorra78 <[email protected]>\n" | ||
"Language-Team: Spanish (https://www.transifex.com/oca/teams/23907/es/)\n" | ||
"Language: es\n" | ||
"MIME-Version: 1.0\n" | ||
"Content-Type: text/plain; charset=UTF-8\n" | ||
"Content-Transfer-Encoding: \n" | ||
"Plural-Forms: nplurals=2; plural=n != 1;\n" | ||
"X-Generator: Weblate 4.17\n" | ||
|
||
#. module: base_view_inheritance_extension | ||
#: model_terms:ir.ui.view,arch_db:base_view_inheritance_extension.view_partner_simple_form | ||
msgid "Partner form" | ||
msgstr "Formulario de socio" | ||
|
||
#. module: base_view_inheritance_extension | ||
#: model_terms:ir.ui.view,arch_db:base_view_inheritance_extension.view_partner_simple_form | ||
msgid "Phone numbers" | ||
msgstr "Números de teléfono" | ||
|
||
#. module: base_view_inheritance_extension | ||
#: model:ir.model.fields,field_description:base_view_inheritance_extension.field_ir_ui_view__smart_search | ||
msgid "Smart Search" | ||
msgstr "Búsqueda inteligente" | ||
|
||
#. module: base_view_inheritance_extension | ||
#: model:ir.model,name:base_view_inheritance_extension.model_ir_ui_view | ||
msgid "View" | ||
msgstr "Vista" | ||
|
||
#~ msgid "ir.ui.view" | ||
#~ msgstr "ir.ui.view" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# Translation of Odoo Server. | ||
# This file contains the translation of the following modules: | ||
# * base_view_inheritance_extension | ||
# | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: Odoo Server 15.0\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"PO-Revision-Date: 2023-06-09 16:09+0000\n" | ||
"Last-Translator: Ignacio Buioli <[email protected]>\n" | ||
"Language-Team: none\n" | ||
"Language: es_AR\n" | ||
"MIME-Version: 1.0\n" | ||
"Content-Type: text/plain; charset=UTF-8\n" | ||
"Content-Transfer-Encoding: \n" | ||
"Plural-Forms: nplurals=2; plural=n != 1;\n" | ||
"X-Generator: Weblate 4.17\n" | ||
|
||
#. module: base_view_inheritance_extension | ||
#: model_terms:ir.ui.view,arch_db:base_view_inheritance_extension.view_partner_simple_form | ||
msgid "Partner form" | ||
msgstr "Contacto desde" | ||
|
||
#. module: base_view_inheritance_extension | ||
#: model_terms:ir.ui.view,arch_db:base_view_inheritance_extension.view_partner_simple_form | ||
msgid "Phone numbers" | ||
msgstr "Números de teléfono" | ||
|
||
#. module: base_view_inheritance_extension | ||
#: model:ir.model.fields,field_description:base_view_inheritance_extension.field_ir_ui_view__smart_search | ||
msgid "Smart Search" | ||
msgstr "Búsqueda Inteligente" | ||
|
||
#. module: base_view_inheritance_extension | ||
#: model:ir.model,name:base_view_inheritance_extension.model_ir_ui_view | ||
msgid "View" | ||
msgstr "Vista" |
Oops, something went wrong.