mirror of
https://github.com/ForgeFlow/stock-rma.git
synced 2025-01-21 12:57:49 +02:00
[12.0][MIG] Migrate rma_account module to v12.0
This commit is contained in:
committed by
ahenriquez
parent
1c58804a90
commit
a0b7663548
@@ -3,13 +3,13 @@
|
||||
|
||||
{
|
||||
'name': 'RMA Account',
|
||||
'version': '11.0.1.0.0',
|
||||
'version': '12.0.1.0.0',
|
||||
'license': 'LGPL-3',
|
||||
'category': 'RMA',
|
||||
'summary': 'Integrates RMA with Invoice Processing',
|
||||
'author': "Eficent, Odoo Community Association (OCA)",
|
||||
'website': 'http://www.github.com/OCA/rma',
|
||||
'depends': ['account', 'rma'],
|
||||
'depends': ['stock_account', 'rma'],
|
||||
'demo': ['data/rma_operation.xml'],
|
||||
'data': [
|
||||
'security/ir.model.access.csv',
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# Copyright 2017-18 Eficent Business and IT Consulting Services S.L.
|
||||
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html)
|
||||
|
||||
from openerp.tests import common
|
||||
from odoo.tests import common
|
||||
|
||||
|
||||
class TestRmaAccount(common.SingleTransactionCase):
|
||||
@@ -194,6 +194,7 @@ class TestRmaAccount(common.SingleTransactionCase):
|
||||
})
|
||||
make_refund.invoice_refund()
|
||||
rma.refund_line_ids.invoice_id.invoice_validate()
|
||||
rma._compute_refund_count()
|
||||
self.assertEqual(rma.refund_count, 1)
|
||||
self.assertEqual(rma.qty_to_refund, 0.0)
|
||||
self.assertEqual(rma.qty_refunded, 15.0)
|
||||
|
||||
@@ -112,7 +112,7 @@ class RmaRefund(models.TransientModel):
|
||||
account = accounts['stock_input']
|
||||
if not account:
|
||||
raise ValidationError(_(
|
||||
"Accounts are not configure for this product."))
|
||||
"Accounts are not configured for this product."))
|
||||
values = {
|
||||
'name': item.line_id.name or item.rma_id.name,
|
||||
'origin': item.line_id.name or item.rma_id.name,
|
||||
@@ -202,7 +202,7 @@ class RmaRefundItem(models.TransientModel):
|
||||
qty_to_refund = fields.Float(
|
||||
string='Quantity To Refund',
|
||||
digits=dp.get_precision('Product Unit of Measure'))
|
||||
uom_id = fields.Many2one('product.uom', string='Unit of Measure',
|
||||
uom_id = fields.Many2one('uom.uom', string='Unit of Measure',
|
||||
readonly=True)
|
||||
refund_policy = fields.Selection(selection=[
|
||||
('no', 'Not required'), ('ordered', 'Based on Ordered Quantities'),
|
||||
|
||||
Reference in New Issue
Block a user