[IMP] rma_sale: portal improvents

- Now it's possible to open several RMAs in a sale order from the portal
- A new comment button has been added to allow the portal user to enter
relevant information like serial numbers o issue description.
- If the requested operation isn't set no RMA will be opened
- The RMA product qty is now a numeric control with limits according to
the qty available to return

[FIX] rma,rma_sale: fix linter errors
This commit is contained in:
david
2020-08-28 16:54:59 +02:00
committed by Ernesto Tejeda
parent 7a8b42a6a3
commit bdd0e739f6
11 changed files with 87 additions and 37 deletions

View File

@@ -503,6 +503,7 @@ class Rma(models.Model):
vals["team_id"] = self.env["rma.team"].search([], limit=1).id
return super().create(vals)
@api.multi
def copy(self, default=None):
team = super().copy(default)
for follower in self.message_follower_ids:

View File

@@ -1,7 +1,7 @@
# Copyright 2020 Tecnativa - Ernesto Tejeda
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import _, fields, models
from odoo import _, api, fields, models
class RmaTeam(models.Model):
@@ -37,7 +37,9 @@ class RmaTeam(models.Model):
string='Team Members',
)
@api.multi
def copy(self, default=None):
self.ensure_one()
if default is None:
default = {}
if not default.get('name'):

View File

@@ -1,7 +1,7 @@
# Copyright 2020 Tecnativa - Ernesto Tejeda
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import fields, models
from odoo import api, fields, models
class StockPicking(models.Model):
@@ -16,7 +16,9 @@ class StockPicking(models.Model):
for rec in self:
rec.rma_count = len(rec.move_lines.mapped('rma_ids'))
@api.multi
def copy(self, default=None):
self.ensure_one()
if self.env.context.get('set_rma_picking_type'):
location_dest_id = default['location_dest_id']
warehouse = self.env['stock.warehouse'].search(