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] website_sale_order_type #922

Open
wants to merge 27 commits into
base: 17.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
e1bdaa7
[ADD] website_sale_order_type (#253)
SimoRubi Jan 14, 2019
c29bb96
[MIG] website_sale_order_type: Migration to 11.0
joao-p-marques Oct 26, 2020
79c1cb7
[MIG] website_sale_order_type: Migration to 12.0
joao-p-marques Oct 26, 2020
d96ceb4
[FIX] website_sale_order_type: speed up tour
Nov 6, 2020
a529c78
[FIX] website_sale_order_type: simplify tour
joao-p-marques Jan 5, 2021
9c484e8
Added translation using Weblate (Spanish)
claudiagn Jan 20, 2021
910f59a
Added translation using Weblate (Catalan)
claudiagn Jan 20, 2021
b47722e
[FIX] webiste_sale_order_type: trigger onchanges
chienandalu Jun 7, 2021
9f7505c
[IMP] website_sale_order_type: black, isort, prettier
oihane Sep 16, 2021
1eba122
[MIG] website_sale_order_type: Migration to 13.0
oihane Sep 16, 2021
9841652
[IMP] website_sale_order_type: black, isort, prettier
oihane Sep 21, 2021
875be5f
[MIG] website_sale_order_type: Migration to 14.0
oihane Sep 21, 2021
4ff3a81
[15.0][MIG] website_sale_order_type: Migration to version 15.0
stefan-tecnativa Dec 15, 2022
409b651
[UPD] Update website_sale_order_type.pot
Dec 16, 2022
cf56cf4
[UPD] README.rst
OCA-git-bot Dec 16, 2022
e6d8d53
Update translation files
weblate Dec 16, 2022
699d30a
Translated using Weblate (Spanish)
Ivorra78 Jul 5, 2023
eb5b778
[MIG] website_sale_order_type: Migration to version 16.0
pilarvargas-tecnativa Aug 10, 2023
bb63499
[UPD] Update website_sale_order_type.pot
Aug 22, 2023
41d2128
[UPD] README.rst
OCA-git-bot Aug 22, 2023
ae11f26
[UPD] README.rst
OCA-git-bot Sep 3, 2023
849a697
Update translation files
weblate Sep 3, 2023
371d601
Translated using Weblate (Spanish)
Ivorra78 Sep 5, 2023
2c7d809
Added translation using Weblate (Italian)
mymage May 8, 2024
3725121
Translated using Weblate (Italian)
mymage May 8, 2024
69b6e48
[IMP] website_sale_order_type: pre-commit auto fixes
dalonsod May 8, 2024
2a8ba38
[MIG] website_sale_order_type: Migration to 17.0
dalonsod May 8, 2024
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
Prev Previous commit
Next Next commit
[MIG] website_sale_order_type: Migration to 12.0
  • Loading branch information
joao-p-marques authored and dalonsod committed May 8, 2024
commit 79c1cb7c5775e7bbb05dbf3f30f647f5137ac0b1
22 changes: 17 additions & 5 deletions website_sale_order_type/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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|
Expand Down Expand Up @@ -50,7 +50,7 @@ Bug Tracker
Bugs are tracked on `GitHub Issues <https://github.com/OCA/e-commerce/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 <https://github.com/OCA/e-commerce/issues/new?body=module:%20website_sale_order_type%0Aversion:%2010.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
`feedback <https://github.com/OCA/e-commerce/issues/new?body=module:%20website_sale_order_type%0Aversion:%2012.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.

Expand All @@ -67,6 +67,10 @@ Contributors

* Simone Rubino <[email protected]>

* `Tecnativa <https://www.tecnativa.com>`_:

* João Marques

Maintainers
~~~~~~~~~~~

Expand All @@ -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 <https://github.com/OCA/e-commerce/tree/10.0/website_sale_order_type>`_ 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 <https://odoo-community.org/page/maintainer-role>`__:

|maintainer-joao-p-marques|

This module is part of the `OCA/e-commerce <https://github.com/OCA/e-commerce/tree/12.0/website_sale_order_type>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
6 changes: 3 additions & 3 deletions website_sale_order_type/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
Expand Down
8 changes: 4 additions & 4 deletions website_sale_order_type/models/sale_order.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ 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()
sale_type = (self.partner_id.sale_type or
self.partner_id.commercial_partner_id.sale_type)
if sale_type:
self.type_id = sale_type
return res
18 changes: 14 additions & 4 deletions website_sale_order_type/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ <h1 class="title">Website sale order type</h1>
!! This file is generated by oca-gen-addon-readme !!
!! 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/e-commerce/tree/10.0/website_sale_order_type"><img alt="OCA/e-commerce" src="https://img.shields.io/badge/github-OCA%2Fe--commerce-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/e-commerce-10-0/e-commerce-10-0-website_sale_order_type"><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/113/10.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/e-commerce/tree/12.0/website_sale_order_type"><img alt="OCA/e-commerce" src="https://img.shields.io/badge/github-OCA%2Fe--commerce-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/e-commerce-12-0/e-commerce-12-0-website_sale_order_type"><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/113/12.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p>
<p>This module allows <a class="reference external" href="https://github.com/OCA/sale-workflow/tree/10.0/sale_order_type">sale_order_type</a> to work with website_sale.</p>
<p>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.</p>
Expand Down Expand Up @@ -398,7 +398,7 @@ <h1><a class="toc-backref" href="#id2">Bug Tracker</a></h1>
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/e-commerce/issues">GitHub Issues</a>.
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
<a class="reference external" href="https://github.com/OCA/e-commerce/issues/new?body=module:%20website_sale_order_type%0Aversion:%2010.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/e-commerce/issues/new?body=module:%20website_sale_order_type%0Aversion:%2012.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>
</div>
<div class="section" id="credits">
Expand All @@ -411,8 +411,16 @@ <h2><a class="toc-backref" href="#id4">Authors</a></h2>
</div>
<div class="section" id="contributors">
<h2><a class="toc-backref" href="#id5">Contributors</a></h2>
<ul>
<li><p class="first">Simone Rubino &lt;<a class="reference external" href="mailto:simone.rubino&#64;agilebg.com">simone.rubino&#64;agilebg.com</a>&gt;</p>
</li>
<li><p class="first"><a class="reference external" href="https://www.tecnativa.com">Tecnativa</a>:</p>
<blockquote>
<ul class="simple">
<li>Simone Rubino &lt;<a class="reference external" href="mailto:simone.rubino&#64;agilebg.com">simone.rubino&#64;agilebg.com</a>&gt;</li>
<li>João Marques</li>
</ul>
</blockquote>
</li>
</ul>
</div>
<div class="section" id="maintainers">
Expand All @@ -422,7 +430,9 @@ <h2><a class="toc-backref" href="#id6">Maintainers</a></h2>
<p>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.</p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/e-commerce/tree/10.0/website_sale_order_type">OCA/e-commerce</a> project on GitHub.</p>
<p>Current <a class="reference external" href="https://odoo-community.org/page/maintainer-role">maintainer</a>:</p>
<p><a class="reference external" href="https://github.com/joao-p-marques"><img alt="joao-p-marques" src="https://github.com/joao-p-marques.png?size=40px" /></a></p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/e-commerce/tree/12.0/website_sale_order_type">OCA/e-commerce</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>
</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions website_sale_order_type/tests/test_website_sale_order_type.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand All @@ -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,
Expand Down