mirror of
https://github.com/ForgeFlow/stock-rma.git
synced 2025-01-21 12:57:49 +02:00
[9.0][FIX] rma:
* fix assignment of moves. * default qty in rma lines. * remove account dependency. * test and flake8 fixes.
This commit is contained in:
@@ -17,7 +17,7 @@ class RmaOrder(models.Model):
|
||||
self.sale_count = len(list(set(sales_list)))
|
||||
|
||||
sale_count = fields.Integer(compute=_compute_sales_count,
|
||||
string='# of Sales', copy=False, default=0)
|
||||
string='# of Sales', copy=False, default=0)
|
||||
|
||||
@api.model
|
||||
def _get_line_domain(self, rma_id, line):
|
||||
@@ -38,4 +38,4 @@ class RmaOrder(models.Model):
|
||||
if rma_line.sale_line_id and rma_line.sale_line_id.id:
|
||||
order_ids.append(rma_line.sale_line_id.order_id.id)
|
||||
result['domain'] = [('id', 'in', order_ids)]
|
||||
return result
|
||||
return result
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
from openerp import _, api, fields, models
|
||||
from openerp.addons import decimal_precision as dp
|
||||
|
||||
|
||||
class RmaOrderLine(models.Model):
|
||||
_inherit = "rma.order.line"
|
||||
|
||||
|
||||
@@ -2,11 +2,8 @@
|
||||
# © 2017 Eficent Business and IT Consulting Services S.L.
|
||||
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html)
|
||||
|
||||
import time
|
||||
from openerp import models, fields, exceptions, api, _
|
||||
from openerp import _, api, fields, models
|
||||
from openerp.exceptions import ValidationError
|
||||
from openerp.tools import DEFAULT_SERVER_DATETIME_FORMAT as DT_FORMAT
|
||||
import openerp.addons.decimal_precision as dp
|
||||
|
||||
|
||||
class RmaAddSale(models.TransientModel):
|
||||
@@ -31,9 +28,9 @@ class RmaAddSale(models.TransientModel):
|
||||
return res
|
||||
|
||||
rma_id = fields.Many2one('rma.order',
|
||||
string='RMA Order',
|
||||
readonly=True,
|
||||
ondelete='cascade')
|
||||
string='RMA Order',
|
||||
readonly=True,
|
||||
ondelete='cascade')
|
||||
|
||||
partner_id = fields.Many2one(comodel_name='res.partner', string='Partner',
|
||||
readonly=True)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# © 2017 Eficent Business and IT Consulting Services S.L.
|
||||
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html)
|
||||
from openerp import models, fields, exceptions, api, _
|
||||
from openerp import api, fields, models
|
||||
|
||||
|
||||
class RmaMakePicking(models.TransientModel):
|
||||
@@ -13,8 +13,9 @@ class RmaMakePicking(models.TransientModel):
|
||||
res['sale_line_id'] = line.sale_line_id.id
|
||||
return res
|
||||
|
||||
|
||||
class RmaMakePickingItem(models.TransientModel):
|
||||
_inherit = "rma_make_picking.wizard.item"
|
||||
|
||||
sale_line_id = fields.Many2one('sale.order.line',
|
||||
string='Sale Line')
|
||||
string='Sale Line')
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# © 2017 Eficent Business and IT Consulting Services S.L.
|
||||
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html)
|
||||
from openerp import models, fields, exceptions, api, _
|
||||
import openerp.addons.decimal_precision as dp
|
||||
from openerp.exceptions import ValidationError
|
||||
from openerp import _, api, fields, models
|
||||
|
||||
|
||||
class RmaRefund(models.TransientModel):
|
||||
@@ -20,4 +18,4 @@ class RmaRefundItem(models.TransientModel):
|
||||
_inherit = "rma.refund.item"
|
||||
|
||||
sale_line_id = fields.Many2one('sale.order.line',
|
||||
string='Sale Line')
|
||||
string='Sale Line')
|
||||
|
||||
Reference in New Issue
Block a user