Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
5165db1
[ADD] sale_isolated_quotation
kittiu May 2, 2017
3a6592a
Code Review,
kittiu May 9, 2017
501f75f
Add hook.py to set is_order for old records
kittiu May 9, 2017
a69c082
Code review for pylint
kittiu May 9, 2017
762d2ad
Fix for pylint
kittiu May 9, 2017
ac9a894
Add uninstall_hook to remove the unused context and domain
kittiu May 11, 2017
43d013d
Fix for pylint
kittiu May 11, 2017
0709b41
Add the Why this module is needed in manifest file.
kittiu May 11, 2017
afd9d45
Add the Why to manifest file.
kittiu May 11, 2017
12e2c9d
Code review
kittiu May 11, 2017
18326c7
Change openerp --> odoo in hook.py
kittiu May 11, 2017
a70f6d3
Change padding of quotation from 8 to 3 (inline with existing order)
kittiu May 11, 2017
2cec72e
Fix domain on sale.order action
kittiu May 12, 2017
8902e34
[11.0] [MIG] sale-isolated-quotation: Migration to 11.0
rsullivan2704 Oct 5, 2018
6f0b04d
Improved code as per suggestions
rsullivan2704 Oct 8, 2018
3d28f99
updated contributors
rsullivan2704 Sep 24, 2019
1ab234c
Update sale_isolated_quotation/__manifest__.py
rsullivan2704 Oct 2, 2019
d755be4
MIGR v12 sale_isolated_quotation
bealdav Jan 6, 2020
bc327ad
TYPO switch from simple quote to double to preserve commits
kittiu Jan 6, 2020
999bc71
IMP renames, use default_field
bealdav Jan 13, 2020
99582c9
[UPD] Update sale_isolated_quotation.pot
oca-travis Jan 13, 2020
bafcbab
[UPD] README.rst
OCA-git-bot Jan 13, 2020
1a0d902
Translated using Weblate (French)
bealdav Jan 17, 2020
59d7347
Update translation files
oca-transbot Jan 17, 2020
d267170
FIX sale_isolated_quotation: fix uninstall hook
bealdav Mar 14, 2020
d16c829
sale_isolated_quotation 12.0.1.1.0
OCA-git-bot Mar 20, 2020
525dbea
[13.0][IMP] sale_isolated_quotation: black, isort
newtratip Mar 23, 2020
64146b0
[13.0][MIG] sale_isolated_quotation
newtratip Mar 23, 2020
514df7d
[UPD] Update sale_isolated_quotation.pot
oca-travis Nov 26, 2020
21c1b17
Update translation files
oca-transbot Nov 26, 2020
965f405
[MIG] sale_isolated_quotation: Migration to 14.0
Kev-Roche Dec 16, 2020
aa5b2ce
[MIG] sale_isolated_quotation: Migration to 14.0
Kev-Roche Dec 16, 2020
868440d
[UPD] Update sale_isolated_quotation.pot
oca-travis Apr 24, 2021
b907c16
[UPD] README.rst
OCA-git-bot Apr 24, 2021
15a559b
Translated using Weblate (German)
marylla Jul 9, 2021
d44b048
[FIX] sale_isolated_quotation and sale_quotation_number are incompati…
nilshamerlinck Jul 22, 2021
b476154
"sent" state is added to buttons
Nov 30, 2021
9f12d72
[UPD] README.rst
OCA-git-bot Dec 1, 2021
11b9fd5
sale_isolated_quotation 14.0.1.0.1
OCA-git-bot Dec 1, 2021
b80c061
[IMP] sale_isolated_quotation: depends on sale_quotation_number
hailangvn Dec 4, 2021
3e2c251
[IMP] sale_isolated_quotation: migration script
hailangvn Dec 11, 2021
2e2dea1
[UPD] README.rst
OCA-git-bot Jan 10, 2022
7f5d09e
sale_isolated_quotation 14.0.2.0.0
OCA-git-bot Jan 10, 2022
b158d0b
sale_isolated_quotation 14.0.2.1.0
OCA-git-bot Feb 18, 2022
1ecb787
[IMP] update dotfiles [ci skip]
OCA-git-bot Mar 31, 2022
35c8b0a
Translated using Weblate (Italian)
francesco-ooops Apr 29, 2022
5bab74f
[UPD] README.rst
OCA-git-bot Jun 2, 2022
87581d6
[UPD] README.rst
OCA-git-bot Jun 2, 2022
cec6200
Translated using Weblate (Italian)
francesco-ooops Jun 24, 2022
b221dc3
[IMP] sale_isolated_quotation: Migration to 15.0
Jun 9, 2023
4e2ee63
[UPD] Update sale_isolated_quotation.pot
Feb 12, 2025
7bcaf4b
[BOT] post-merge updates
OCA-git-bot Feb 12, 2025
2474468
[IMP] sale_isolated_quotation: pre-commit auto fixes
Tiago370 Apr 15, 2025
011d278
[MIG] sale_isolated_quotation: Migration to 16.0
Tiago370 Apr 15, 2025
00fc29e
[FIX] sale_isolated_quotation: fix action_done, cleanup and regenerat…
mileo Apr 2, 2026
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 sale_isolated_quotation/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
=======================
Sale Isolated Quotation
=======================

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

.. |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%2Fsale--workflow-lightgray.png?logo=github
:target: https://github.com/OCA/sale-workflow/tree/16.0/sale_isolated_quotation
:alt: OCA/sale-workflow
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/sale-workflow-16-0/sale-workflow-16-0-sale_isolated_quotation
: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/sale-workflow&target_branch=16.0
:alt: Try me on Runboat

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

In some countries/companies, it is already common to separate these two documents.
For filing purposes, the document sequence of quotation and sales order
has to be separated. In practice, there could be multiple quotations open
to a customer, yet only one quotation get converted to the sales order.

This module separate quotation and sales order by adding order_sequence flag in
sale.order model.

Each type of document will have separated sequence numbering.
Quotation will have only 2 state, Draft and Done. Sales Order work as normal.

**Table of contents**

.. contents::
:local:

Usage
=====

* Create Quotation as normal
* As user click "Convert to Order", the isolated sales order will be created

Known issues / Roadmap
======================

Provide a way to purge old quotes to avoid that database grow up excessively

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/sale-workflow/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/sale-workflow/issues/new?body=module:%20sale_isolated_quotation%0Aversion:%2016.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
~~~~~~~

* Ecosoft

Contributors
~~~~~~~~~~~~

* Kitti U. <kittiu@ecosoft.co.th>
* Robert J Sullivan <robertjonsullivan@gmail.com>
* David Béal <david.beal@akretion.com>
* Tharathip Chaweewongphan <tharathipc@ecosoft.co.th>

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

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

|maintainer-bealdav| |maintainer-kittiu|

This module is part of the `OCA/sale-workflow <https://github.com/OCA/sale-workflow/tree/16.0/sale_isolated_quotation>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
2 changes: 2 additions & 0 deletions sale_isolated_quotation/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
from .hooks import post_init_hook, uninstall_hook
from . import models
18 changes: 18 additions & 0 deletions sale_isolated_quotation/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# © 2017 Ecosoft (ecosoft.co.th).
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
{
"name": "Sale Isolated Quotation",
"version": "16.0.1.0.0",
"author": "Ecosoft, Odoo Community Association (OCA)",
"category": "Sales",
"website": "https://github.com/OCA/sale-workflow",
"depends": ["sale_management", "sale_quotation_number"],
"license": "AGPL-3",
"images": [],
"data": ["views/sale_views.xml"],
"installable": True,
"auto_install": False,
"uninstall_hook": "uninstall_hook",
"post_init_hook": "post_init_hook",
"maintainers": ["bealdav", "kittiu"],
}
53 changes: 53 additions & 0 deletions sale_isolated_quotation/hooks.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# © 2017 Ecosoft (ecosoft.co.th).
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
import ast

from odoo import SUPERUSER_ID, api

ACTIONS = (
"sale.action_quotations_with_onboarding",
"sale.action_orders",
)


def post_init_hook(cr, registry):
"""Set value for order_sequence on old records, stop updating sale
order name."""
cr.execute(
"""
update sale_order
set order_sequence = true
where state not in ('draft', 'cancel')
"""
)
cr.execute(
"""
update res_company
set keep_name_so = true
where keep_name_so = false
"""
)


def uninstall_hook(cr, registry):
"""Restore sale.order action, remove context value"""
env = api.Environment(cr, SUPERUSER_ID, {})
for action_id in ACTIONS:
action = env.ref(action_id)
ctx = ast.literal_eval(action.context)
_cleanup_ctx(ctx)
dom = ast.literal_eval(action.domain or "{}")
dom = [x for x in dom if x[0] != "order_sequence"]
if action_id == "sale.action_orders":
dom.append(("state", "not in", ("draft", "sent", "cancel")))
else:
ctx["search_default_my_quotation"] = True
dom = list(set(dom))
action.write({"context": ctx, "domain": dom})


def _cleanup_ctx(ctx):
if "order_sequence" in ctx:
del ctx["order_sequence"]
if "default_order_sequence" in ctx:
del ctx["default_order_sequence"]
83 changes: 83 additions & 0 deletions sale_isolated_quotation/i18n/ca.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * sale_isolated_quotation
#
# Translators:
# OCA Transbot <transbot@odoo-community.org>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-05-13 01:19+0000\n"
"PO-Revision-Date: 2017-05-13 01:19+0000\n"
"Last-Translator: OCA Transbot <transbot@odoo-community.org>, 2017\n"
"Language-Team: Catalan (https://www.transifex.com/oca/teams/23907/ca/)\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"

#. module: sale_isolated_quotation
#: model_terms:ir.ui.view,arch_db:sale_isolated_quotation.view_order_form
msgid "Cancel"
msgstr ""

#. module: sale_isolated_quotation
#: model_terms:ir.ui.view,arch_db:sale_isolated_quotation.view_order_form
msgid "Convert to Order"
msgstr ""

#. module: sale_isolated_quotation
#: model:ir.model.fields,help:sale_isolated_quotation.field_sale_order__order_id
msgid "For Quotation, this field references to its Sales Order"
msgstr ""

#. module: sale_isolated_quotation
#: model:ir.model.fields,help:sale_isolated_quotation.field_sale_order__quote_id
msgid "For Sales Order, this field references to its Quotation"
msgstr ""

#. module: sale_isolated_quotation
#: code:addons/sale_isolated_quotation/models/sale.py:0
#, python-format
msgid "Only quotation can convert to order"
msgstr ""

#. module: sale_isolated_quotation
#: model:ir.model.fields,help:sale_isolated_quotation.field_sale_order__quotation_state
msgid "Only relative quotation states"
msgstr ""

#. module: sale_isolated_quotation
#: model:ir.model.fields,field_description:sale_isolated_quotation.field_sale_order__order_id
#, fuzzy
msgid "Order"
msgstr "Comandes de venda"

#. module: sale_isolated_quotation
#: model:ir.model.fields,field_description:sale_isolated_quotation.field_sale_order__order_sequence
msgid "Order Sequence"
msgstr ""

#. module: sale_isolated_quotation
#: model:ir.model.fields,field_description:sale_isolated_quotation.field_sale_order__quote_id
msgid "Quotation"
msgstr ""

#. module: sale_isolated_quotation
#: model:ir.model.fields,field_description:sale_isolated_quotation.field_sale_order__quotation_state
msgid "Quotation Status"
msgstr ""

#. module: sale_isolated_quotation
#: code:addons/sale_isolated_quotation/models/sale.py:0
#: model:ir.model,name:sale_isolated_quotation.model_sale_order
#, python-format
msgid "Sales Order"
msgstr "Comandes de venda"

#, fuzzy
#~| msgid "Sales Order"
#~ msgid "Sale Order"
#~ msgstr "Comandes de venda"
83 changes: 83 additions & 0 deletions sale_isolated_quotation/i18n/de.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * sale_isolated_quotation
#
# Translators:
# OCA Transbot <transbot@odoo-community.org>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-06-01 02:53+0000\n"
"PO-Revision-Date: 2021-07-09 15:48+0000\n"
"Last-Translator: Maria Sparenberg <maria.sparenberg@gmx.net>\n"
"Language-Team: German (https://www.transifex.com/oca/teams/23907/de/)\n"
"Language: de\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: sale_isolated_quotation
#: model_terms:ir.ui.view,arch_db:sale_isolated_quotation.view_order_form
msgid "Cancel"
msgstr "Abbrechen"

#. module: sale_isolated_quotation
#: model_terms:ir.ui.view,arch_db:sale_isolated_quotation.view_order_form
msgid "Convert to Order"
msgstr "In Auftrag umwandeln"

#. module: sale_isolated_quotation
#: model:ir.model.fields,help:sale_isolated_quotation.field_sale_order__order_id
msgid "For Quotation, this field references to its Sales Order"
msgstr "Bei Angeboten verweist dieses Feld auf den zugehörigen Auftrag."

#. module: sale_isolated_quotation
#: model:ir.model.fields,help:sale_isolated_quotation.field_sale_order__quote_id
msgid "For Sales Order, this field references to its Quotation"
msgstr "Bei Aufträgen verweist dieses Feld auf das zugehörige Angebot."

#. module: sale_isolated_quotation
#: code:addons/sale_isolated_quotation/models/sale.py:0
#, python-format
msgid "Only quotation can convert to order"
msgstr "Nur Angebote können zu einem Auftrag umgewandelt werden."

#. module: sale_isolated_quotation
#: model:ir.model.fields,help:sale_isolated_quotation.field_sale_order__quotation_state
msgid "Only relative quotation states"
msgstr ""

#. module: sale_isolated_quotation
#: model:ir.model.fields,field_description:sale_isolated_quotation.field_sale_order__order_id
msgid "Order"
msgstr "Auftrag"

#. module: sale_isolated_quotation
#: model:ir.model.fields,field_description:sale_isolated_quotation.field_sale_order__order_sequence
msgid "Order Sequence"
msgstr "Auftragssequenz"

#. module: sale_isolated_quotation
#: model:ir.model.fields,field_description:sale_isolated_quotation.field_sale_order__quote_id
msgid "Quotation"
msgstr "Angebot"

#. module: sale_isolated_quotation
#: model:ir.model.fields,field_description:sale_isolated_quotation.field_sale_order__quotation_state
msgid "Quotation Status"
msgstr "Angebotsstatus"

#. module: sale_isolated_quotation
#: code:addons/sale_isolated_quotation/models/sale.py:0
#: model:ir.model,name:sale_isolated_quotation.model_sale_order
#, python-format
msgid "Sales Order"
msgstr "Verkaufsauftrag"

#, fuzzy
#~| msgid "Sales Order"
#~ msgid "Sale Order"
#~ msgstr "Verkaufsauftrag"
Loading
Loading