Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[14.0][IMP] oxigen-purchase: assign the current user as the representative when the field is null #143

Merged
merged 1 commit into from
Jan 11, 2024
Merged
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
62 changes: 58 additions & 4 deletions oxigen_purchase/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,67 @@
Oxigen Purchase
===============

Customizations to Purchase app for Oxigen.
Add picking reference in PO.
..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:1b3ae9fc2a481be3ecc785311b49347a75971949190dee73c64120577c391fd7
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |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-oxigensalud%2Fodoo--addons-lightgray.png?logo=github
:target: https://github.com/oxigensalud/odoo-addons/tree/14.0/oxigen_purchase
:alt: oxigensalud/odoo-addons

|badge1| |badge2| |badge3|

* Customizations to Purchase app for Oxigen.
* Add picking reference in PO.

**Table of contents**

.. contents::
:local:

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

Bugs are tracked on `GitHub Issues <https://github.com/oxigensalud/odoo-addons/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/oxigensalud/odoo-addons/issues/new?body=module:%20oxigen_purchase%0Aversion:%2014.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:

* Lois Rilo <[email protected]>

* `NuoBiT Solutions S.L. <https://www.nuobit.com>`_:

* Frank Cespedes <[email protected]>
* Eric Antones <[email protected]>

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

This module is part of the `oxigensalud/odoo-addons <https://github.com/oxigensalud/odoo-addons/tree/14.0/oxigen_purchase>`_ project on GitHub.

* Lois Rilo <[email protected]>
You are welcome to contribute.
2 changes: 1 addition & 1 deletion oxigen_purchase/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

{
"name": "Oxigen Purchase",
"summary": "Custumizations for Oxigen in Purchase application",
"summary": "Customizations for Oxigen in Purchase application",
"version": "14.0.1.0.0",
"author": "ForgeFlow",
"website": "https://github.com/oxigensalud/odoo-addons",
Expand Down
8 changes: 7 additions & 1 deletion oxigen_purchase/models/purchase_order.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Copyright 2021 ForgeFlow S.L.
# Copyright NuoBiT Solutions - Frank Cespedes <[email protected]>
# Copyright NuoBiT Solutions - Eric Antones <[email protected]>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).

from odoo import api, models
Expand All @@ -8,7 +10,11 @@
_inherit = "purchase.order"

def request_validation(self):
self._message_auto_subscribe({"user_id": self.env.uid})
for rec in self:
if not rec.user_id:
rec.user_id = rec.env.uid

Check warning on line 15 in oxigen_purchase/models/purchase_order.py

View check run for this annotation

Codecov / codecov/patch

oxigen_purchase/models/purchase_order.py#L15

Added line #L15 was not covered by tests
else:
rec._message_auto_subscribe({"user_id": rec.env.uid})

Check warning on line 17 in oxigen_purchase/models/purchase_order.py

View check run for this annotation

Codecov / codecov/patch

oxigen_purchase/models/purchase_order.py#L17

Added line #L17 was not covered by tests
return super().request_validation()

@api.model
Expand Down
8 changes: 8 additions & 0 deletions oxigen_purchase/readme/CONTRIBUTORS.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
* ForgeFlow:

* Lois Rilo <[email protected]>

* `NuoBiT Solutions S.L. <https://www.nuobit.com>`_:

* Frank Cespedes <[email protected]>
* Eric Antones <[email protected]>
2 changes: 2 additions & 0 deletions oxigen_purchase/readme/DESCRIPTION.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
* Customizations to Purchase app for Oxigen.
* Add picking reference in PO.
Loading
Loading