Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
f482c45
[ADD] website_sale_order_type (#253)
SimoRubi Jan 14, 2019
e64e5f8
[MIG] website_sale_order_type: Migration to 11.0
joao-p-marques Oct 26, 2020
b71669e
[MIG] website_sale_order_type: Migration to 12.0
joao-p-marques Oct 26, 2020
51749d4
[FIX] website_sale_order_type: speed up tour
Nov 6, 2020
e650473
[FIX] website_sale_order_type: simplify tour
joao-p-marques Jan 5, 2021
1438af7
Added translation using Weblate (Spanish)
claudiagn Jan 20, 2021
5549998
Added translation using Weblate (Catalan)
claudiagn Jan 20, 2021
34d35d6
[FIX] webiste_sale_order_type: trigger onchanges
chienandalu Jun 7, 2021
c00ac4a
[IMP] website_sale_order_type: black, isort, prettier
oihane Sep 16, 2021
0253a89
[MIG] website_sale_order_type: Migration to 13.0
oihane Sep 16, 2021
9470b42
[IMP] website_sale_order_type: black, isort, prettier
oihane Sep 21, 2021
25c017f
[MIG] website_sale_order_type: Migration to 14.0
oihane Sep 21, 2021
9ce51be
[15.0][MIG] website_sale_order_type: Migration to version 15.0
stefan-tecnativa Dec 15, 2022
102370b
Update translation files
weblate Dec 16, 2022
a4f7f44
Translated using Weblate (Spanish)
Ivorra78 Jul 5, 2023
18e4ae1
[MIG] website_sale_order_type: Migration to version 16.0
pilarvargas-tecnativa Aug 10, 2023
ea83de0
Update translation files
weblate Sep 3, 2023
6465127
Translated using Weblate (Spanish)
Ivorra78 Sep 5, 2023
3f250ed
Added translation using Weblate (Italian)
mymage May 8, 2024
e5c47c7
[FIX] website_sale_order_type: fix test
pilarvargas-tecnativa Jun 17, 2024
9e24155
[IMP] website_sale_order_type: pre-commit auto fixes
carlos-lopez-tecnativa Jan 27, 2025
56ac28a
[MIG] website_sale_order_type: Migration to version 17.0
carlos-lopez-tecnativa Jan 27, 2025
cd5cc54
[MIG] website_sale_order_type: Migration to version 18.0
carlos-lopez-tecnativa Feb 7, 2025
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
111 changes: 111 additions & 0 deletions website_sale_order_type/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
=======================
Website sale order type
=======================

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

.. |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%2Fe--commerce-lightgray.png?logo=github
:target: https://github.com/OCA/e-commerce/tree/18.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-18-0/e-commerce-18-0-website_sale_order_type
: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/e-commerce&target_branch=18.0
:alt: Try me on Runboat

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

This module allows
`sale_order_type <https://github.com/OCA/sale-workflow/tree/17.0/sale_order_type>`__
to work with websitesale.

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.

Note that the sale order type is defined contact by contact and not at
Company level.

**Table of contents**

.. contents::
:local:

Usage
=====

1. In the backend (Sales -> Customers) set a sale order type in any
contact;
2. Log in with the associated user in the e-commerce website and buy a
product;
3. Check that the created sale oder has the same sale order type that
has been set in the contact.

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 to smash it by providing a detailed and welcomed
`feedback <https://github.com/OCA/e-commerce/issues/new?body=module:%20website_sale_order_type%0Aversion:%2018.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
-------

* Agile Business Group

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

- Simone Rubino <simone.rubino@agilebg.com>

- `Tecnativa <https://www.tecnativa.com>`__:

- João Marques
- Pilar Vargas
- Stefan Ungureanu
- Carlos Lopez

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-pilarvargas-tecnativa| image:: https://github.com/pilarvargas-tecnativa.png?size=40px
:target: https://github.com/pilarvargas-tecnativa
:alt: pilarvargas-tecnativa

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

|maintainer-pilarvargas-tecnativa|

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

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
3 changes: 3 additions & 0 deletions website_sale_order_type/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from . import models
21 changes: 21 additions & 0 deletions website_sale_order_type/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Copyright 2018 Simone Rubino - Agile Business Group
# Copyright 2020 Tecnativa - João Marques
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Website sale order type",
"summary": "This module allows sale_order_type to work with website_sale.",
"version": "18.0.1.0.0",
"development_status": "Beta",
"category": "Website",
"website": "https://github.com/OCA/e-commerce",
"maintainers": ["pilarvargas-tecnativa"],
"author": "Agile Business Group, Odoo Community Association (OCA)",
"license": "AGPL-3",
"depends": ["website_sale", "sale_order_type"],
"assets": {
"web.assets_tests": [
"/website_sale_order_type/static/tests/tours/website_sale_order_type_tour.esm.js"
]
},
"auto_install": True,
}
25 changes: 25 additions & 0 deletions website_sale_order_type/i18n/ca.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * website_sale_order_type
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 12.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2021-01-20 20:44+0000\n"
"Last-Translator: claudiagn <claudia.gargallo@qubiq.es>\n"
"Language-Team: none\n"
"Language: ca\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.3.2\n"

#. module: website_sale_order_type
#: model:ir.model,name:website_sale_order_type.model_website
msgid "Website"
msgstr ""

#~ msgid "Sale Order"
#~ msgstr "Comanda de venda"
28 changes: 28 additions & 0 deletions website_sale_order_type/i18n/es.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * website_sale_order_type
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 12.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2023-09-05 21:36+0000\n"
"Last-Translator: Ivorra78 <informatica@totmaterial.es>\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: website_sale_order_type
#: model:ir.model,name:website_sale_order_type.model_website
msgid "Website"
msgstr "Página Web"

#~ msgid "Allowing sale_order_type to work with website_sale."
#~ msgstr "Permitir que sale_order_type funcione con website_sale."

#~ msgid "Sale Order"
#~ msgstr "Pedido de venta"
22 changes: 22 additions & 0 deletions website_sale_order_type/i18n/it.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * website_sale_order_type
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2024-05-08 07:46+0000\n"
"Last-Translator: mymage <stefano.consolaro@mymage.it>\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: website_sale_order_type
#: model:ir.model,name:website_sale_order_type.model_website
msgid "Website"
msgstr "Sito web"
19 changes: 19 additions & 0 deletions website_sale_order_type/i18n/website_sale_order_type.pot
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * website_sale_order_type
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 17.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: website_sale_order_type
#: model:ir.model,name:website_sale_order_type.model_website
msgid "Website"
msgstr ""
3 changes: 3 additions & 0 deletions website_sale_order_type/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from . import website
20 changes: 20 additions & 0 deletions website_sale_order_type/models/website.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Copyright 2023 Tecnativa - Pilar Vargas
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

from odoo import api, models


class Website(models.Model):
_inherit = "website"

@api.model
def sale_get_payment_term(self, partner):
if partner.sale_type.payment_term_id:
return partner.sale_type.payment_term_id.id
return super().sale_get_payment_term(partner)

Check warning on line 14 in website_sale_order_type/models/website.py

View check run for this annotation

Codecov / codecov/patch

website_sale_order_type/models/website.py#L13-L14

Added lines #L13 - L14 were not covered by tests

def _get_current_pricelist(self):
partner_sudo = self.env.user.partner_id
if partner_sudo.sale_type.pricelist_id:
return partner_sudo.sale_type.pricelist_id.id
return super()._get_current_pricelist()
3 changes: 3 additions & 0 deletions website_sale_order_type/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["whool"]
build-backend = "whool.buildapi"
8 changes: 8 additions & 0 deletions website_sale_order_type/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
- Simone Rubino \<<simone.rubino@agilebg.com>\>

- [Tecnativa](https://www.tecnativa.com):

> - João Marques
> - Pilar Vargas
> - Stefan Ungureanu
> - Carlos Lopez
11 changes: 11 additions & 0 deletions website_sale_order_type/readme/DESCRIPTION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
This module allows
[sale_order_type](https://github.com/OCA/sale-workflow/tree/17.0/sale_order_type)
to work with websitesale.

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.

Note that the sale order type is defined contact by contact and not at
Company level.
6 changes: 6 additions & 0 deletions website_sale_order_type/readme/USAGE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
1. In the backend (Sales -\> Customers) set a sale order type in any
contact;
2. Log in with the associated user in the e-commerce website and buy a
product;
3. Check that the created sale oder has the same sale order type that
has been set in the contact.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading