diff --git a/website_sale_order_type/README.rst b/website_sale_order_type/README.rst index bebd2c89f8..fca8369b9f 100644 --- a/website_sale_order_type/README.rst +++ b/website_sale_order_type/README.rst @@ -14,13 +14,13 @@ Website sale order type :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html :alt: License: AGPL-3 .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fe--commerce-lightgray.png?logo=github - :target: https://github.com/OCA/e-commerce/tree/10.0/website_sale_order_type + :target: https://github.com/OCA/e-commerce/tree/12.0/website_sale_order_type :alt: OCA/e-commerce .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png - :target: https://translation.odoo-community.org/projects/e-commerce-10-0/e-commerce-10-0-website_sale_order_type + :target: https://translation.odoo-community.org/projects/e-commerce-12-0/e-commerce-12-0-website_sale_order_type :alt: Translate me on Weblate .. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png - :target: https://runbot.odoo-community.org/runbot/113/10.0 + :target: https://runbot.odoo-community.org/runbot/113/12.0 :alt: Try me on Runbot |badge1| |badge2| |badge3| |badge4| |badge5| @@ -50,7 +50,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. @@ -67,6 +67,10 @@ Contributors * Simone Rubino +* `Tecnativa `_: + + * João Marques + Maintainers ~~~~~~~~~~~ @@ -80,6 +84,14 @@ 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/e-commerce `_ project on GitHub. +.. |maintainer-joao-p-marques| image:: https://github.com/joao-p-marques.png?size=40px + :target: https://github.com/joao-p-marques + :alt: joao-p-marques + +Current `maintainer `__: + +|maintainer-joao-p-marques| + +This module is part of the `OCA/e-commerce `_ project on GitHub. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/website_sale_order_type/__manifest__.py b/website_sale_order_type/__manifest__.py index f990ecfc12..71ae7dbce2 100644 --- a/website_sale_order_type/__manifest__.py +++ b/website_sale_order_type/__manifest__.py @@ -4,11 +4,11 @@ { "name": "Website sale order type", "summary": "This module allows sale_order_type to work with website_sale.", - "version": "11.0.1.0.0", + "version": "12.0.1.0.0", "development_status": "Beta", "category": "Website", - "website": "https://github.com/OCA/e-commerce/tree/" - "10.0/website_sale_order_type", + "website": "https://github.com/OCA/e-commerce/", + "maintainers": ["joao-p-marques"], "author": "Agile Business Group, Odoo Community Association (OCA)", "license": "AGPL-3", "depends": [ diff --git a/website_sale_order_type/models/sale_order.py b/website_sale_order_type/models/sale_order.py index 3f7f412796..64ff4b1e2d 100644 --- a/website_sale_order_type/models/sale_order.py +++ b/website_sale_order_type/models/sale_order.py @@ -15,8 +15,5 @@ def _cart_update( res = super(SaleOrder, self)._cart_update( product_id=product_id, line_id=line_id, add_qty=add_qty, set_qty=set_qty, attributes=attributes, **kwargs) - if self.partner_id.sale_type: - self.type_id = self.partner_id.sale_type - self.onchange_type_id() - self.match_order_type() + self.onchange_partner_id() # Method from sale_order_type updates type_id return res diff --git a/website_sale_order_type/static/description/index.html b/website_sale_order_type/static/description/index.html index 46e216fa61..671e57992e 100644 --- a/website_sale_order_type/static/description/index.html +++ b/website_sale_order_type/static/description/index.html @@ -367,7 +367,7 @@

Website sale order type

!! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> -

Beta License: AGPL-3 OCA/e-commerce Translate me on Weblate Try me on Runbot

+

Beta License: AGPL-3 OCA/e-commerce Translate me on Weblate Try me on Runbot

This module allows sale_order_type to work with website_sale.

This module is useful for users having a sale order type defined in their Partner form: when these users buy a product in the e-commerce, the sale order generated will have the same sale order type that is defined in their Partner form.

@@ -398,7 +398,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.

@@ -411,8 +411,16 @@

Authors

Contributors

+
@@ -422,7 +430,9 @@

Maintainers

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/e-commerce project on GitHub.

+

Current maintainer:

+

joao-p-marques

+

This module is part of the OCA/e-commerce project on GitHub.

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

diff --git a/website_sale_order_type/tests/test_website_sale_order_type.py b/website_sale_order_type/tests/test_website_sale_order_type.py index 68d1ce6e1d..2ed1185f05 100644 --- a/website_sale_order_type/tests/test_website_sale_order_type.py +++ b/website_sale_order_type/tests/test_website_sale_order_type.py @@ -11,7 +11,7 @@ def setUp(self): self.env = api.Environment(self.registry.test_cr, self.uid, {}) self.sale_type_model = self.env['sale.order.type'] - self.partner = self.env.ref('base.partner_root') + self.partner = self.env.ref('base.partner_admin') self.sale_type = self.create_sale_type() def create_sale_type(self): @@ -27,7 +27,7 @@ def create_sale_type(self): self.immediate_payment = self.env.ref( 'account.account_payment_term_immediate') self.sale_pricelist = self.env.ref('product.list0') - self.free_carrier = self.env.ref('stock.incoterm_FCA') + self.free_carrier = self.env.ref('account.incoterm_FCA') return self.sale_type_model.create({ 'name': 'Test Sale Order Type', 'sequence_id': self.sequence.id,