From f5962710a1e4946efc9206bbd30c5c3056c29000 Mon Sep 17 00:00:00 2001 From: kongrattapong Date: Fri, 20 Dec 2019 10:20:34 +0700 Subject: [PATCH] [MIG] partner_capital: Migration to 13.0 --- partner_capital/README.rst | 11 +-- partner_capital/__init__.py | 2 + partner_capital/__manifest__.py | 2 +- partner_capital/i18n/partner_capital.pot | 15 ++-- partner_capital/models/__init__.py | 2 + partner_capital/models/res_partner.py | 14 ++-- partner_capital/readme/CONTRIBUTORS.rst | 1 + partner_capital/static/description/index.html | 7 +- .../views/res_partner_turnover_range_view.xml | 43 +++++----- partner_capital/views/res_partner_view.xml | 81 ++++++++++--------- 10 files changed, 93 insertions(+), 85 deletions(-) diff --git a/partner_capital/README.rst b/partner_capital/README.rst index 8cf1a7e64..473b61321 100644 --- a/partner_capital/README.rst +++ b/partner_capital/README.rst @@ -14,13 +14,13 @@ Partners Capital :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html :alt: License: AGPL-3 .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fpartner--contact-lightgray.png?logo=github - :target: https://github.com/OCA/partner-contact/tree/12.0/partner_capital + :target: https://github.com/OCA/partner-contact/tree/13.0/partner_capital :alt: OCA/partner-contact .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png - :target: https://translation.odoo-community.org/projects/partner-contact-12-0/partner-contact-12-0-partner_capital + :target: https://translation.odoo-community.org/projects/partner-contact-13-0/partner-contact-13-0-partner_capital :alt: Translate me on Weblate .. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png - :target: https://runbot.odoo-community.org/runbot/134/12.0 + :target: https://runbot.odoo-community.org/runbot/134/13.0 :alt: Try me on Runbot |badge1| |badge2| |badge3| |badge4| |badge5| @@ -65,7 +65,7 @@ Bug Tracker Bugs are tracked on `GitHub Issues `_. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us smashing it by providing a detailed and welcomed -`feedback `_. +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -86,6 +86,7 @@ Contributors * Jairo Llopis * David Vidal * Alexandre Díaz +* Rattapong Chokmasermkul Maintainers ~~~~~~~~~~~ @@ -100,6 +101,6 @@ 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/partner-contact `_ project on GitHub. +This module is part of the `OCA/partner-contact `_ project on GitHub. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/partner_capital/__init__.py b/partner_capital/__init__.py index 0650744f6..4b76c7b2d 100644 --- a/partner_capital/__init__.py +++ b/partner_capital/__init__.py @@ -1 +1,3 @@ +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). + from . import models diff --git a/partner_capital/__manifest__.py b/partner_capital/__manifest__.py index 877dfcd3e..24c9407aa 100644 --- a/partner_capital/__manifest__.py +++ b/partner_capital/__manifest__.py @@ -5,7 +5,7 @@ { "name": "Partners Capital", - "version": "12.0.1.0.0", + "version": "13.0.1.0.1", "category": "Customer Relationship Management", "license": "AGPL-3", "author": "Antiun Ingeniería S.L., " diff --git a/partner_capital/i18n/partner_capital.pot b/partner_capital/i18n/partner_capital.pot index 2236aa7a3..4813e47a2 100644 --- a/partner_capital/i18n/partner_capital.pot +++ b/partner_capital/i18n/partner_capital.pot @@ -1,12 +1,12 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: -# * partner_capital +# * partner_capital # msgid "" msgstr "" -"Project-Id-Version: Odoo Server 12.0\n" +"Project-Id-Version: Odoo Server 13.0\n" "Report-Msgid-Bugs-To: \n" -"Last-Translator: <>\n" +"Last-Translator: \n" "Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -14,7 +14,7 @@ msgstr "" "Plural-Forms: \n" #. module: partner_capital -#: selection:res.partner,company_size:0 +#: model:ir.model.fields.selection,name:partner_capital.selection__res_partner__company_size__big msgid "Big" msgstr "" @@ -96,12 +96,12 @@ msgid "Last Updated on" msgstr "" #. module: partner_capital -#: selection:res.partner,company_size:0 +#: model:ir.model.fields.selection,name:partner_capital.selection__res_partner__company_size__medium msgid "Medium" msgstr "" #. module: partner_capital -#: selection:res.partner,company_size:0 +#: model:ir.model.fields.selection,name:partner_capital.selection__res_partner__company_size__micro msgid "Micro" msgstr "" @@ -117,7 +117,7 @@ msgid "Publicly registered capital amount." msgstr "" #. module: partner_capital -#: selection:res.partner,company_size:0 +#: model:ir.model.fields.selection,name:partner_capital.selection__res_partner__company_size__small msgid "Small" msgstr "" @@ -145,4 +145,3 @@ msgstr "" #: model_terms:ir.ui.view,arch_db:partner_capital.res_partner_turnover_range_tree_view msgid "Turnover ranges" msgstr "" - diff --git a/partner_capital/models/__init__.py b/partner_capital/models/__init__.py index 15a64961d..2f919913d 100644 --- a/partner_capital/models/__init__.py +++ b/partner_capital/models/__init__.py @@ -1,2 +1,4 @@ +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). + from . import res_partner_turnover_range from . import res_partner diff --git a/partner_capital/models/res_partner.py b/partner_capital/models/res_partner.py index e15d62c24..c6aae0b9f 100644 --- a/partner_capital/models/res_partner.py +++ b/partner_capital/models/res_partner.py @@ -9,17 +9,21 @@ class ResPartner(models.Model): _inherit = "res.partner" capital_country_id = fields.Many2one( - "res.country", - "Capital country", + comodel_name="res.country", + string="Capital country", help="Country of origin of this company's capital.", ) capital_amount = fields.Monetary( - "Capital amount", + string="Capital amount", currency_field="capital_currency_id", help="Publicly registered capital amount.", ) - capital_currency_id = fields.Many2one("res.currency", string="Capital currency") - turnover_range_id = fields.Many2one("res.partner.turnover_range", "Turnover range") + capital_currency_id = fields.Many2one( + comodel_name="res.currency", string="Capital currency" + ) + turnover_range_id = fields.Many2one( + comodel_name="res.partner.turnover_range", string="Turnover range" + ) turnover_amount = fields.Float() company_size = fields.Selection( string="Company size", diff --git a/partner_capital/readme/CONTRIBUTORS.rst b/partner_capital/readme/CONTRIBUTORS.rst index e92a687e7..af202cd4b 100644 --- a/partner_capital/readme/CONTRIBUTORS.rst +++ b/partner_capital/readme/CONTRIBUTORS.rst @@ -3,3 +3,4 @@ * Jairo Llopis * David Vidal * Alexandre Díaz +* Rattapong Chokmasermkul diff --git a/partner_capital/static/description/index.html b/partner_capital/static/description/index.html index 7c861249a..205ccd05e 100644 --- a/partner_capital/static/description/index.html +++ b/partner_capital/static/description/index.html @@ -367,7 +367,7 @@ ul.auto-toc { !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> -

Beta License: AGPL-3 OCA/partner-contact Translate me on Weblate Try me on Runbot

+

Beta License: AGPL-3 OCA/partner-contact Translate me on Weblate Try me on Runbot

This module extends the functionality of partners to support setting the country of origin of capital, registered capital amount and turnover.

By capital country we mean country of origin of the capital of the company.

@@ -413,7 +413,7 @@ company.

Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us smashing it by providing a detailed and welcomed -feedback.

+feedback.

Do not contact contributors directly about support or help with technical issues.

@@ -433,6 +433,7 @@ If you spotted it first, help us smashing it by providing a detailed and welcome
  • Jairo Llopis <jairo.llopis@tecnativa.com>
  • David Vidal <david.vidal@tecnativa.com>
  • Alexandre Díaz <alexandre.diaz@tecnativa.com>
  • +
  • Rattapong Chokmasermkul <rattapongc@ecosoft.co.th>
  • @@ -442,7 +443,7 @@ If you spotted it first, help us smashing it by providing a detailed and welcome

    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/partner-contact project on GitHub.

    +

    This module is part of the OCA/partner-contact project on GitHub.

    You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

    diff --git a/partner_capital/views/res_partner_turnover_range_view.xml b/partner_capital/views/res_partner_turnover_range_view.xml index 7a896d929..5c7558350 100644 --- a/partner_capital/views/res_partner_turnover_range_view.xml +++ b/partner_capital/views/res_partner_turnover_range_view.xml @@ -1,26 +1,21 @@ - - - - - Turnover ranges - res.partner.turnover_range - form - tree - - - - CRM Turnover range tree - res.partner.turnover_range - - - - - - - - - + + Turnover ranges + res.partner.turnover_range + tree + + + CRM Turnover range tree + res.partner.turnover_range + + + + + + + diff --git a/partner_capital/views/res_partner_view.xml b/partner_capital/views/res_partner_view.xml index f00ba4c94..b52ded866 100644 --- a/partner_capital/views/res_partner_view.xml +++ b/partner_capital/views/res_partner_view.xml @@ -1,47 +1,50 @@ - - - - - Partner form with capital info - res.partner - - - - - - - - - - - - - - - - - Partner search with capital - res.partner - - - - + Partner form with capital info + res.partner + + + + + + + + + + + + + + + + Partner search with capital + res.partner + + + + - + - + - - - - + context="{'group_by': 'company_size'}" + /> + + +