Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
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
24 changes: 3 additions & 21 deletions sale_quotation/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,27 +24,8 @@ Sale Quotation

This module is used in the context of e-commerce project (like shopinvader)


It allows to specify whether your product requires a quotation.
This can be set per "product.template" or per "product.variant"


For example, you have a product where the supplier price fluctuates a lot,
you can not give a public price but your customer should be able to request a quotation.

.. image:: https://raw.githubusercontent.com/shopinvader/odoo-shopinvader/16.0/sale_quotation/static/description/product.png
:width: 400px
:alt: Widget in action



On your shopinvader website when a customer has added a product that requires a quotation,
instead of validating the cart it will "request a quotation".



On Odoo Backoffice the menu quotation has been improved and a new state (quotation_state) has been added.
So you can easily process and follow the quotation request from your external system.
On Odoo Backoffice this module imporves the menu quotation by adding a new state (quotation_state).
Then, you can easily process and follow the quotation request from your external system.

.. image:: https://raw.githubusercontent.com/shopinvader/odoo-shopinvader/16.0/sale_quotation/static/description/quotation.png
:width: 400px
Expand Down Expand Up @@ -82,6 +63,7 @@ Contributors
* Matthieu Saison <matthieu.saison@akretion.com>
* Iván Todorovich <ivan.todorovich@gmail.com>
* Simone Orsi <simone.orsi@camptocamp.com>
* Nicolas DELBOVIER <nicolas.delbovier@acsone.eu>

Maintainers
~~~~~~~~~~~
Expand Down
8 changes: 5 additions & 3 deletions sale_quotation/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,17 @@
{
"name": "Sale Quotation",
"summary": "Sale Quotation",
"version": "16.0.0.2.0",
"version": "16.0.0.3.0",
"category": "e-commerce",
"development_status": "Production/Stable",
"website": "https://github.com/shopinvader/odoo-shopinvader",
"author": "Akretion",
"license": "AGPL-3",
"depends": ["sale_cart"],
"depends": [
"sale_cart",
"shopinvader_product_order_mode_on_request",
],
"data": [
"views/product_view.xml",
"views/sale_view.xml",
],
"installable": True,
Expand Down
111 changes: 3 additions & 108 deletions sale_quotation/i18n/sale_quotation.pot
Original file line number Diff line number Diff line change
@@ -1,120 +1,15 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * sale_quotation
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Project-Id-Version: Odoo Server 16.0+e\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-05-16 13:39+0000\n"
"PO-Revision-Date: 2025-05-16 13:39+0000\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: sale_quotation
#: model:ir.model.fields.selection,name:sale_quotation.selection__sale_order__quotation_state__accepted
#: model_terms:ir.ui.view,arch_db:sale_quotation.sale_order_view_search_inherit_quotation
msgid "Accepted"
msgstr ""

#. module: sale_quotation
#: model:ir.model.fields.selection,name:sale_quotation.selection__product_template__shop_only_quotation__all_variant
msgid "All Variant"
msgstr ""

#. module: sale_quotation
#: model:ir.model.fields.selection,name:sale_quotation.selection__sale_order__quotation_state__cancel
#: model_terms:ir.ui.view,arch_db:sale_quotation.sale_order_view_search_inherit_quotation
msgid "Cancel"
msgstr ""

#. module: sale_quotation
#: model:ir.model.fields.selection,name:sale_quotation.selection__sale_order__quotation_state__customer_request
msgid "Customer Request"
msgstr ""

#. module: sale_quotation
#: model_terms:ir.ui.view,arch_db:sale_quotation.sale_order_view_search_inherit_quotation
msgid "Customer request"
msgstr ""

#. module: sale_quotation
#: model:ir.model.fields.selection,name:sale_quotation.selection__sale_order__quotation_state__draft
#: model_terms:ir.ui.view,arch_db:sale_quotation.sale_order_view_search_inherit_quotation
msgid "Draft"
msgstr ""

#. module: sale_quotation
#: model:ir.model.fields.selection,name:sale_quotation.selection__product_template__shop_only_quotation__manually_on_variant
msgid "Manually on Variant"
msgstr ""

#. module: sale_quotation
#: model:ir.model.fields.selection,name:sale_quotation.selection__product_template__shop_only_quotation__never
msgid "Never"
msgstr ""

#. module: sale_quotation
#: model_terms:ir.ui.view,arch_db:sale_quotation.product_template_form_view
msgid "Only for Quotation"
msgstr ""

#. module: sale_quotation
#. odoo-python
#: code:addons/sale_quotation/models/sale_order.py:0
#, python-format
msgid ""
"Only orders of cart typology in draft state can be converted to quotation"
msgstr ""

#. module: sale_quotation
#. odoo-python
#: code:addons/sale_quotation/models/sale_order.py:0
#, python-format
msgid "Only quotation with the state 'waiting_acceptation' can be Confirmed."
msgstr ""

#. module: sale_quotation
#: model:ir.model,name:sale_quotation.model_product_template
msgid "Product"
msgstr ""

#. module: sale_quotation
#: model:ir.model,name:sale_quotation.model_product_product
msgid "Product Variant"
msgstr ""

#. module: sale_quotation
#: model:ir.model.fields,field_description:sale_quotation.field_sale_order__quotation_state
msgid "Quotation State"
msgstr ""

#. module: sale_quotation
#: model:ir.model,name:sale_quotation.model_sale_order
msgid "Sales Order"
msgstr ""

#. module: sale_quotation
#: model:ir.model.fields,field_description:sale_quotation.field_sale_order__shop_only_quotation
msgid "Shop Only Quotation"
msgstr ""

#. module: sale_quotation
#: model:ir.model.fields,field_description:sale_quotation.field_product_product__shop_only_quotation
#: model:ir.model.fields,field_description:sale_quotation.field_product_template__shop_only_quotation
msgid "Shopinvader: Only for Quotation"
msgstr ""

#. module: sale_quotation
#: model_terms:ir.ui.view,arch_db:sale_quotation.sale_order_view_search_inherit_quotation
#: model_terms:ir.ui.view,arch_db:sale_quotation.view_quotation_tree
msgid "State"
msgstr ""

#. module: sale_quotation
#: model:ir.model.fields.selection,name:sale_quotation.selection__sale_order__quotation_state__waiting_acceptation
#: model_terms:ir.ui.view,arch_db:sale_quotation.sale_order_view_search_inherit_quotation
msgid "Waiting Acceptation"
msgstr ""
47 changes: 47 additions & 0 deletions sale_quotation/migrations/16.0.0.3.0/pre-migrate.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Copyright 2025 ACSONE SA/NV
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from openupgradelib import openupgrade


def migrate(cr, version):
"""
For each product and for each template where 'shop_only_quotation' is True,
set 'shop_order_mode' to 'quotation_only'.
"""
openupgrade.logged_query(
cr,
"""
UPDATE product_template
SET shop_order_mode = 'quotation_only'
WHERE shop_only_quotation = 'all_variant';
""",
)
openupgrade.logged_query(
cr,
"""
UPDATE product_template
SET shop_order_mode = 'direct_sale_only'
WHERE shop_only_quotation = 'never';
""",
)
openupgrade.logged_query(
cr,
"""
UPDATE product_template
SET is_shop_order_mode_unabled_on_variant = TRUE
WHERE shop_only_quotation = 'manually_on_variant';
""",
)

openupgrade.logged_query(
cr,
"""
UPDATE product_product
SET shop_order_mode = 'quotation_only'
FROM product_template AS pt
WHERE product_product.product_tmpl_id = pt.id
AND pt.is_shop_order_mode_unabled_on_variant = TRUE
AND product_product.shop_only_quotation = TRUE;
""",
)
2 changes: 0 additions & 2 deletions sale_quotation/models/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
from . import product_product
from . import product_template
from . import sale_order
13 changes: 0 additions & 13 deletions sale_quotation/models/product_product.py

This file was deleted.

51 changes: 0 additions & 51 deletions sale_quotation/models/product_template.py

This file was deleted.

8 changes: 1 addition & 7 deletions sale_quotation/models/sale_order.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Copyright 2017-2018 Akretion (http://www.akretion.com).
# Copyright 2021 Camptocamp (http://www.camptocamp.com)
# Copyright 2025 ACSONE SA/NV
# @author Benoît GUILLOT <benoit.guillot@akretion.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

Expand All @@ -24,7 +25,6 @@ class SaleOrder(models.Model):
readonly=False,
copy=False,
)
shop_only_quotation = fields.Boolean(compute="_compute_shop_only_quotation")

@api.depends("state")
def _compute_quotation_state(self):
Expand Down Expand Up @@ -53,12 +53,6 @@ def action_request_quotation(self):
self.write({"quotation_state": "customer_request", "typology": "sale"})
return True

def _compute_shop_only_quotation(self):
for record in self:
record.shop_only_quotation = any(
record.order_line.product_id.mapped("shop_only_quotation")
)

def action_confirm_quotation(self):
if any(rec.quotation_state != "waiting_acceptation" for rec in self):
raise UserError(
Expand Down
3 changes: 2 additions & 1 deletion sale_quotation/readme/CONTRIBUTORS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
* Benoît GUILLOT <benoit.guillot@akretion.com>
* Matthieu Saison <matthieu.saison@akretion.com>
* Iván Todorovich <ivan.todorovich@gmail.com>
* Simone Orsi <simone.orsi@camptocamp.com>
* Simone Orsi <simone.orsi@camptocamp.com>
* Nicolas DELBOVIER <nicolas.delbovier@acsone.eu>
23 changes: 2 additions & 21 deletions sale_quotation/readme/DESCRIPTION.rst
Original file line number Diff line number Diff line change
@@ -1,26 +1,7 @@
This module is used in the context of e-commerce project (like shopinvader)


It allows to specify whether your product requires a quotation.
This can be set per "product.template" or per "product.variant"


For example, you have a product where the supplier price fluctuates a lot,
you can not give a public price but your customer should be able to request a quotation.

.. image:: ../static/description/product.png
:width: 400px
:alt: Widget in action



On your shopinvader website when a customer has added a product that requires a quotation,
instead of validating the cart it will "request a quotation".



On Odoo Backoffice the menu quotation has been improved and a new state (quotation_state) has been added.
So you can easily process and follow the quotation request from your external system.
On Odoo Backoffice this module imporves the menu quotation by adding a new state (quotation_state).
Then, you can easily process and follow the quotation request from your external system.

.. image:: ../static/description/quotation.png
:width: 400px
Expand Down
12 changes: 3 additions & 9 deletions sale_quotation/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -371,15 +371,8 @@ <h1 class="title">Sale Quotation</h1>
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Production/Stable" src="https://img.shields.io/badge/maturity-Production%2FStable-green.png" /></a> <a class="reference external image-reference" 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 image-reference" href="https://github.com/shopinvader/odoo-shopinvader/tree/16.0/sale_quotation"><img alt="shopinvader/odoo-shopinvader" src="https://img.shields.io/badge/github-shopinvader%2Fodoo--shopinvader-lightgray.png?logo=github" /></a></p>
<p>This module is used in the context of e-commerce project (like shopinvader)</p>
<p>It allows to specify whether your product requires a quotation.
This can be set per “product.template” or per “product.variant”</p>
<p>For example, you have a product where the supplier price fluctuates a lot,
you can not give a public price but your customer should be able to request a quotation.</p>
<img alt="Widget in action" src="https://raw.githubusercontent.com/shopinvader/odoo-shopinvader/16.0/sale_quotation/static/description/product.png" style="width: 400px;" />
<p>On your shopinvader website when a customer has added a product that requires a quotation,
instead of validating the cart it will “request a quotation”.</p>
<p>On Odoo Backoffice the menu quotation has been improved and a new state (quotation_state) has been added.
So you can easily process and follow the quotation request from your external system.</p>
<p>On Odoo Backoffice this module imporves the menu quotation by adding a new state (quotation_state).
Then, you can easily process and follow the quotation request from your external system.</p>
<img alt="Widget in action" src="https://raw.githubusercontent.com/shopinvader/odoo-shopinvader/16.0/sale_quotation/static/description/quotation.png" style="width: 400px;" />
<p><strong>Table of contents</strong></p>
<div class="contents local topic" id="contents">
Expand Down Expand Up @@ -417,6 +410,7 @@ <h2><a class="toc-backref" href="#toc-entry-4">Contributors</a></h2>
<li>Matthieu Saison &lt;<a class="reference external" href="mailto:matthieu.saison&#64;akretion.com">matthieu.saison&#64;akretion.com</a>&gt;</li>
<li>Iván Todorovich &lt;<a class="reference external" href="mailto:ivan.todorovich&#64;gmail.com">ivan.todorovich&#64;gmail.com</a>&gt;</li>
<li>Simone Orsi &lt;<a class="reference external" href="mailto:simone.orsi&#64;camptocamp.com">simone.orsi&#64;camptocamp.com</a>&gt;</li>
<li>Nicolas DELBOVIER &lt;<a class="reference external" href="mailto:nicolas.delbovier&#64;acsone.eu">nicolas.delbovier&#64;acsone.eu</a>&gt;</li>
</ul>
</div>
<div class="section" id="maintainers">
Expand Down
Binary file removed sale_quotation/static/description/product.png
Binary file not shown.
2 changes: 1 addition & 1 deletion sale_quotation/tests/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
from . import test_product
from . import test_quotation
Loading