diff --git a/crm_claim_rma/__manifest__.py b/crm_claim_rma/__manifest__.py index 21d47784..14135626 100644 --- a/crm_claim_rma/__manifest__.py +++ b/crm_claim_rma/__manifest__.py @@ -1,4 +1,5 @@ # -*- coding: utf-8 -*- +# © 2017 Techspawn Solutions # © 2015 Vauxoo # © 2015 Eezee-It # © 2009-2013 Akretion @@ -10,6 +11,7 @@ 'category': 'Generic Modules/CRM & SRM', 'author': "Akretion, Camptocamp, Eezee-it, MONK Software, Vauxoo, " "Odoo Community Association (OCA)", + "Techspawn Solutions" 'website': 'http://www.akretion.com, http://www.camptocamp.com, ' 'http://www.eezee-it.com, http://www.wearemonk.com, ' 'http://www.vauxoo.com', @@ -33,12 +35,12 @@ "views/claim_line.xml", 'views/res_partner.xml', 'views/stock_view.xml', - 'security/ir.model.access.csv', + #'security/ir.model.access.csv', ], 'demo': [], 'test': [ 'test/test_invoice_refund.yml' ], - 'installable': False, + 'installable': True, 'auto_install': False, } diff --git a/crm_claim_rma/models/account_invoice.py b/crm_claim_rma/models/account_invoice.py index 69c20834..d3b936ac 100644 --- a/crm_claim_rma/models/account_invoice.py +++ b/crm_claim_rma/models/account_invoice.py @@ -1,10 +1,11 @@ # -*- coding: utf-8 -*- +# © 2017 Techspawn Solutions # © 2015 Eezee-It, MONK Software, Vauxoo # © 2013 Camptocamp # © 2009-2013 Akretion, # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). -from openerp import _, api, exceptions, fields, models +from odoo import _, api, exceptions, fields, models class AccountInvoice(models.Model): diff --git a/crm_claim_rma/models/account_invoice_line.py b/crm_claim_rma/models/account_invoice_line.py index ea953c98..6a5b5e41 100644 --- a/crm_claim_rma/models/account_invoice_line.py +++ b/crm_claim_rma/models/account_invoice_line.py @@ -1,10 +1,11 @@ # -*- coding: utf-8 -*- +# © 2017 Techspawn Solutions # © 2015 Vauxoo # © 2013 Camptocamp # © 2009-2013 Akretion, # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). -from openerp import api, models +from odoo import api, models class AccountInvoiceLine(models.Model): diff --git a/crm_claim_rma/models/claim_line.py b/crm_claim_rma/models/claim_line.py index 8d2c9b81..9d3c5b47 100644 --- a/crm_claim_rma/models/claim_line.py +++ b/crm_claim_rma/models/claim_line.py @@ -1,4 +1,5 @@ # -*- coding: utf-8 -*- +# © 2017 Techspawn Solutions # © 2015 Vauxoo # © 2013 Camptocamp # © 2009-2013 Akretion, @@ -10,8 +11,8 @@ from datetime import datetime from dateutil.relativedelta import relativedelta -from openerp import _, api, exceptions, fields, models -from openerp.tools import (DEFAULT_SERVER_DATE_FORMAT, +from odoo import _, api, exceptions, fields, models +from odoo.tools import (DEFAULT_SERVER_DATE_FORMAT, DEFAULT_SERVER_DATETIME_FORMAT) from .invoice_no_date import InvoiceNoDate @@ -58,14 +59,14 @@ class ClaimLine(models.Model): date = fields.Date('Claim Line Date', select=True, default=fields.date.today()) - name = fields.Char('Description', default='none', required=True, + name = fields.Char('Description', default='none', required=False, help="More precise description of the problem") priority = fields.Selection([('0_not_define', 'Not Define'), ('1_normal', 'Normal'), ('2_high', 'High'), ('3_very_high', 'Very High')], 'Priority', default='0_not_define', - compute='_compute_priority', + #compute='_compute_priority', store=True, readonly=False, help="Priority attention of claim line") @@ -77,7 +78,7 @@ class ClaimLine(models.Model): ], help="To describe the line product diagnosis") claim_origin = fields.Selection(SUBJECT_LIST, 'Claim Subject', - required=True, help="To describe the " + required=False, help="To describe the " "line product problem") product_id = fields.Many2one('product.product', string='Product', help="Returned product") @@ -115,20 +116,18 @@ class ClaimLine(models.Model): @api.model def get_warranty_return_partner(self): - return self.env['product.supplierinfo']._columns[ - 'warranty_return_partner' - ].selection + return self.env['product.supplierinfo'].warranty_return_partner + warranty_type = fields.Selection( - get_warranty_return_partner, readonly=True, + get_warranty_return_partner, help="Who is in charge of the warranty return treatment towards " "the end customer. Company will use the current company " "delivery or default address and so on for supplier and brand " "manufacturer. Does not necessarily mean that the warranty " "to be applied is the one of the return partner (ie: can be " "returned to the company and be under the brand warranty") - warranty_return_partner = \ - fields.Many2one('res.partner', string='Warranty Address', + warranty_return_partner = fields.Many2one('res.partner', string='Warranty Address', help="Where the customer has to " "send back the product(s)") claim_id = fields.Many2one('crm.claim', string='Related claim', @@ -278,6 +277,7 @@ class ClaimLine(models.Model): 'warning': warning} def set_warranty_limit(self): + self.ensure_one() claim = self.claim_id diff --git a/crm_claim_rma/models/crm_claim.py b/crm_claim_rma/models/crm_claim.py index 87cf0c4b..09e57a4c 100644 --- a/crm_claim_rma/models/crm_claim.py +++ b/crm_claim_rma/models/crm_claim.py @@ -1,10 +1,11 @@ # -*- coding: utf-8 -*- +# © 2017 Techspawn Solutions # © 2015 Eezee-It, MONK Software, Vauxoo # © 2013 Camptocamp # © 2009-2013 Akretion, # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). -from openerp import _, api, exceptions, fields, models +from odoo import _, api, exceptions, fields, models from .invoice_no_date import InvoiceNoDate from .product_no_supplier import ProductNoSupplier diff --git a/crm_claim_rma/models/invoice_no_date.py b/crm_claim_rma/models/invoice_no_date.py index d433f430..9759d11f 100644 --- a/crm_claim_rma/models/invoice_no_date.py +++ b/crm_claim_rma/models/invoice_no_date.py @@ -1,4 +1,5 @@ # -*- coding: utf-8 -*- +# © 2017 Techspawn Solutions # © 2015 Eezee-It, MONK Software, Vauxoo # © 2013 Camptocamp # © 2009-2013 Akretion, diff --git a/crm_claim_rma/models/procurement_group.py b/crm_claim_rma/models/procurement_group.py index a7b81d77..b0812c2a 100644 --- a/crm_claim_rma/models/procurement_group.py +++ b/crm_claim_rma/models/procurement_group.py @@ -1,8 +1,9 @@ # -*- coding: utf-8 -*- +# © 2017 Techspawn Solutions # © 2016 Cyril Gaudin (Camptocamp) # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). -from openerp import fields, models +from odoo import fields, models class ProcurementGroup(models.Model): diff --git a/crm_claim_rma/models/product_no_supplier.py b/crm_claim_rma/models/product_no_supplier.py index 847dbb56..7a50f620 100644 --- a/crm_claim_rma/models/product_no_supplier.py +++ b/crm_claim_rma/models/product_no_supplier.py @@ -1,4 +1,5 @@ # -*- coding: utf-8 -*- +# © 2017 Techspawn Solutions # © 2015 Vauxoo # © 2015 Eezee-It, MONK Software # © 2013 Camptocamp diff --git a/crm_claim_rma/models/stock_move.py b/crm_claim_rma/models/stock_move.py index b1e826a3..627dafc4 100644 --- a/crm_claim_rma/models/stock_move.py +++ b/crm_claim_rma/models/stock_move.py @@ -1,10 +1,11 @@ # -*- coding: utf-8 -*- +# © 2017 Techspawn Solutions # © 2015 Eezee-It, MONK Software, Vauxoo # © 2013 Camptocamp # © 2009-2013 Akretion, # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). -from openerp import api, models +from odoo import api, models class StockMove(models.Model): diff --git a/crm_claim_rma/models/stock_picking.py b/crm_claim_rma/models/stock_picking.py index 07f25de2..c439f0a5 100644 --- a/crm_claim_rma/models/stock_picking.py +++ b/crm_claim_rma/models/stock_picking.py @@ -1,10 +1,11 @@ # -*- coding: utf-8 -*- +# © 2017 Techspawn Solutions # © 2015 Eezee-It, MONK Software, Vauxoo # © 2013 Camptocamp # © 2009-2013 Akretion, # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). -from openerp import fields, models +from odoo import fields, models class StockPicking(models.Model): diff --git a/crm_claim_rma/models/substate_substate.py b/crm_claim_rma/models/substate_substate.py index ce97cfbf..e3187251 100644 --- a/crm_claim_rma/models/substate_substate.py +++ b/crm_claim_rma/models/substate_substate.py @@ -1,10 +1,11 @@ # -*- coding: utf-8 -*- +# © 2017 Techspawn Solutions # © 2015 Eezee-It, MONK Software, Vauxoo # © 2013 Camptocamp # © 2009-2013 Akretion, # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). -from openerp import fields, models +from odoo import fields, models class SubstateSubstate(models.Model): diff --git a/crm_claim_rma/tests/test_claim.py b/crm_claim_rma/tests/test_claim.py index c1456684..83b7e3c8 100644 --- a/crm_claim_rma/tests/test_claim.py +++ b/crm_claim_rma/tests/test_claim.py @@ -2,7 +2,7 @@ # © 2016 Cyril Gaudin (Camptocamp) # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). -from openerp.tests import TransactionCase +from odoo.tests import TransactionCase class TestClaim(TransactionCase): diff --git a/crm_claim_rma/tests/test_picking_creation.py b/crm_claim_rma/tests/test_picking_creation.py index 315ec3dc..1749f8c0 100644 --- a/crm_claim_rma/tests/test_picking_creation.py +++ b/crm_claim_rma/tests/test_picking_creation.py @@ -3,7 +3,7 @@ # © 2014 Camptocamp SA # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). -from openerp.tests import common +from odoo.tests import common class TestPickingCreation(common.TransactionCase): diff --git a/crm_claim_rma/views/account_invoice.xml b/crm_claim_rma/views/account_invoice.xml index 3568fb19..d357d056 100644 --- a/crm_claim_rma/views/account_invoice.xml +++ b/crm_claim_rma/views/account_invoice.xml @@ -1,5 +1,6 @@ + @@ -8,11 +9,13 @@ - - - - - + + + + + + + diff --git a/crm_claim_rma/views/claim_line.xml b/crm_claim_rma/views/claim_line.xml index 140c5e4a..c86444be 100644 --- a/crm_claim_rma/views/claim_line.xml +++ b/crm_claim_rma/views/claim_line.xml @@ -110,7 +110,8 @@ - + + @@ -119,26 +120,26 @@ - + - - - + + + - + - - + +
@@ -148,34 +149,6 @@ - - - Claim line form view to be used inside claim tree - primary - claim.line - - - - - 1 - - - {'claim_id': parent.id, 'company_id': parent.company_id, 'warehouse_id': - parent.warehouse_id, 'claim_type': parent.claim_type, 'claim_date': parent.date} - - - - {'claim_id': parent.id, 'company_id': parent.company_id, 'warehouse_id': - parent.warehouse_id, 'claim_type': parent.claim_type, 'claim_date': parent.date} - - - - - Claim lines @@ -193,7 +166,7 @@ diff --git a/crm_claim_rma/views/crm_claim.xml b/crm_claim_rma/views/crm_claim.xml index e85d9018..f48b51be 100644 --- a/crm_claim_rma/views/crm_claim.xml +++ b/crm_claim_rma/views/crm_claim.xml @@ -1,5 +1,6 @@ + CRM - Claims Tree @@ -249,11 +250,10 @@ crm.claim - - + @@ -277,5 +277,7 @@ - + + + diff --git a/crm_claim_rma/wizards/account_invoice_refund.py b/crm_claim_rma/wizards/account_invoice_refund.py index 39d4465f..72c1d1b5 100644 --- a/crm_claim_rma/wizards/account_invoice_refund.py +++ b/crm_claim_rma/wizards/account_invoice_refund.py @@ -5,7 +5,7 @@ # © 2009-2013 Akretion, # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). -from openerp import api, fields, models +from odoo import api, fields, models class AccountInvoiceRefund(models.TransientModel): diff --git a/crm_claim_rma/wizards/claim_make_picking.py b/crm_claim_rma/wizards/claim_make_picking.py index d896bf72..ccbbb6ce 100644 --- a/crm_claim_rma/wizards/claim_make_picking.py +++ b/crm_claim_rma/wizards/claim_make_picking.py @@ -6,8 +6,8 @@ import time -from openerp import models, fields, exceptions, api, _ -from openerp.tools import DEFAULT_SERVER_DATETIME_FORMAT as DT_FORMAT +from odoo import models, fields, exceptions, api, _ +from odoo.tools import DEFAULT_SERVER_DATETIME_FORMAT as DT_FORMAT class ClaimMakePicking(models.TransientModel):