Browse Source

[MIG] partner_pricelist_search: Migration to v13.0

TT28442
14.0
Carlos Dauden 4 years ago
committed by Víctor Martínez
parent
commit
3f13ce0c06
  1. 10
      partner_pricelist_search/README.rst
  2. 8
      partner_pricelist_search/__manifest__.py
  3. 11
      partner_pricelist_search/i18n/partner_pricelist_search.pot
  4. 6
      partner_pricelist_search/static/description/index.html
  5. 8
      partner_pricelist_search/tests/test_partner_pricelist_search.py
  6. 6
      partner_pricelist_search/views/product_pricelist_views.xml

10
partner_pricelist_search/README.rst

@ -14,13 +14,13 @@ Partner pricelist search
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3 :alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fpartner--contact-lightgray.png?logo=github .. |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_pricelist_search
:target: https://github.com/OCA/partner-contact/tree/13.0/partner_pricelist_search
:alt: OCA/partner-contact :alt: OCA/partner-contact
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png .. |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_pricelist_search
:target: https://translation.odoo-community.org/projects/partner-contact-13-0/partner-contact-13-0-partner_pricelist_search
:alt: Translate me on Weblate :alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png .. |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 :alt: Try me on Runbot
|badge1| |badge2| |badge3| |badge4| |badge5| |badge1| |badge2| |badge3| |badge4| |badge5|
@ -49,7 +49,7 @@ Bug Tracker
Bugs are tracked on `GitHub Issues <https://github.com/OCA/partner-contact/issues>`_. Bugs are tracked on `GitHub Issues <https://github.com/OCA/partner-contact/issues>`_.
In case of trouble, please check there if your issue has already been reported. 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 If you spotted it first, help us smashing it by providing a detailed and welcomed
`feedback <https://github.com/OCA/partner-contact/issues/new?body=module:%20partner_pricelist_search%0Aversion:%2012.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
`feedback <https://github.com/OCA/partner-contact/issues/new?body=module:%20partner_pricelist_search%0Aversion:%2013.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. Do not contact contributors directly about support or help with technical issues.
@ -81,6 +81,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and mission is to support the collaborative development of Odoo features and
promote its widespread use. promote its widespread use.
This module is part of the `OCA/partner-contact <https://github.com/OCA/partner-contact/tree/12.0/partner_pricelist_search>`_ project on GitHub.
This module is part of the `OCA/partner-contact <https://github.com/OCA/partner-contact/tree/13.0/partner_pricelist_search>`_ project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

8
partner_pricelist_search/__manifest__.py

@ -3,12 +3,12 @@
{ {
"name": "Partner pricelist search", "name": "Partner pricelist search",
"version": "12.0.1.0.0",
"author": "Tecnativa," "Odoo Community Association (OCA)",
"version": "13.0.1.0.0",
"author": "Tecnativa,Odoo Community Association (OCA)",
"website": "https://github.com/OCA/partner-contact", "website": "https://github.com/OCA/partner-contact",
"category": "Partner Management", "category": "Partner Management",
"depends": ["product",],
"data": ["views/product_pricelist_views.xml",],
"depends": ["product"],
"data": ["views/product_pricelist_views.xml"],
"installable": True, "installable": True,
"license": "AGPL-3", "license": "AGPL-3",
} }

11
partner_pricelist_search/i18n/partner_pricelist_search.pot

@ -4,9 +4,9 @@
# #
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: Odoo Server 12.0\n"
"Project-Id-Version: Odoo Server 13.0\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"Last-Translator: <>\n"
"Last-Translator: \n"
"Language-Team: \n" "Language-Team: \n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
@ -31,7 +31,7 @@ msgid "Pricelist"
msgstr "" msgstr ""
#. module: partner_pricelist_search #. module: partner_pricelist_search
#: code:addons/partner_pricelist_search/models/res_partner.py:29
#: code:addons/partner_pricelist_search/models/res_partner.py:0
#, python-format #, python-format
msgid "Pricelist field do not support search with the operator '%s'." msgid "Pricelist field do not support search with the operator '%s'."
msgstr "" msgstr ""
@ -39,6 +39,7 @@ msgstr ""
#. module: partner_pricelist_search #. module: partner_pricelist_search
#: model:ir.model.fields,help:partner_pricelist_search.field_res_partner__property_product_pricelist #: model:ir.model.fields,help:partner_pricelist_search.field_res_partner__property_product_pricelist
#: model:ir.model.fields,help:partner_pricelist_search.field_res_users__property_product_pricelist #: model:ir.model.fields,help:partner_pricelist_search.field_res_users__property_product_pricelist
msgid "This pricelist will be used, instead of the default one, for sales to the current partner"
msgid ""
"This pricelist will be used, instead of the default one, for sales to the "
"current partner"
msgstr "" msgstr ""

6
partner_pricelist_search/static/description/index.html

@ -367,7 +367,7 @@ ul.auto-toc {
!! This file is generated by oca-gen-addon-readme !! !! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !! !! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external" href="https://github.com/OCA/partner-contact/tree/12.0/partner_pricelist_search"><img alt="OCA/partner-contact" src="https://img.shields.io/badge/github-OCA%2Fpartner--contact-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/partner-contact-12-0/partner-contact-12-0-partner_pricelist_search"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external" href="https://runbot.odoo-community.org/runbot/134/12.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p>
<p><a class="reference external" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external" href="https://github.com/OCA/partner-contact/tree/13.0/partner_pricelist_search"><img alt="OCA/partner-contact" src="https://img.shields.io/badge/github-OCA%2Fpartner--contact-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/partner-contact-13-0/partner-contact-13-0-partner_pricelist_search"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external" href="https://runbot.odoo-community.org/runbot/134/13.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p>
<p>This module adds search by pricelist field option in partners.</p> <p>This module adds search by pricelist field option in partners.</p>
<p>Also add a new smart button called “Customers” in pricelist form view to show <p>Also add a new smart button called “Customers” in pricelist form view to show
partners with that pricelist.</p> partners with that pricelist.</p>
@ -395,7 +395,7 @@ computed.</p>
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/partner-contact/issues">GitHub Issues</a>. <p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/partner-contact/issues">GitHub Issues</a>.
In case of trouble, please check there if your issue has already been reported. 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 If you spotted it first, help us smashing it by providing a detailed and welcomed
<a class="reference external" href="https://github.com/OCA/partner-contact/issues/new?body=module:%20partner_pricelist_search%0Aversion:%2012.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<a class="reference external" href="https://github.com/OCA/partner-contact/issues/new?body=module:%20partner_pricelist_search%0Aversion:%2013.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<p>Do not contact contributors directly about support or help with technical issues.</p> <p>Do not contact contributors directly about support or help with technical issues.</p>
</div> </div>
<div class="section" id="credits"> <div class="section" id="credits">
@ -422,7 +422,7 @@ If you spotted it first, help us smashing it by providing a detailed and welcome
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose <p>OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and mission is to support the collaborative development of Odoo features and
promote its widespread use.</p> promote its widespread use.</p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/partner-contact/tree/12.0/partner_pricelist_search">OCA/partner-contact</a> project on GitHub.</p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/partner-contact/tree/13.0/partner_pricelist_search">OCA/partner-contact</a> project on GitHub.</p>
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p> <p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
</div> </div>
</div> </div>

8
partner_pricelist_search/tests/test_partner_pricelist_search.py

@ -10,16 +10,16 @@ class TestPartnerPricelistSearch(common.SavepointCase):
def setUpClass(cls): def setUpClass(cls):
super().setUpClass() super().setUpClass()
cls.pricelist_1 = cls.env["product.pricelist"].create( cls.pricelist_1 = cls.env["product.pricelist"].create(
{"name": "Test pricelist 1",}
{"name": "Test pricelist 1"}
) )
cls.pricelist_2 = cls.env["product.pricelist"].create( cls.pricelist_2 = cls.env["product.pricelist"].create(
{"name": "Test pricelist 2",}
{"name": "Test pricelist 2"}
) )
cls.customer_1 = cls.env["res.partner"].create( cls.customer_1 = cls.env["res.partner"].create(
{"name": "Test customer 1", "property_product_pricelist": cls.pricelist_1,}
{"name": "Test customer 1", "property_product_pricelist": cls.pricelist_1}
) )
cls.customer_2 = cls.env["res.partner"].create( cls.customer_2 = cls.env["res.partner"].create(
{"name": "Test customer 2", "property_product_pricelist": cls.pricelist_2,}
{"name": "Test customer 2", "property_product_pricelist": cls.pricelist_2}
) )
cls.partner_obj = cls.env["res.partner"] cls.partner_obj = cls.env["res.partner"]

6
partner_pricelist_search/views/product_pricelist_views.xml

@ -4,7 +4,8 @@
<field name="model">product.pricelist</field> <field name="model">product.pricelist</field>
<field name="inherit_id" ref="product.product_pricelist_view" /> <field name="inherit_id" ref="product.product_pricelist_view" />
<field name="arch" type="xml"> <field name="arch" type="xml">
<button name="toggle_active" position="before">
<widget name="web_ribbon" position="before">
<div class="oe_button_box" name="button_box">
<button <button
name="show_pricelist_partners" name="show_pricelist_partners"
type="object" type="object"
@ -12,7 +13,8 @@
class="oe_stat_button" class="oe_stat_button"
icon="fa-users" icon="fa-users"
/> />
</button>
</div>
</widget>
</field> </field>
</record> </record>
</odoo> </odoo>
Loading…
Cancel
Save