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

[17.0] [MIG] res_company_search_view: Migration to 17.0 #597

Open
wants to merge 11 commits into
base: 17.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
89 changes: 89 additions & 0 deletions res_company_search_view/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
=====================
Company - Search View
=====================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:010fdfe6826893523af6a406f4af804aa241d13d705d700445badca9fecf7485
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |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%2Fmulti--company-lightgray.png?logo=github
:target: https://github.com/OCA/multi-company/tree/17.0/res_company_search_view
:alt: OCA/multi-company
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/multi-company-17-0/multi-company-17-0-res_company_search_view
: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/multi-company&target_branch=17.0
:alt: Try me on Runboat

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

This module simply add a search view for the ``res.company`` model.

It is used to be extended in other modules.

Technically, it is an adaptation of the ``res.partner`` search view.
(``base.view_res_partner_filter``)

**Table of contents**

.. contents::
:local:

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

Bugs are tracked on `GitHub Issues <https://github.com/OCA/multi-company/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/multi-company/issues/new?body=module:%20res_company_search_view%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
-------

* GRAP

Contributors
------------

- Sylvain LE GAL <https://twitter.com/legalsylvain>

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.

.. |maintainer-legalsylvain| image:: https://github.com/legalsylvain.png?size=40px
:target: https://github.com/legalsylvain
:alt: legalsylvain

Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:

|maintainer-legalsylvain|

This module is part of the `OCA/multi-company <https://github.com/OCA/multi-company/tree/17.0/res_company_search_view>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
1 change: 1 addition & 0 deletions res_company_search_view/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
17 changes: 17 additions & 0 deletions res_company_search_view/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Copyright (C) 2022 - Today: GRAP (http://www.grap.coop)
# @author: Sylvain LE GAL (https://twitter.com/legalsylvain)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

{
"name": "Company - Search View",
"summary": "Add a search view for company model",
"version": "17.0.1.0.0",
"category": "Tools",
"author": "GRAP, Odoo Community Association (OCA)",
"maintainers": ["legalsylvain"],
"website": "https://github.com/OCA/multi-company",
"license": "AGPL-3",
"depends": ["base"],
"data": ["views/view_res_company.xml"],
"installable": True,
}
32 changes: 32 additions & 0 deletions res_company_search_view/i18n/es.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * res_company_search_view
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2024-01-02 20:36+0000\n"
"Last-Translator: Ivorra78 <[email protected]>\n"
"Language-Team: none\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: res_company_search_view
#: model_terms:ir.ui.view,arch_db:res_company_search_view.view_res_company_search
msgid "Archived"
msgstr "Archivado"

#. module: res_company_search_view
#: model_terms:ir.ui.view,arch_db:res_company_search_view.view_res_company_search
msgid "Country"
msgstr "País"

#. module: res_company_search_view
#: model_terms:ir.ui.view,arch_db:res_company_search_view.view_res_company_search
msgid "Group By"
msgstr "Grupo Por"
32 changes: 32 additions & 0 deletions res_company_search_view/i18n/fr.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * res_company_search_view
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-10-14 09:45+0000\n"
"PO-Revision-Date: 2022-10-14 09:45+0000\n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"

#. module: res_company_search_view
#: model_terms:ir.ui.view,arch_db:res_company_search_view.view_res_company_search
msgid "Archived"
msgstr "Archivé"

#. module: res_company_search_view
#: model_terms:ir.ui.view,arch_db:res_company_search_view.view_res_company_search
msgid "Country"
msgstr "Pays"

#. module: res_company_search_view
#: model_terms:ir.ui.view,arch_db:res_company_search_view.view_res_company_search
msgid "Group By"
msgstr "Regrouper par"
32 changes: 32 additions & 0 deletions res_company_search_view/i18n/it.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * res_company_search_view
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2024-01-19 19:35+0000\n"
"Last-Translator: mymage <[email protected]>\n"
"Language-Team: none\n"
"Language: it\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: res_company_search_view
#: model_terms:ir.ui.view,arch_db:res_company_search_view.view_res_company_search
msgid "Archived"
msgstr "In archivio"

#. module: res_company_search_view
#: model_terms:ir.ui.view,arch_db:res_company_search_view.view_res_company_search
msgid "Country"
msgstr "Nazione"

#. module: res_company_search_view
#: model_terms:ir.ui.view,arch_db:res_company_search_view.view_res_company_search
msgid "Group By"
msgstr "Raggruppa per"
29 changes: 29 additions & 0 deletions res_company_search_view/i18n/res_company_search_view.pot
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:
# * res_company_search_view
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.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: res_company_search_view
#: model_terms:ir.ui.view,arch_db:res_company_search_view.view_res_company_search
msgid "Archived"
msgstr ""

#. module: res_company_search_view
#: model_terms:ir.ui.view,arch_db:res_company_search_view.view_res_company_search
msgid "Country"
msgstr ""

#. module: res_company_search_view
#: model_terms:ir.ui.view,arch_db:res_company_search_view.view_res_company_search
msgid "Group By"
msgstr ""
1 change: 1 addition & 0 deletions res_company_search_view/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import res_company
17 changes: 17 additions & 0 deletions res_company_search_view/models/res_company.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
from odoo import fields, models


class ResCompany(models.Model):
_inherit = "res.company"

# Field need to be stored to be used in search view
country_id = fields.Many2one(store=True)
# Other fields are also not stored, but we need to store them to avoid the following warning:
# UserWarning: res.company: inconsistent 'store' for computed fields,
# accessing street, street2, zip, city, state_id may recompute and update country_id.
# Use distinct compute methods for stored and non-stored fields.
street = fields.Char(store=True)
street2 = fields.Char(store=True)
zip = fields.Char(store=True)
city = fields.Char(store=True)
state_id = fields.Many2one(store=True)
3 changes: 3 additions & 0 deletions res_company_search_view/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["whool"]
build-backend = "whool.buildapi"
1 change: 1 addition & 0 deletions res_company_search_view/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Sylvain LE GAL \<<https://twitter.com/legalsylvain>\>
6 changes: 6 additions & 0 deletions res_company_search_view/readme/DESCRIPTION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
This module simply add a search view for the `res.company` model.

It is used to be extended in other modules.

Technically, it is an adaptation of the `res.partner` search view.
(`base.view_res_partner_filter`)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading