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
114 changes: 114 additions & 0 deletions sale_order_client_order_ref_mandatory/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
=====================================
Sale Order Client Order Ref Mandatory
=====================================

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

.. |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/18.0/sale_order_client_order_ref_mandatory
: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-18-0/sale-workflow-18-0-sale_order_client_order_ref_mandatory
: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=18.0
:alt: Try me on Runboat

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

For a Sale Order, makes required client_order_ref field and reposition
it, for both form view and Sale reports. Also makes this field
searchable and add an optional column on both quotation and sale orders
lists

Sale Order Form View
--------------------

Before
~~~~~~

|sale_order_before|

After
~~~~~

|sale_order_after|

Sale Report
-----------

Before
~~~~~~

|template_before|

After
~~~~~

|template_after|

.. |sale_order_before| image:: https://raw.githubusercontent.com/OCA/sale-workflow/18.0/sale_order_client_order_ref_mandatory/static/description/client_sale_order_ref_before_image.png
.. |sale_order_after| image:: https://raw.githubusercontent.com/OCA/sale-workflow/18.0/sale_order_client_order_ref_mandatory/static/description/client_sale_order_ref_after_image.png
.. |template_before| image:: https://raw.githubusercontent.com/OCA/sale-workflow/18.0/sale_order_client_order_ref_mandatory/static/description/client_sale_order_ref_template_before_image.png
.. |template_after| image:: https://raw.githubusercontent.com/OCA/sale-workflow/18.0/sale_order_client_order_ref_mandatory/static/description/client_sale_order_ref_template_after_image.png

**Table of contents**

.. contents::
:local:

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_order_client_order_ref_mandatory%0Aversion:%2018.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
-------

* Solvos

Contributors
------------

- `Solvos <https://www.solvos.es>`__

- Christian Santamaría <[email protected]>
- David Alonso <[email protected]>
- Dante Pereyra <[email protected]>

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/18.0/sale_order_client_order_ref_mandatory>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
1 change: 1 addition & 0 deletions sale_order_client_order_ref_mandatory/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
19 changes: 19 additions & 0 deletions sale_order_client_order_ref_mandatory/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# © 2025 Solvos Consultoría Informática (<http://www.solvos.es>)
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
{
"name": "Sale Order Client Order Ref Mandatory",
"summary": """
Adds required client_order_ref field and reposition it
""",
"author": "Solvos, Odoo Community Association (OCA)",
"license": "AGPL-3",
"version": "18.0.1.0.0",
"category": "Sale",
"website": "https://github.com/OCA/sale-workflow",
"depends": ["sale"],
"data": [
"views/sale_order_view.xml",
"report/sale_order_report_templates.xml",
],
"installable": True,
}
21 changes: 21 additions & 0 deletions sale_order_client_order_ref_mandatory/i18n/es.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * sale_order_client_order_ref_mandatory
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 18.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-07-02 07:08+0000\n"
"PO-Revision-Date: 2025-07-02 07:08+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_order_client_order_ref_mandatory
#: model_terms:ir.ui.view,arch_db:sale_order_client_order_ref_mandatory.view_order_form
msgid "Enter the customer reference here"
msgstr "Introduzca aquí la referencia del cliente"
1 change: 1 addition & 0 deletions sale_order_client_order_ref_mandatory/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import sale_order
13 changes: 13 additions & 0 deletions sale_order_client_order_ref_mandatory/models/sale_order.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# © 2025 Solvos Consultoría Informática (<http://www.solvos.es>)
# 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"

client_order_ref = fields.Char(
string="Customer Reference",
copy=False,
default="/",
)
3 changes: 3 additions & 0 deletions sale_order_client_order_ref_mandatory/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["whool"]
build-backend = "whool.buildapi"
4 changes: 4 additions & 0 deletions sale_order_client_order_ref_mandatory/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
- [Solvos](https://www.solvos.es)
- Christian Santamaría \<<[email protected]>\>
- David Alonso \<<[email protected]>\>
- Dante Pereyra \<<[email protected]>\>
15 changes: 15 additions & 0 deletions sale_order_client_order_ref_mandatory/readme/DESCRIPTION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
For a Sale Order, makes required client_order_ref field and reposition it,
for both form view and Sale reports.
Also makes this field searchable and add an optional column on both quotation and sale orders lists

## Sale Order Form View
### Before
![sale_order_before](../static/description/client_sale_order_ref_before_image.png)
### After
![sale_order_after](../static/description/client_sale_order_ref_after_image.png)

## Sale Report
### Before
![template_before](../static/description/client_sale_order_ref_template_before_image.png)
### After
![template_after](../static/description/client_sale_order_ref_template_after_image.png)
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<odoo>
<template
id="report_saleorder_document"
inherit_id="sale.report_saleorder_document"
>
<xpath expr="//div[@id='informations']" position="before">
<h3>
<span t-field="doc.client_order_ref" />
</h3>
</xpath>
<xpath
expr="//div[@t-field='doc.client_order_ref']/parent::div"
position="attributes"
>
<attribute name="t-if">False</attribute>
</xpath>
</template>
</odoo>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading