Skip to content

Commit

Permalink
[3086][ADD] purchase_order_line_description_adj (#18)
Browse files Browse the repository at this point in the history
* [ADD] purchase_order_line_description_adj

* [IMP] adjust with product_alternative_code
  • Loading branch information
AungKoKoLin1997 authored Jun 20, 2023
1 parent f803a51 commit e6556c0
Show file tree
Hide file tree
Showing 10 changed files with 496 additions and 1 deletion.
2 changes: 1 addition & 1 deletion product_alternative_code/models/product_product.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def name_get(self):
for rec in res:
product = self.browse(rec[0])
alt_code = product.alt_code
if not alt_code:
if not alt_code or not self._context.get("display_alt_code", True):
name_list.append(rec)
continue
name = rec[1]
Expand Down
52 changes: 52 additions & 0 deletions purchase_order_line_description_adj/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
===================================
Purchase Order Line Description Adj
===================================

.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! 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-qrtl%2Faxls--custom-lightgray.png?logo=github
:target: https://github.com/qrtl/axls-custom/tree/16.0/purchase_order_line_description_adj
:alt: qrtl/axls-custom

|badge1| |badge2| |badge3|

This module removes the default code from purchase order line description.

**Table of contents**

.. contents::
:local:

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

Bugs are tracked on `GitHub Issues <https://github.com/qrtl/axls-custom/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/qrtl/axls-custom/issues/new?body=module:%20purchase_order_line_description_adj%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
~~~~~~~

* Quartile Limited

Maintainers
~~~~~~~~~~~

This module is part of the `qrtl/axls-custom <https://github.com/qrtl/axls-custom/tree/16.0/purchase_order_line_description_adj>`_ project on GitHub.

You are welcome to contribute.
1 change: 1 addition & 0 deletions purchase_order_line_description_adj/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
12 changes: 12 additions & 0 deletions purchase_order_line_description_adj/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Copyright 2023 Quartile Limited
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Purchase Order Line Description Adj",
"version": "16.0.1.0.0",
"author": "Quartile Limited",
"website": "https://www.quartile.co",
"category": "Purchase",
"license": "AGPL-3",
"depends": ["purchase", "product_alternative_code"],
"installable": True,
}
1 change: 1 addition & 0 deletions purchase_order_line_description_adj/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import purchase_order_line
14 changes: 14 additions & 0 deletions purchase_order_line_description_adj/models/purchase_order_line.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Copyright 2022 Quartile Limited
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).

from odoo import models


class PurchaseOrderLine(models.Model):
_inherit = "purchase.order.line"

def _get_product_purchase_description(self, product_lang):
product_lang = product_lang.with_context(
display_default_code=False, display_alt_code=False
)
return super()._get_product_purchase_description(product_lang)
1 change: 1 addition & 0 deletions purchase_order_line_description_adj/readme/DESCRIPTION.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This module removes the default code from purchase order line description.
Loading

0 comments on commit e6556c0

Please sign in to comment.