-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
558 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,63 @@ | ||
==================== | ||
RMA Receipt Location | ||
==================== | ||
|
||
.. | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
!! This file is generated by oca-gen-addon-readme !! | ||
!! changes will be overwritten. !! | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
!! source digest: sha256:e1d08f952b548f3fd8444c00f32b480c6c059a0725eb14b013c10ffc16cad523 | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
.. |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-NuoBiT%2Fodoo--addons-lightgray.png?logo=github | ||
:target: https://github.com/NuoBiT/odoo-addons/tree/14.0/rma_receipt_location | ||
:alt: NuoBiT/odoo-addons | ||
|
||
|badge1| |badge2| |badge3| | ||
|
||
This module adds a location field to the RMA and sets it as the receipt location. | ||
|
||
**Table of contents** | ||
|
||
.. contents:: | ||
:local: | ||
|
||
Bug Tracker | ||
=========== | ||
|
||
Bugs are tracked on `GitHub Issues <https://github.com/NuoBiT/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/NuoBiT/odoo-addons/issues/new?body=module:%20rma_receipt_location%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 | ||
~~~~~~~ | ||
|
||
* NuoBiT Solutions | ||
* S.L. | ||
|
||
Contributors | ||
~~~~~~~~~~~~ | ||
|
||
* `Nuobit <https://www.nuobit.com>`_: | ||
|
||
* Frank Cespedes <[email protected]> | ||
|
||
Maintainers | ||
~~~~~~~~~~~ | ||
|
||
This module is part of the `NuoBiT/odoo-addons <https://github.com/NuoBiT/odoo-addons/tree/14.0/rma_receipt_location>`_ project on GitHub. | ||
|
||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
from . import models |
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,15 @@ | ||
# Copyright NuoBiT - Frank Cespedes <[email protected]> | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl) | ||
|
||
{ | ||
"name": "RMA Receipt Location", | ||
"summary": "This module adds a location field to the RMA " | ||
"and sets it as the receipt location", | ||
"version": "14.0.1.0.0", | ||
"category": "RMA", | ||
"author": "NuoBiT Solutions, S.L.", | ||
"website": "https://github.com/nuobit/odoo-addons", | ||
"license": "AGPL-3", | ||
"depends": ["rma"], | ||
"data": ["views/rma_views.xml"], | ||
} |
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 @@ | ||
from . import rma |
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,32 @@ | ||
# Copyright NuoBiT - Frank Cespedes <[email protected]> | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl) | ||
|
||
|
||
from odoo import api, fields, models | ||
|
||
|
||
class Rma(models.Model): | ||
_inherit = "rma" | ||
|
||
receipt_location_id = fields.Many2one( | ||
comodel_name="stock.location", | ||
string="Receipt Location", | ||
compute="_compute_receipt_location_id", | ||
store=True, | ||
readonly=False, | ||
) | ||
|
||
@api.depends("partner_id") | ||
def _compute_receipt_location_id(self): | ||
for rec in self: | ||
rec.receipt_location_id = rec.partner_id.property_stock_customer | ||
|
||
def _prepare_picking(self, picking_form): | ||
picking_form.origin = self.name | ||
picking_form.partner_id = self.partner_shipping_id | ||
picking_form.location_id = self.receipt_location_id | ||
picking_form.location_dest_id = self.location_id | ||
with picking_form.move_ids_without_package.new() as move_form: | ||
move_form.product_id = self.product_id | ||
move_form.product_uom_qty = self.product_uom_qty | ||
move_form.product_uom = self.product_uom |
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,3 @@ | ||
* `Nuobit <https://www.nuobit.com>`_: | ||
|
||
* Frank Cespedes <[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 @@ | ||
This module adds a location field to the RMA and sets it as the receipt location. |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.