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 #971

Open
wants to merge 29 commits into
base: 17.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
d97b244
[ADD] website_sale_order_type (#253)
SimoRubi Jan 14, 2019
9651808
[MIG] website_sale_order_type: Migration to 11.0
joao-p-marques Oct 26, 2020
545a316
[MIG] website_sale_order_type: Migration to 12.0
joao-p-marques Oct 26, 2020
3ff1024
[FIX] website_sale_order_type: speed up tour
Nov 6, 2020
d3014c0
[FIX] website_sale_order_type: simplify tour
joao-p-marques Jan 5, 2021
69906ed
Added translation using Weblate (Spanish)
claudiagn Jan 20, 2021
8a02241
Added translation using Weblate (Catalan)
claudiagn Jan 20, 2021
913335f
[FIX] webiste_sale_order_type: trigger onchanges
chienandalu Jun 7, 2021
f632c28
[IMP] website_sale_order_type: black, isort, prettier
oihane Sep 16, 2021
4fc60a6
[MIG] website_sale_order_type: Migration to 13.0
oihane Sep 16, 2021
1ced26f
[IMP] website_sale_order_type: black, isort, prettier
oihane Sep 21, 2021
4251c6e
[MIG] website_sale_order_type: Migration to 14.0
oihane Sep 21, 2021
ff5f536
[15.0][MIG] website_sale_order_type: Migration to version 15.0
stefan-tecnativa Dec 15, 2022
b82cc30
[UPD] Update website_sale_order_type.pot
Dec 16, 2022
9c3e3e5
[UPD] README.rst
OCA-git-bot Dec 16, 2022
bcfa840
Update translation files
weblate Dec 16, 2022
6360f32
Translated using Weblate (Spanish)
Ivorra78 Jul 5, 2023
fab8add
[MIG] website_sale_order_type: Migration to version 16.0
pilarvargas-tecnativa Aug 10, 2023
a2d88c8
[UPD] Update website_sale_order_type.pot
Aug 22, 2023
9018dd1
[UPD] README.rst
OCA-git-bot Aug 22, 2023
cf43c7c
[UPD] README.rst
OCA-git-bot Sep 3, 2023
91c59f4
Update translation files
weblate Sep 3, 2023
227c761
Translated using Weblate (Spanish)
Ivorra78 Sep 5, 2023
96b537b
Added translation using Weblate (Italian)
mymage May 8, 2024
36a01b7
Translated using Weblate (Italian)
mymage May 8, 2024
e45c847
[FIX] website_sale_order_type: fix test
pilarvargas-tecnativa Jun 17, 2024
9800442
[BOT] post-merge updates
OCA-git-bot Jun 17, 2024
d2446e7
[IMP] website_sale_order_type: pre-commit auto fixes
david-s73 Sep 17, 2024
099b8d7
[MIG] website_sale_order_type: Migration 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
110 changes: 110 additions & 0 deletions website_sale_order_type/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
=======================
Website sale order type
=======================

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

.. |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/17.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-17-0/e-commerce-17-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=17.0
:alt: Try me on Runboat

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

This module allows
`sale_order_type <https://github.com/OCA/sale-workflow/tree/14.0/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.

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:%2017.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

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/17.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": "17.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/src/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 16.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
18 changes: 18 additions & 0 deletions website_sale_order_type/models/website.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Copyright 2023 Tecnativa - Pilar Vargas
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

from odoo import models


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

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)

def _get_current_pricelist_id(self, partner_sudo):
if partner_sudo.sale_type.pricelist_id:
return partner_sudo.sale_type.pricelist_id.id
return super()._get_current_pricelist_id(partner_sudo)
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"
7 changes: 7 additions & 0 deletions website_sale_order_type/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
- Simone Rubino \<<simone.rubino@agilebg.com>\>

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

> - João Marques
> - Pilar Vargas
> - Stefan Ungureanu
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/14.0/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.

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
Loading