Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
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
30 changes: 30 additions & 0 deletions report_sale_order_draft/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3

=======================
Report sale order draft
=======================

* In sale order form view new field "Print As Quotation".
* If it is clicked, it is printed as a quote, regardless of the order status,
even if it is confirmed.


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

Bugs are tracked on `GitHub Issues
<https://github.com/avanzosc/sale-addons/issues>`_. In case of trouble,
please check there if your issue has already been reported. If you spotted
it first, help us smash it by providing detailed and welcomed feedback.

Do not contact contributors directly about support or help with technical issues.

Credits
=======

Contributors
------------
* Ana Juaristi <anajuaristi@avanzosc.es>
* Alfredo de la Fuente <alfredodelafuente@avanzosc.es>
1 change: 1 addition & 0 deletions report_sale_order_draft/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
19 changes: 19 additions & 0 deletions report_sale_order_draft/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Copyright 2026 Alfredo de la Fuente - AvanzOSC
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
{
"name": "Report Sale Order Draft",
"version": "18.0.1.0.0",
"category": "Sales/Sales",
"license": "AGPL-3",
"author": "AvanzOSC",
"website": "https://github.com/avanzosc/sale-addons",
"depends": [
"sale",
"sale_management",
],
"data": [
"views/sale_order_views.xml",
"reports/sale_order_report.xml",
],
"installable": True,
}
26 changes: 26 additions & 0 deletions report_sale_order_draft/i18n/en_US.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * report_sale_order_draft
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 18.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2026-01-27 05:54+0000\n"
"PO-Revision-Date: 2026-01-27 05:54+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: report_sale_order_draft
#: model:ir.model.fields,field_description:report_sale_order_draft.field_sale_order__print_as_quotation
msgid "Print As Quotation"
msgstr ""

#. module: report_sale_order_draft
#: model:ir.model,name:report_sale_order_draft.model_sale_order
msgid "Sales Order"
msgstr ""
26 changes: 26 additions & 0 deletions report_sale_order_draft/i18n/es.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * report_sale_order_draft
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 18.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2026-01-27 05:55+0000\n"
"PO-Revision-Date: 2026-01-27 05:55+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: report_sale_order_draft
#: model:ir.model.fields,field_description:report_sale_order_draft.field_sale_order__print_as_quotation
msgid "Print As Quotation"
msgstr "Imprimir como presupuesto"

#. module: report_sale_order_draft
#: model:ir.model,name:report_sale_order_draft.model_sale_order
msgid "Sales Order"
msgstr "Pedido de venta"
26 changes: 26 additions & 0 deletions report_sale_order_draft/i18n/fr.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * report_sale_order_draft
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 18.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2026-01-27 05:54+0000\n"
"PO-Revision-Date: 2026-01-27 05:54+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: report_sale_order_draft
#: model:ir.model.fields,field_description:report_sale_order_draft.field_sale_order__print_as_quotation
msgid "Print As Quotation"
msgstr ""

#. module: report_sale_order_draft
#: model:ir.model,name:report_sale_order_draft.model_sale_order
msgid "Sales Order"
msgstr "Commande client"
26 changes: 26 additions & 0 deletions report_sale_order_draft/i18n/it.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * report_sale_order_draft
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 18.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2026-01-27 05:55+0000\n"
"PO-Revision-Date: 2026-01-27 05:55+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: report_sale_order_draft
#: model:ir.model.fields,field_description:report_sale_order_draft.field_sale_order__print_as_quotation
msgid "Print As Quotation"
msgstr ""

#. module: report_sale_order_draft
#: model:ir.model,name:report_sale_order_draft.model_sale_order
msgid "Sales Order"
msgstr "Ordine di vendita"
26 changes: 26 additions & 0 deletions report_sale_order_draft/i18n/report_sale_order_draft.pot
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * report_sale_order_draft
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 18.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2026-01-27 05:54+0000\n"
"PO-Revision-Date: 2026-01-27 05:54+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: report_sale_order_draft
#: model:ir.model.fields,field_description:report_sale_order_draft.field_sale_order__print_as_quotation
msgid "Print As Quotation"
msgstr ""

#. module: report_sale_order_draft
#: model:ir.model,name:report_sale_order_draft.model_sale_order
msgid "Sales Order"
msgstr ""
1 change: 1 addition & 0 deletions report_sale_order_draft/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import sale_order
9 changes: 9 additions & 0 deletions report_sale_order_draft/models/sale_order.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Copyright 2026 Alfredo de la Fuente - AvanzOSC
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
from odoo import fields, models


class SaleOrder(models.Model):
_inherit = "sale.order"

print_as_quotation = fields.Boolean(default=False)
3 changes: 3 additions & 0 deletions report_sale_order_draft/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["whool"]
build-backend = "whool.buildapi"
25 changes: 25 additions & 0 deletions report_sale_order_draft/reports/sale_order_report.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<template id="report_saleorder_document" inherit_id="sale.report_saleorder_document">
<xpath expr="//t[@t-set='layout_document_title']/span[2]" position="attributes">
<attribute name="t-elif">
doc.state in ['draft','sent'] or doc.print_as_quotation
</attribute>
</xpath>
<xpath expr="//div[@name='informations_date']/strong[2]" position="attributes">
<attribute name="t-elif">
doc.state in ['draft','sent'] or doc.print_as_quotation
</attribute>
</xpath>
<xpath expr="//div[@name='informations_date']/strong[2]" position="attributes">
<attribute name="t-elif">
doc.state in ['draft','sent'] or doc.print_as_quotation
</attribute>
</xpath>
<div name="expiration_date" position="attributes">
<attribute name="t-if">
doc.state in ['draft','sent'] or doc.print_as_quotation
</attribute>
</div>
</template>
</odoo>
12 changes: 12 additions & 0 deletions report_sale_order_draft/views/sale_order_views.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<record id="view_order_form" model="ir.ui.view">
<field name="model">sale.order</field>
<field name="inherit_id" ref="sale.view_order_form" />
<field name="arch" type="xml">
<field name="partner_shipping_id" position="after">
<field name="print_as_quotation" />
</field>
</field>
</record>
</odoo>