-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[IMP] oxigen-purchase: assign the current user as the representative …
…when the field is null
- Loading branch information
Showing
6 changed files
with
507 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|
@@ -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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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]> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
Oops, something went wrong.