Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
41 changed files
with
2,743 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
======================= | ||
Sale Isolated Quotation | ||
======================= | ||
|
||
.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
!! This file is generated by oca-gen-addon-readme !! | ||
!! changes will be overwritten. !! | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
.. |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/12.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-12-0/sale-workflow-12-0-sale_isolated_quotation | ||
:alt: Translate me on Weblate | ||
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png | ||
:target: https://runbot.odoo-community.org/runbot/167/12.0 | ||
:alt: Try me on Runbot | ||
|
||
|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 | ||
|
||
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 smashing it by providing a detailed and welcomed | ||
`feedback <https://github.com/OCA/sale-workflow/issues/new?body=module:%20sale_isolated_quotation%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. | ||
|
||
Credits | ||
======= | ||
|
||
Authors | ||
~~~~~~~ | ||
|
||
* Ecosoft | ||
|
||
Contributors | ||
~~~~~~~~~~~~ | ||
|
||
* Kitti U. <kittiu@ecosoft.co.th> | ||
* Robert J Sullivan <robertjonsullivan@gmail.com> | ||
|
||
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. | ||
|
||
This module is part of the `OCA/sale-workflow <https://github.com/OCA/sale-workflow/tree/12.0/sale_isolated_quotation>`_ project on GitHub. | ||
|
||
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# © 2017 Ecosoft (ecosoft.co.th). | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). | ||
{ | ||
"name": "Sale Isolated Quotation", | ||
"version": "12.0.1.0.0", | ||
"author": "Ecosoft,Odoo Community Association (OCA)", | ||
"category": "Sales", | ||
"website": "https://github.com/OCA/sale-workflow", | ||
"depends": ["sale_management"], | ||
"license": "AGPL-3", | ||
"images": [], | ||
"data": [ | ||
"data/ir_sequence_data.xml", | ||
"views/sale_views.xml", | ||
], | ||
"installable": True, | ||
"auto_install": False, | ||
"uninstall_hook": "uninstall_hook", | ||
"post_init_hook": "post_init_hook", | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<odoo noupdate="1"> | ||
<!-- Sequences for sale.order --> | ||
<record id="seq_sale_quotation" model="ir.sequence"> | ||
<field name="name">Quotation</field> | ||
<field name="code">sale.quotation</field> | ||
<field name="prefix">SQ</field> | ||
<field name="padding">3</field> | ||
<field name="company_id" eval="False"/> | ||
</record> | ||
</odoo> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# © 2017 Ecosoft (ecosoft.co.th). | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). | ||
import ast | ||
from odoo import api, SUPERUSER_ID | ||
|
||
|
||
def post_init_hook(cr, registry): | ||
""" Set value for order_sequence on old records """ | ||
cr.execute(""" | ||
update sale_order | ||
set order_sequence = true | ||
where state not in ('draft', 'cancel') | ||
""") | ||
|
||
|
||
def uninstall_hook(cr, registry): | ||
""" Restore sale.order action, remove context value """ | ||
with api.Environment.manage(): | ||
env = api.Environment(cr, SUPERUSER_ID, {}) | ||
for action_id in ['sale.action_quotations', 'sale.action_orders']: | ||
action = env.ref(action_id) | ||
ctx = ast.literal_eval(action.context) | ||
del ctx['order_sequence'] | ||
dom = ast.literal_eval(action.domain) | ||
dom = [x for x in dom if x[0] != 'order_sequence'] | ||
if action_id == 'sale.action_quotations': | ||
dom.append(('state', 'not in', ('draft', 'sent', 'cancel'))) | ||
action.write({'context': ctx, 'domain': dom}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
# 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 10.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:ir.model.fields,help:sale_isolated_quotation.field_sale_order_state2 | ||
msgid "A dummy state used for quotation" | ||
msgstr "" | ||
|
||
#. module: sale_isolated_quotation | ||
#: model:ir.ui.view,arch_db:sale_isolated_quotation.view_order_form | ||
msgid "Cancel" | ||
msgstr "" | ||
|
||
#. module: sale_isolated_quotation | ||
#: model: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 | ||
#: model:ir.model.fields,field_description:sale_isolated_quotation.field_sale_order_is_order | ||
msgid "Is Order" | ||
msgstr "" | ||
|
||
#. module: sale_isolated_quotation | ||
#: code:addons/sale_isolated_quotation/models/sale.py:57 | ||
#, python-format | ||
msgid "Only quotation can convert to order" | ||
msgstr "" | ||
|
||
#. module: sale_isolated_quotation | ||
#: model:ir.model.fields,field_description:sale_isolated_quotation.field_sale_order_order_id | ||
msgid "Order Reference" | ||
msgstr "" | ||
|
||
#. module: sale_isolated_quotation | ||
#: model:ir.model,name:sale_isolated_quotation.model_sale_order | ||
msgid "Quotation" | ||
msgstr "" | ||
|
||
#. module: sale_isolated_quotation | ||
#: model:ir.model.fields,field_description:sale_isolated_quotation.field_sale_order_quote_id | ||
msgid "Quotation Reference" | ||
msgstr "" | ||
|
||
#. module: sale_isolated_quotation | ||
#: code:addons/sale_isolated_quotation/models/sale.py:73 | ||
#, python-format | ||
msgid "Sales Order" | ||
msgstr "Comandes de venda" | ||
|
||
#. module: sale_isolated_quotation | ||
#: model:ir.model.fields,field_description:sale_isolated_quotation.field_sale_order_state2 | ||
msgid "Status" | ||
msgstr "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
# 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 10.0\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"POT-Creation-Date: 2017-06-01 02:53+0000\n" | ||
"PO-Revision-Date: 2017-06-01 02:53+0000\n" | ||
"Last-Translator: OCA Transbot <transbot@odoo-community.org>, 2017\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" | ||
|
||
#. module: sale_isolated_quotation | ||
#: model:ir.model.fields,help:sale_isolated_quotation.field_sale_order_state2 | ||
msgid "A dummy state used for quotation" | ||
msgstr "" | ||
|
||
#. module: sale_isolated_quotation | ||
#: model:ir.ui.view,arch_db:sale_isolated_quotation.view_order_form | ||
msgid "Cancel" | ||
msgstr "Abbrechen" | ||
|
||
#. module: sale_isolated_quotation | ||
#: model: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 | ||
#: model:ir.model.fields,field_description:sale_isolated_quotation.field_sale_order_is_order | ||
msgid "Is Order" | ||
msgstr "" | ||
|
||
#. module: sale_isolated_quotation | ||
#: code:addons/sale_isolated_quotation/models/sale.py:57 | ||
#, python-format | ||
msgid "Only quotation can convert to order" | ||
msgstr "" | ||
|
||
#. module: sale_isolated_quotation | ||
#: model:ir.model.fields,field_description:sale_isolated_quotation.field_sale_order_order_id | ||
msgid "Order Reference" | ||
msgstr "Auftragsreferenz" | ||
|
||
#. module: sale_isolated_quotation | ||
#: model:ir.model,name:sale_isolated_quotation.model_sale_order | ||
msgid "Quotation" | ||
msgstr "" | ||
|
||
#. module: sale_isolated_quotation | ||
#: model:ir.model.fields,field_description:sale_isolated_quotation.field_sale_order_quote_id | ||
msgid "Quotation Reference" | ||
msgstr "" | ||
|
||
#. module: sale_isolated_quotation | ||
#: code:addons/sale_isolated_quotation/models/sale.py:73 | ||
#, python-format | ||
msgid "Sales Order" | ||
msgstr "Verkaufsauftrag" | ||
|
||
#. module: sale_isolated_quotation | ||
#: model:ir.model.fields,field_description:sale_isolated_quotation.field_sale_order_state2 | ||
msgid "Status" | ||
msgstr "" |
Oops, something went wrong.