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
92 changes: 92 additions & 0 deletions purchase_partner_display_ref/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
.. image:: https://odoo-community.org/readme-banner-image
:target: https://odoo-community.org/get-involved?utm_source=readme
:alt: Odoo Community Association

==================================
Purchase Partner Display Reference
==================================

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

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

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

This module prefixes the supplier reference
(``res.partner.supplier_ref``) to the vendor's ``display_name`` whenever
it is rendered inside a Purchase view — shown as
``[V00045] Acme Supplies`` in the vendor field of a purchase order, both
in the dropdown and on the selected value.

The decoration mechanism lives in the generic ``partner_display_ref``
module; this module injects the ``partner_display_ref_field`` context
key (set to ``supplier_ref``) into the Purchase views and registers
``supplier_ref`` as a dependency of the vendor ``display_name``. Other
views that read ``display_name`` continue to see the plain partner name.

**Table of contents**

.. contents::
:local:

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

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

* ForgeFlow

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

- `ForgeFlow <https://www.forgeflow.com>`__

- Jasmin Solanki <jasmin.solanki@forgeflow.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/purchase-workflow <https://github.com/OCA/purchase-workflow/tree/19.0/purchase_partner_display_ref>`_ 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 purchase_partner_display_ref/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
17 changes: 17 additions & 0 deletions purchase_partner_display_ref/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Copyright 2026 ForgeFlow S.L.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

{
"name": "Purchase Partner Display Reference",
"summary": "Wire the supplier reference prefix into Purchase views.",
"version": "19.0.1.0.0",
"category": "Purchases",
"author": "ForgeFlow, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/purchase-workflow",
"license": "AGPL-3",
"depends": ["partner_display_ref", "partner_supplier_ref", "purchase"],
"data": [
"views/purchase_order_views.xml",
],
"installable": True,
}
1 change: 1 addition & 0 deletions purchase_partner_display_ref/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import res_partner
12 changes: 12 additions & 0 deletions purchase_partner_display_ref/models/res_partner.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Copyright 2026 ForgeFlow S.L.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from odoo import api, models


class ResPartner(models.Model):
_inherit = "res.partner"

@api.depends("supplier_ref")
def _compute_display_name(self):
return super()._compute_display_name()
3 changes: 3 additions & 0 deletions purchase_partner_display_ref/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["whool"]
build-backend = "whool.buildapi"
2 changes: 2 additions & 0 deletions purchase_partner_display_ref/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- [ForgeFlow](https://www.forgeflow.com)
- Jasmin Solanki \<<jasmin.solanki@forgeflow.com>\>
10 changes: 10 additions & 0 deletions purchase_partner_display_ref/readme/DESCRIPTION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
This module prefixes the supplier reference (`res.partner.supplier_ref`) to the
vendor's `display_name` whenever it is rendered inside a Purchase view —
shown as `[V00045] Acme Supplies` in the vendor field of a purchase order, both
in the dropdown and on the selected value.

The decoration mechanism lives in the generic `partner_display_ref` module; this
module injects the `partner_display_ref_field` context key (set to
`supplier_ref`) into the Purchase views and registers `supplier_ref` as a
dependency of the vendor `display_name`. Other views that read `display_name`
continue to see the plain partner name.
Loading
Loading