mirror of
https://github.com/OCA/rma.git
synced 2025-02-16 17:11:47 +02:00
@@ -179,13 +179,13 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose
|
||||
mission is to support the collaborative development of Odoo features and
|
||||
promote its widespread use.
|
||||
|
||||
.. |maintainer-chiendandalu| image:: https://github.com/chiendandalu.png?size=40px
|
||||
:target: https://github.com/chiendandalu
|
||||
:alt: chiendandalu
|
||||
.. |maintainer-chienandalu| image:: https://github.com/chienandalu.png?size=40px
|
||||
:target: https://github.com/chienandalu
|
||||
:alt: chienandalu
|
||||
|
||||
Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:
|
||||
|
||||
|maintainer-chiendandalu|
|
||||
|maintainer-chienandalu|
|
||||
|
||||
This module is part of the `OCA/rma <https://github.com/OCA/rma/tree/15.0/rma>`_ project on GitHub.
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
"category": "RMA",
|
||||
"website": "https://github.com/OCA/rma",
|
||||
"author": "Tecnativa, Odoo Community Association (OCA)",
|
||||
"maintainers": ["chiendandalu"],
|
||||
"maintainers": ["chienandalu"],
|
||||
"license": "AGPL-3",
|
||||
"depends": ["stock_account"],
|
||||
"data": [
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
|
||||
from odoo import _, api, fields, models
|
||||
from odoo.exceptions import ValidationError
|
||||
from odoo.tools import float_compare
|
||||
|
||||
|
||||
class StockMove(models.Model):
|
||||
@@ -59,7 +60,18 @@ class StockMove(models.Model):
|
||||
"""
|
||||
for move in self.filtered(lambda r: r.state not in ("done", "cancel")):
|
||||
rma_receiver = move.sudo().rma_receiver_ids
|
||||
if rma_receiver and move.quantity_done != rma_receiver.product_uom_qty:
|
||||
qty_prec = self.env["decimal.precision"].precision_get(
|
||||
"Product Unit of Measure"
|
||||
)
|
||||
if (
|
||||
rma_receiver
|
||||
and float_compare(
|
||||
move.quantity_done,
|
||||
rma_receiver.product_uom_qty,
|
||||
precision_digits=qty_prec,
|
||||
)
|
||||
!= 0
|
||||
):
|
||||
raise ValidationError(
|
||||
_(
|
||||
"The quantity done for the product '%(id)s' must "
|
||||
|
||||
@@ -528,7 +528,7 @@ If you spotted it first, help us to smash it by providing a detailed and welcome
|
||||
mission is to support the collaborative development of Odoo features and
|
||||
promote its widespread use.</p>
|
||||
<p>Current <a class="reference external" href="https://odoo-community.org/page/maintainer-role">maintainer</a>:</p>
|
||||
<p><a class="reference external image-reference" href="https://github.com/chiendandalu"><img alt="chiendandalu" src="https://github.com/chiendandalu.png?size=40px" /></a></p>
|
||||
<p><a class="reference external image-reference" href="https://github.com/chienandalu"><img alt="chienandalu" src="https://github.com/chienandalu.png?size=40px" /></a></p>
|
||||
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/rma/tree/15.0/rma">OCA/rma</a> project on GitHub.</p>
|
||||
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user