Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[16.0][MIG] web_m2x_options_manager : Migrate to 16.0 #2587

Open
wants to merge 10 commits into
base: 16.0
Choose a base branch
from
6 changes: 6 additions & 0 deletions setup/web_m2x_options_manager/setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import setuptools

setuptools.setup(
setup_requires=['setuptools-odoo'],
odoo_addon=True,
)
91 changes: 91 additions & 0 deletions web_m2x_options_manager/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
=======================
Web M2X Options Manager
=======================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:e2c7c70fbcb74be8ffaed3747c322112463936bb6fbb5a48c42d659a5f8ddce7
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fweb-lightgray.png?logo=github
:target: https://github.com/OCA/web/tree/16.0/web_m2x_options_manager
:alt: OCA/web
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/web-16-0/web-16-0-web_m2x_options_manager
: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/web&target_branch=16.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

Allows managing the "Create..." and "Create and Edit..." options for `Many2one`
and `Many2many` fields directly from the `ir.model` form view.

**Table of contents**

.. contents::
:local:

Usage
=====

Go to Settings > Technical > Models.

Choose the model you wish to edit, and open its form view. Go to the
"Create/Edit Options" tab, and add the fields you want to manage.

Button "Fill" will add every missing field to the options.
Button "Empty" will remove every option.

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/web/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/web/issues/new?body=module:%20web_m2x_options_manager%0Aversion:%2016.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
~~~~~~~

* Camptocamp

Contributors
~~~~~~~~~~~~

* `Camptocamp <https://www.camptocamp.com>`__:

* Silvio Gregorini
* Duong (Tran Quoc) <[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/web <https://github.com/OCA/web/tree/16.0/web_m2x_options_manager>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
4 changes: 4 additions & 0 deletions web_m2x_options_manager/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Copyright 2021 Camptocamp SA
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from . import models
23 changes: 23 additions & 0 deletions web_m2x_options_manager/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Copyright 2021 Camptocamp SA
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

{
"name": "Web M2X Options Manager",
"summary": 'Adds an interface to manage the "Create" and'
' "Create and Edit" options for specific models and'
" fields.",
"version": "16.0.1.0.0",
"author": "Camptocamp, Odoo Community Association (OCA)",
"license": "AGPL-3",
"category": "Web",
"data": [
"security/ir.model.access.csv",
"views/ir_model.xml",
],
"demo": [
"demo/res_partner_demo_view.xml",
],
"depends": ["base", "web_m2x_options"],
"website": "https://github.com/OCA/web",
"installable": True,
}
29 changes: 29 additions & 0 deletions web_m2x_options_manager/demo/res_partner_demo_view.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>

<record id="res_partner_demo_form_view" model="ir.ui.view">
<field name="name">res.partner.demo.form.view</field>
<field name="model">res.partner</field>
<field name="priority">1000</field>
<field name="arch" type="xml">
<form>
<sheet>
<group>
<!-- Many2one -->
<field name="title" />
<!-- Many2many -->
<field name="category_id" options="{'create': False}" />
<!-- One2many -->
<field name="user_ids">
<tree>
<!-- Many2one within tree -->
<field name="company_id" options="{'create': False}" />
</tree>
</field>
</group>
</sheet>
</form>
</field>
</record>

</odoo>
210 changes: 210 additions & 0 deletions web_m2x_options_manager/i18n/web_m2x_options_manager.pot
Original file line number Diff line number Diff line change
@@ -0,0 +1,210 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * web_m2x_options_manager
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 14.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: web_m2x_options_manager
#: code:addons/web_m2x_options_manager/models/m2x_create_edit_option.py:0
#, python-format
msgid "'%s' is not a valid field for model '%s'!"
msgstr ""

#. module: web_m2x_options_manager
#: model:ir.model.fields.selection,name:web_m2x_options_manager.selection__m2x_create_edit_option__option_create__set_true
#: model:ir.model.fields.selection,name:web_m2x_options_manager.selection__m2x_create_edit_option__option_create_edit__set_true
msgid "Add"
msgstr ""

#. module: web_m2x_options_manager
#: model:ir.model.fields,field_description:web_m2x_options_manager.field_m2x_create_edit_option__option_create_edit
msgid "Create & Edit Option"
msgstr ""

#. module: web_m2x_options_manager
#: model:ir.model.fields,field_description:web_m2x_options_manager.field_m2x_create_edit_option__option_create_edit_wizard
msgid "Create & Edit Wizard"
msgstr ""

#. module: web_m2x_options_manager
#: model:ir.model.fields,field_description:web_m2x_options_manager.field_m2x_create_edit_option__option_create
msgid "Create Option"
msgstr ""

#. module: web_m2x_options_manager
#: model_terms:ir.ui.view,arch_db:web_m2x_options_manager.view_model_form_inherit
msgid "Create/Edit Options"
msgstr ""

#. module: web_m2x_options_manager
#: model:ir.model.fields,field_description:web_m2x_options_manager.field_m2x_create_edit_option__create_uid
msgid "Created by"
msgstr ""

#. module: web_m2x_options_manager
#: model:ir.model.fields,field_description:web_m2x_options_manager.field_m2x_create_edit_option__create_date
msgid "Created on"
msgstr ""

#. module: web_m2x_options_manager
#: model:ir.model.fields,help:web_m2x_options_manager.field_m2x_create_edit_option__option_create_edit_wizard
msgid ""
"Defines behaviour for 'Create & Edit' Wizard\n"
"Set to False to prevent 'Create & Edit' Wizard to pop up"
msgstr ""

#. module: web_m2x_options_manager
#: model:ir.model.fields,help:web_m2x_options_manager.field_m2x_create_edit_option__option_create_edit
msgid ""
"Defines behaviour for 'Create & Edit' option:\n"
"* Do nothing: nothing is done\n"
"* Add/Remove: option 'Create & Edit' is set to True/False only if not already present in view definition\n"
"* Force Add/Remove: option 'Create & Edit' is always set to True/False, overriding any pre-existing option"
msgstr ""

#. module: web_m2x_options_manager
#: model:ir.model.fields,help:web_m2x_options_manager.field_m2x_create_edit_option__option_create
msgid ""
"Defines behaviour for 'Create' option:\n"
"* Do nothing: nothing is done\n"
"* Add/Remove: option 'Create' is set to True/False only if not already present in view definition\n"
"* Force Add/Remove: option 'Create' is always set to True/False, overriding any pre-existing option"
msgstr ""

#. module: web_m2x_options_manager
#: model:ir.model.fields,field_description:web_m2x_options_manager.field_ir_model__display_name
#: model:ir.model.fields,field_description:web_m2x_options_manager.field_ir_model_fields__display_name
#: model:ir.model.fields,field_description:web_m2x_options_manager.field_ir_ui_view__display_name
#: model:ir.model.fields,field_description:web_m2x_options_manager.field_m2x_create_edit_option__display_name
msgid "Display Name"
msgstr ""

#. module: web_m2x_options_manager
#: model:ir.model.fields.selection,name:web_m2x_options_manager.selection__m2x_create_edit_option__option_create__none
#: model:ir.model.fields.selection,name:web_m2x_options_manager.selection__m2x_create_edit_option__option_create_edit__none
msgid "Do nothing"
msgstr ""

#. module: web_m2x_options_manager
#: model_terms:ir.ui.view,arch_db:web_m2x_options_manager.view_model_form_inherit
msgid "Empty"
msgstr ""

#. module: web_m2x_options_manager
#: model:ir.model.fields,field_description:web_m2x_options_manager.field_m2x_create_edit_option__field_id
msgid "Field"
msgstr ""

#. module: web_m2x_options_manager
#: model:ir.model.fields,field_description:web_m2x_options_manager.field_m2x_create_edit_option__field_name
msgid "Field Name"
msgstr ""

#. module: web_m2x_options_manager
#: model:ir.model,name:web_m2x_options_manager.model_ir_model_fields
msgid "Fields"
msgstr ""

#. module: web_m2x_options_manager
#: model_terms:ir.ui.view,arch_db:web_m2x_options_manager.view_model_form_inherit
msgid "Fields Description"
msgstr ""

#. module: web_m2x_options_manager
#: model_terms:ir.ui.view,arch_db:web_m2x_options_manager.view_model_form_inherit
msgid "Fill"
msgstr ""

#. module: web_m2x_options_manager
#: model:ir.model.fields.selection,name:web_m2x_options_manager.selection__m2x_create_edit_option__option_create__force_true
#: model:ir.model.fields.selection,name:web_m2x_options_manager.selection__m2x_create_edit_option__option_create_edit__force_true
msgid "Force Add"
msgstr ""

#. module: web_m2x_options_manager
#: model:ir.model.fields.selection,name:web_m2x_options_manager.selection__m2x_create_edit_option__option_create__force_false
#: model:ir.model.fields.selection,name:web_m2x_options_manager.selection__m2x_create_edit_option__option_create_edit__force_false
msgid "Force Remove"
msgstr ""

#. module: web_m2x_options_manager
#: model:ir.model.fields,field_description:web_m2x_options_manager.field_ir_model__id
#: model:ir.model.fields,field_description:web_m2x_options_manager.field_ir_model_fields__id
#: model:ir.model.fields,field_description:web_m2x_options_manager.field_ir_ui_view__id
#: model:ir.model.fields,field_description:web_m2x_options_manager.field_m2x_create_edit_option__id
msgid "ID"
msgstr ""

#. module: web_m2x_options_manager
#: model:ir.model.fields,field_description:web_m2x_options_manager.field_ir_model____last_update
#: model:ir.model.fields,field_description:web_m2x_options_manager.field_ir_model_fields____last_update
#: model:ir.model.fields,field_description:web_m2x_options_manager.field_ir_ui_view____last_update
#: model:ir.model.fields,field_description:web_m2x_options_manager.field_m2x_create_edit_option____last_update
msgid "Last Modified on"
msgstr ""

#. module: web_m2x_options_manager
#: model:ir.model.fields,field_description:web_m2x_options_manager.field_m2x_create_edit_option__write_uid
msgid "Last Updated by"
msgstr ""

#. module: web_m2x_options_manager
#: model:ir.model.fields,field_description:web_m2x_options_manager.field_m2x_create_edit_option__write_date
msgid "Last Updated on"
msgstr ""

#. module: web_m2x_options_manager
#: model:ir.model.fields,field_description:web_m2x_options_manager.field_ir_model__m2x_create_edit_option_ids
msgid "M2X Create Edit Option"
msgstr ""

#. module: web_m2x_options_manager
#: model:ir.model,name:web_m2x_options_manager.model_m2x_create_edit_option
msgid "Manage Options 'Create/Edit' For Fields"
msgstr ""

#. module: web_m2x_options_manager
#: model:ir.model.fields,field_description:web_m2x_options_manager.field_m2x_create_edit_option__model_id
msgid "Model"
msgstr ""

#. module: web_m2x_options_manager
#: model:ir.model.fields,field_description:web_m2x_options_manager.field_m2x_create_edit_option__model_name
msgid "Model Name"
msgstr ""

#. module: web_m2x_options_manager
#: model:ir.model,name:web_m2x_options_manager.model_ir_model
msgid "Models"
msgstr ""

#. module: web_m2x_options_manager
#: code:addons/web_m2x_options_manager/models/m2x_create_edit_option.py:0
#, python-format
msgid "Only Many2many and Many2one fields can be chosen!"
msgstr ""

#. module: web_m2x_options_manager
#: model:ir.model.constraint,message:web_m2x_options_manager.constraint_m2x_create_edit_option_model_field_uniqueness
msgid "Options must be unique for each model/field couple!"
msgstr ""

#. module: web_m2x_options_manager
#: model:ir.model.fields.selection,name:web_m2x_options_manager.selection__m2x_create_edit_option__option_create__set_false
#: model:ir.model.fields.selection,name:web_m2x_options_manager.selection__m2x_create_edit_option__option_create_edit__set_false
msgid "Remove"
msgstr ""

#. module: web_m2x_options_manager
#: model:ir.model,name:web_m2x_options_manager.model_ir_ui_view
msgid "View"
msgstr ""
6 changes: 6 additions & 0 deletions web_m2x_options_manager/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Copyright 2021 Camptocamp SA
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from . import ir_model
from . import ir_ui_view
from . import m2x_create_edit_option
Loading
Loading