[FIX] rma_repair: re-license to AGPL due to dependency to repair_refusrbish

[IMP] rma_repair: cosmetics changes due to copier update
This commit is contained in:
AaronHForgeFlow
2022-04-22 11:13:58 +02:00
committed by Jordi Ballester Alomar
parent 8eca01fb23
commit a54de1f764
13 changed files with 27 additions and 23 deletions

View File

@@ -1,5 +1,5 @@
.. image:: https://img.shields.io/badge/licence-LGPL--3-blue.svg .. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
:alt: License LGPL-3 :alt: License AGPL-3
========== ==========
RMA Repair RMA Repair

View File

@@ -1,5 +1,5 @@
# Copyright 2020 ForgeFlow S.L. # Copyright 2020 ForgeFlow S.L.
# License LGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from . import models from . import models
from . import wizards from . import wizards

View File

@@ -1,9 +1,9 @@
# Copyright 2020 ForgeFlow S.L. # Copyright 2020 ForgeFlow S.L.
# License LGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
{ {
"name": "RMA Repair", "name": "RMA Repair",
"version": "15.0.1.0.0", "version": "15.0.1.0.0",
"license": "LGPL-3", "license": "AGPL-3",
"category": "RMA", "category": "RMA",
"summary": "Links RMA with Repairs.", "summary": "Links RMA with Repairs.",
"author": "ForgeFlow S.L., Odoo Community Association (OCA)", "author": "ForgeFlow S.L., Odoo Community Association (OCA)",

View File

@@ -1,4 +1,4 @@
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html) # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html)
from . import repair from . import repair
from . import rma_order_line from . import rma_order_line

View File

@@ -1,5 +1,5 @@
# Copyright 2020-21 ForgeFlow S.L. # Copyright 2020-21 ForgeFlow S.L.
# License LGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from odoo import fields, models from odoo import fields, models

View File

@@ -1,5 +1,5 @@
# Copyright 2020 ForgeFlow S.L. # Copyright 2020 ForgeFlow S.L.
# License LGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from odoo import fields, models from odoo import fields, models

View File

@@ -1,5 +1,5 @@
# Copyright 2020 ForgeFlow S.L. # Copyright 2020 ForgeFlow S.L.
# License LGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from odoo import fields, models from odoo import fields, models

View File

@@ -1,5 +1,5 @@
# Copyright 2020-21 ForgeFlow S.L. # Copyright 2020-21 ForgeFlow S.L.
# License LGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from odoo import api, fields, models from odoo import api, fields, models
@@ -45,7 +45,6 @@ class RmaOrderLine(models.Model):
copy=False, copy=False,
) )
qty_to_repair = fields.Float( qty_to_repair = fields.Float(
string="Qty To Repair",
copy=False, copy=False,
digits="Product Unit of Measure", digits="Product Unit of Measure",
readonly=True, readonly=True,
@@ -53,7 +52,6 @@ class RmaOrderLine(models.Model):
store=True, store=True,
) )
qty_under_repair = fields.Float( qty_under_repair = fields.Float(
string="Qty Under Repair",
copy=False, copy=False,
digits="Product Unit of Measure", digits="Product Unit of Measure",
readonly=True, readonly=True,
@@ -61,7 +59,6 @@ class RmaOrderLine(models.Model):
store=True, store=True,
) )
qty_repaired = fields.Float( qty_repaired = fields.Float(
string="Qty Repaired",
copy=False, copy=False,
digits="Product Unit of Measure", digits="Product Unit of Measure",
readonly=True, readonly=True,

View File

@@ -1,2 +1,2 @@
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html) # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html)
from . import test_rma_repair from . import test_rma_repair

View File

@@ -1,5 +1,5 @@
# Copyright 2020-21 ForgeFlow S.L. # Copyright 2020-21 ForgeFlow S.L.
# License LGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from odoo import fields from odoo import fields
from odoo.tests import common from odoo.tests import common
@@ -156,7 +156,7 @@ class TestRmaRepair(common.SingleTransactionCase):
def test_01_add_from_invoice_customer(self): def test_01_add_from_invoice_customer(self):
"""Test wizard to create RMA from a customer invoice.""" """Test wizard to create RMA from a customer invoice."""
add_inv = self.rma_add_invoice_wiz.with_context( add_inv = self.rma_add_invoice_wiz.with_context(
{ **{
"customer": True, "customer": True,
"active_ids": self.rma_group_customer.id, "active_ids": self.rma_group_customer.id,
"active_model": "rma.order", "active_model": "rma.order",
@@ -209,7 +209,11 @@ class TestRmaRepair(common.SingleTransactionCase):
self.assertEqual(rma.qty_to_repair, 15.0) self.assertEqual(rma.qty_to_repair, 15.0)
self.assertEqual(rma.qty_repaired, 0.0) self.assertEqual(rma.qty_repaired, 0.0)
make_repair = self.rma_make_repair_wiz.with_context( make_repair = self.rma_make_repair_wiz.with_context(
{"customer": True, "active_ids": rma.ids, "active_model": "rma.order.line"} **{
"customer": True,
"active_ids": rma.ids,
"active_model": "rma.order.line",
}
).new() ).new()
make_repair.make_repair_order() make_repair.make_repair_order()
rma.repair_ids.action_repair_confirm() rma.repair_ids.action_repair_confirm()
@@ -221,7 +225,7 @@ class TestRmaRepair(common.SingleTransactionCase):
def test_04_deliver_after_repair(self): def test_04_deliver_after_repair(self):
"""Only deliver after repair""" """Only deliver after repair"""
add_inv = self.rma_add_invoice_wiz.with_context( add_inv = self.rma_add_invoice_wiz.with_context(
{ **{
"customer": True, "customer": True,
"active_ids": self.rma_group_customer_2.id, "active_ids": self.rma_group_customer_2.id,
"active_model": "rma.order", "active_model": "rma.order",
@@ -237,7 +241,11 @@ class TestRmaRepair(common.SingleTransactionCase):
rma.action_rma_approve() rma.action_rma_approve()
self.assertEqual(rma.qty_to_deliver, 0.0) self.assertEqual(rma.qty_to_deliver, 0.0)
make_repair = self.rma_make_repair_wiz.with_context( make_repair = self.rma_make_repair_wiz.with_context(
{"customer": True, "active_ids": rma.ids, "active_model": "rma.order.line"} **{
"customer": True,
"active_ids": rma.ids,
"active_model": "rma.order.line",
}
).new() ).new()
make_repair.make_repair_order() make_repair.make_repair_order()
repair = rma.repair_ids repair = rma.repair_ids

View File

@@ -1,4 +1,4 @@
# Copyright 2020 ForgeFlow S.L. # Copyright 2020 ForgeFlow S.L.
# License LGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from . import rma_order_line_make_repair from . import rma_order_line_make_repair

View File

@@ -1,5 +1,5 @@
# Copyright 2020 ForgeFlow S.L. # Copyright 2020 ForgeFlow S.L.
# License LGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from odoo import _, api, fields, models from odoo import _, api, fields, models
from odoo.exceptions import ValidationError from odoo.exceptions import ValidationError
@@ -130,7 +130,6 @@ class RmaLineMakeRepairItem(models.TransientModel):
comodel_name="product.product", string="Refurbished Product" comodel_name="product.product", string="Refurbished Product"
) )
invoice_method = fields.Selection( invoice_method = fields.Selection(
string="Invoice Method",
selection=[ selection=[
("none", "No Invoice"), ("none", "No Invoice"),
("b4repair", "Before Repair"), ("b4repair", "Before Repair"),

View File

@@ -11,7 +11,7 @@
<newline /> <newline />
<group> <group>
<field name="item_ids" nolabel="1" colspan="2"> <field name="item_ids" nolabel="1" colspan="2">
<tree string="Details" editable="bottom" create="false"> <tree name="Details" editable="bottom" create="false">
<field name="line_id" options="{'no_open': true}" /> <field name="line_id" options="{'no_open': true}" />
<field name="product_id" /> <field name="product_id" />
<field name="product_qty" /> <field name="product_qty" />