Skip to content

Commit

Permalink
[IMP] oxigen-purchase: assign the current user as the representative …
Browse files Browse the repository at this point in the history
…when the field is null
  • Loading branch information
FrankC013 authored and eantones committed Jan 11, 2024
1 parent eb134d2 commit 97fff02
Show file tree
Hide file tree
Showing 6 changed files with 507 additions and 6 deletions.
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 @@ class PurchaseOrder(models.Model):
_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
else:
rec._message_auto_subscribe({"user_id": rec.env.uid})
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

0 comments on commit 97fff02

Please sign in to comment.