diff --git a/crm_claim_ext/__init__.py b/crm_claim_ext/__init__.py
index 4f55782b..f6475beb 100644
--- a/crm_claim_ext/__init__.py
+++ b/crm_claim_ext/__init__.py
@@ -19,5 +19,5 @@
#You should have received a copy of the GNU General Public License #
#along with this program. If not, see . #
#########################################################################
-
+import wizard
import crm_claim_ext
diff --git a/crm_claim_ext/__openerp__.py b/crm_claim_ext/__openerp__.py
index 4cc620bf..61fa217f 100644
--- a/crm_claim_ext/__openerp__.py
+++ b/crm_claim_ext/__openerp__.py
@@ -27,7 +27,13 @@
'category': 'Generic Modules/CRM & SRM',
'description': """
Akretion - Emmanuel Samyn
-Add some fields to CRM claim : canal, spirit
+ * Add some fields to CRM claim : canal, spirit, product.exchange
+ * Forbid to return product from picking out and in by masking the button
+
+It also contain all views that weren't used when porting this module to v7.0.
+Also, all wizard that were not used anymore also landed here in the wait his original
+author (Akretion) take a decision on them.
+
""",
'author': 'esamyn',
'website': 'http://www.erp-236.com',
@@ -35,6 +41,11 @@ Add some fields to CRM claim : canal, spirit
'init_xml': [],
'update_xml': [
'crm_claim_ext_view.xml',
+# 'wizard/returned_lines_from_invoice_wizard_view.xml',
+# 'wizard/picking_from_returned_lines_wizard_view.xml',
+# 'wizard/refund_from_returned_lines_wizard_view.xml',
+# 'wizard/exchange_from_returned_lines_wizard_view.xml',
+# 'wizard/picking_from_exchange_lines_wizard_view.xml',
],
'demo_xml': [],
'test': [],
diff --git a/crm_claim_ext/crm_claim_ext.py b/crm_claim_ext/crm_claim_ext.py
index 1c02c78b..893b5f44 100644
--- a/crm_claim_ext/crm_claim_ext.py
+++ b/crm_claim_ext/crm_claim_ext.py
@@ -36,7 +36,7 @@ class crm_claim_ext(osv.osv):
_columns = {
'canal_id': fields.many2one('res.partner.canal', 'Channel'),
'som': fields.many2one('res.partner.som', 'State of Mind'),
-
+ 'product_exchange_ids': fields.one2many('product.exchange', 'claim_return_id', 'Product exchanges'),
}
crm_claim_ext()
diff --git a/crm_claim_ext/crm_claim_ext_view.xml b/crm_claim_ext/crm_claim_ext_view.xml
index faf1f83b..7db71613 100644
--- a/crm_claim_ext/crm_claim_ext_view.xml
+++ b/crm_claim_ext/crm_claim_ext_view.xml
@@ -33,5 +33,122 @@
+
+ crm_claim_rma.picking_out_form
+ stock.picking.out
+
+
+
+
+ 1
+
+
+
+
+
+ crm_claim_rma.picking_in_form
+ stock.picking.in
+
+
+
+
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/crm_claim_ext/wizard/__init__.py b/crm_claim_ext/wizard/__init__.py
new file mode 100644
index 00000000..6486a58c
--- /dev/null
+++ b/crm_claim_ext/wizard/__init__.py
@@ -0,0 +1,26 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+# Copyright 2013 Camptocamp
+# Copyright 2009-2013 Akretion,
+# Author: Emmanuel Samyn, Raphaël Valyi, Sébastien Beau, Joel Grand-Guillaume
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as
+# published by the Free Software Foundation, either version 3 of the
+# License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see .
+#
+##############################################################################
+#import returned_lines_from_invoice
+#import picking_from_returned_lines
+#import refund_from_returned_lines
+#import exchange_from_returned_lines
+#import picking_from_exchange_lines
\ No newline at end of file
diff --git a/crm_claim_rma/wizard/exchange_from_returned_lines.py b/crm_claim_ext/wizard/exchange_from_returned_lines.py
similarity index 100%
rename from crm_claim_rma/wizard/exchange_from_returned_lines.py
rename to crm_claim_ext/wizard/exchange_from_returned_lines.py
diff --git a/crm_claim_rma/wizard/exchange_from_returned_lines_wizard_view.xml b/crm_claim_ext/wizard/exchange_from_returned_lines_wizard_view.xml
similarity index 100%
rename from crm_claim_rma/wizard/exchange_from_returned_lines_wizard_view.xml
rename to crm_claim_ext/wizard/exchange_from_returned_lines_wizard_view.xml
diff --git a/crm_claim_rma/wizard/picking_from_exchange_lines.py b/crm_claim_ext/wizard/picking_from_exchange_lines.py
similarity index 100%
rename from crm_claim_rma/wizard/picking_from_exchange_lines.py
rename to crm_claim_ext/wizard/picking_from_exchange_lines.py
diff --git a/crm_claim_rma/wizard/picking_from_exchange_lines_wizard_view.xml b/crm_claim_ext/wizard/picking_from_exchange_lines_wizard_view.xml
similarity index 100%
rename from crm_claim_rma/wizard/picking_from_exchange_lines_wizard_view.xml
rename to crm_claim_ext/wizard/picking_from_exchange_lines_wizard_view.xml
diff --git a/crm_claim_rma/wizard/picking_from_returned_lines.py b/crm_claim_ext/wizard/picking_from_returned_lines.py
similarity index 100%
rename from crm_claim_rma/wizard/picking_from_returned_lines.py
rename to crm_claim_ext/wizard/picking_from_returned_lines.py
diff --git a/crm_claim_rma/wizard/picking_from_returned_lines_wizard_view.xml b/crm_claim_ext/wizard/picking_from_returned_lines_wizard_view.xml
similarity index 100%
rename from crm_claim_rma/wizard/picking_from_returned_lines_wizard_view.xml
rename to crm_claim_ext/wizard/picking_from_returned_lines_wizard_view.xml
diff --git a/crm_claim_rma/wizard/refund_from_returned_lines.py b/crm_claim_ext/wizard/refund_from_returned_lines.py
similarity index 100%
rename from crm_claim_rma/wizard/refund_from_returned_lines.py
rename to crm_claim_ext/wizard/refund_from_returned_lines.py
diff --git a/crm_claim_rma/wizard/refund_from_returned_lines_wizard_view.xml b/crm_claim_ext/wizard/refund_from_returned_lines_wizard_view.xml
similarity index 100%
rename from crm_claim_rma/wizard/refund_from_returned_lines_wizard_view.xml
rename to crm_claim_ext/wizard/refund_from_returned_lines_wizard_view.xml
diff --git a/crm_claim_rma/wizard/returned_lines_from_invoice.py b/crm_claim_ext/wizard/returned_lines_from_invoice.py
similarity index 100%
rename from crm_claim_rma/wizard/returned_lines_from_invoice.py
rename to crm_claim_ext/wizard/returned_lines_from_invoice.py
diff --git a/crm_claim_rma/wizard/returned_lines_from_invoice_wizard_view.xml b/crm_claim_ext/wizard/returned_lines_from_invoice_wizard_view.xml
similarity index 100%
rename from crm_claim_rma/wizard/returned_lines_from_invoice_wizard_view.xml
rename to crm_claim_ext/wizard/returned_lines_from_invoice_wizard_view.xml
diff --git a/crm_claim_rma/__init__.py b/crm_claim_rma/__init__.py
index bd13e30e..1d2703af 100644
--- a/crm_claim_rma/__init__.py
+++ b/crm_claim_rma/__init__.py
@@ -1,25 +1,24 @@
# -*- coding: utf-8 -*-
-#########################################################################
-# #
-# #
-#########################################################################
-# #
-# Copyright (C) 2009-2011 Akretion, Raphaël Valyi, Sébastien Beau, #
-# Emmanuel Samyn #
-# #
-#This program is free software: you can redistribute it and/or modify #
-#it under the terms of the GNU General Public License as published by #
-#the Free Software Foundation, either version 3 of the License, or #
-#(at your option) any later version. #
-# #
-#This program is distributed in the hope that it will be useful, #
-#but WITHOUT ANY WARRANTY; without even the implied warranty of #
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
-#GNU General Public License for more details. #
-# #
-#You should have received a copy of the GNU General Public License #
-#along with this program. If not, see . #
-#########################################################################
+##############################################################################
+#
+# Copyright 2013 Camptocamp
+# Copyright 2009-2013 Akretion,
+# Author: Emmanuel Samyn, Raphaël Valyi, Sébastien Beau, Joel Grand-Guillaume
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as
+# published by the Free Software Foundation, either version 3 of the
+# License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see .
+#
+##############################################################################
import wizard
import crm_claim_rma
diff --git a/crm_claim_rma/__openerp__.py b/crm_claim_rma/__openerp__.py
index ae9ce9bd..e4ecc4de 100644
--- a/crm_claim_rma/__openerp__.py
+++ b/crm_claim_rma/__openerp__.py
@@ -1,62 +1,53 @@
# -*- coding: utf-8 -*-
-#########################################################################
-# #
-# #
-#########################################################################
-# #
-# Copyright (C) 2009-2011 Akretion, Raphaël Valyi, Sébastien Beau, #
-# Emmanuel Samyn, Benoît Guillot #
-# #
-#This program is free software: you can redistribute it and/or modify #
-#it under the terms of the GNU General Public License as published by #
-#the Free Software Foundation, either version 3 of the License, or #
-#(at your option) any later version. #
-# #
-#This program is distributed in the hope that it will be useful, #
-#but WITHOUT ANY WARRANTY; without even the implied warranty of #
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
-#GNU General Public License for more details. #
-# #
-#You should have received a copy of the GNU General Public License #
-#along with this program. If not, see . #
-#########################################################################
-
-
+##############################################################################
+#
+# Copyright 2013 Camptocamp
+# Copyright 2009-2013 Akretion,
+# Author: Emmanuel Samyn, Raphaël Valyi, Sébastien Beau, Joel Grand-Guillaume
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as
+# published by the Free Software Foundation, either version 3 of the
+# License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see .
+#
+##############################################################################
{
'name': 'CRM Product Return',
'version': '1.0',
'category': 'Generic Modules/CRM & SRM',
'description': """
-Akretion - Emmanuel Samyn
-Management of Return Merchandise Authorization (RMA) in OpenERP.
-Upgrade the standard crm_claim module to add :
+Management of Return Merchandise Authorization (RMA)
+====================================================
+
+This module aim to improve the Claims by adding a way to manage the product returns. It
+allows you to create and manage picking from a claim. It also introduce a new object
+the claim lines to better handle that problematic. One Claim can have several lines that concern
+the return of differents products. It's for every of them that you'll be able to check the
+warranty (still running or not).
+
+It mainly contain the following features :
* product returns (one by one, mass return by lot, mass return by invoice)
* warranty control & return address (based on invoice date and product form)
* product picking in / out
* product refund
-* product exchange
-* access to related customer data (orders, invoices, refunds, picking in/out)
+* access to related customer data (orders, invoices, refunds, picking in/out) from a claim
-THIS MODULE REPLACES Akretion stock_rma from V6.0
-
-WARNING : To use the module in V6.1 you need a refactor of the function refund
-in the module account from the addons. You can find the refactor at the revisions 6933 and 6934
-on this branch : https://code.launchpad.net/~akretion-team/openobject-addons/openobject-addons-61-akretion
-
- """,
- 'author': 'esamyn',
- 'website': 'http://www.erp-236.com',
+""",
+ 'author': 'Akretion, Camptocamp',
+ 'website': 'http://www.akretion.com',
'depends': ['sale','stock','crm_claim','product_warranty'],
- 'init_xml': ['rma_data.xml',],
- 'update_xml': [
+ 'data': [
'wizard/claim_make_picking_view.xml',
'wizard/claim_make_picking_from_picking_view.xml',
'wizard/returned_lines_from_serial_wizard_view.xml',
-# 'wizard/returned_lines_from_invoice_wizard_view.xml',
-# 'wizard/picking_from_returned_lines_wizard_view.xml',
-# 'wizard/refund_from_returned_lines_wizard_view.xml',
-# 'wizard/exchange_from_returned_lines_wizard_view.xml',
-# 'wizard/picking_from_exchange_lines_wizard_view.xml',
'wizard/get_empty_serial_view.xml',
'crm_claim_rma_view.xml',
'security/ir.model.access.csv',
@@ -65,12 +56,7 @@ on this branch : https://code.launchpad.net/~akretion-team/openobject-addons/ope
'res_company_view.xml',
'crm_claim_rma_data.xml',
'stock_data.xml',
- # 'report/crm_claim_report_view.xml',
],
- 'demo_xml': [
- # 'crm_claim_demo.xml',
- ],
-# 'test': ['test/test_crm_claim.yml'],
'images': ['images/product_return.png', 'images/claim.png','images/return_line.png','images/exchange.png'],
'installable': True,
'active': False,
diff --git a/crm_claim_rma/account_invoice.py b/crm_claim_rma/account_invoice.py
index d4df6c03..90dd3eda 100644
--- a/crm_claim_rma/account_invoice.py
+++ b/crm_claim_rma/account_invoice.py
@@ -1,25 +1,24 @@
# -*- coding: utf-8 -*-
-#########################################################################
-# #
-# #
-#########################################################################
-# #
-# Copyright (C) 2009-2011 Akretion, Raphaël Valyi, Sébastien Beau, #
-# Emmanuel Samyn, Benoît Guillot #
-# #
-#This program is free software: you can redistribute it and/or modify #
-#it under the terms of the GNU General Public License as published by #
-#the Free Software Foundation, either version 3 of the License, or #
-#(at your option) any later version. #
-# #
-#This program is distributed in the hope that it will be useful, #
-#but WITHOUT ANY WARRANTY; without even the implied warranty of #
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
-#GNU General Public License for more details. #
-# #
-#You should have received a copy of the GNU General Public License #
-#along with this program. If not, see . #
-#########################################################################
+##############################################################################
+#
+# Copyright 2013 Camptocamp
+# Copyright 2009-2013 Akretion,
+# Author: Emmanuel Samyn, Raphaël Valyi, Sébastien Beau, Joel Grand-Guillaume
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as
+# published by the Free Software Foundation, either version 3 of the
+# License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see .
+#
+##############################################################################
from osv import fields, osv
from tools.translate import _
diff --git a/crm_claim_rma/account_invoice_view.xml b/crm_claim_rma/account_invoice_view.xml
index e4d699aa..5609e25b 100644
--- a/crm_claim_rma/account_invoice_view.xml
+++ b/crm_claim_rma/account_invoice_view.xml
@@ -1,15 +1,9 @@
-
-
-
+ crm_claim_rma.invoice_formaccount.invoice
diff --git a/crm_claim_rma/crm_claim_rma.py b/crm_claim_rma/crm_claim_rma.py
index 1543214c..5fa63eed 100644
--- a/crm_claim_rma/crm_claim_rma.py
+++ b/crm_claim_rma/crm_claim_rma.py
@@ -1,25 +1,24 @@
# -*- coding: utf-8 -*-
-#########################################################################
-# #
-# #
-#########################################################################
-# #
-# Copyright (C) 2009-2011 Akretion, Raphaël Valyi, Sébastien Beau, #
-# Emmanuel Samyn #
-# #
-#This program is free software: you can redistribute it and/or modify #
-#it under the terms of the GNU General Public License as published by #
-#the Free Software Foundation, either version 3 of the License, or #
-#(at your option) any later version. #
-# #
-#This program is distributed in the hope that it will be useful, #
-#but WITHOUT ANY WARRANTY; without even the implied warranty of #
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
-#GNU General Public License for more details. #
-# #
-#You should have received a copy of the GNU General Public License #
-#along with this program. If not, see . #
-#########################################################################
+##############################################################################
+#
+# Copyright 2013 Camptocamp
+# Copyright 2009-2013 Akretion,
+# Author: Emmanuel Samyn, Raphaël Valyi, Sébastien Beau, Joel Grand-Guillaume
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as
+# published by the Free Software Foundation, either version 3 of the
+# License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see .
+#
+##############################################################################
from openerp.osv import fields, orm, osv
from crm import crm
@@ -185,7 +184,6 @@ class crm_claim(orm.Model):
('supplier','Supplier'),
('other','Other')], 'Claim type', required=True, help="customer = from customer to company ; supplier = from company to supplier"),
'claim_line_ids' : fields.one2many('claim.line', 'claim_id', 'Return lines'),
- 'product_exchange_ids': fields.one2many('product.exchange', 'claim_return_id', 'Product exchanges'),
# Aftersale outsourcing
# 'in_supplier_picking_id': fields.many2one('stock.picking', 'Return To Supplier Picking', required=False, select=True),
# 'out_supplier_picking_id': fields.many2one('stock.picking', 'Return From Supplier Picking', required=False, select=True),
diff --git a/crm_claim_rma/crm_claim_rma_view.xml b/crm_claim_rma/crm_claim_rma_view.xml
index e03c408e..85d53912 100644
--- a/crm_claim_rma/crm_claim_rma_view.xml
+++ b/crm_claim_rma/crm_claim_rma_view.xml
@@ -1,26 +1,4 @@
-
@@ -102,7 +80,7 @@
-
+
@@ -132,87 +110,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -242,7 +139,6 @@
crm.claim
-<<<<<<< TREE
@@ -295,62 +191,6 @@
-=======
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
->>>>>>> MERGE-SOURCE
@@ -435,23 +275,12 @@
name="Partner picking OUT"
res_model="stock.picking"
src_model="crm.claim"/>
-
-
-
-
+
{"search_default_user_id":uid, "stage_type":'claim'}
-
-
Claim lines
@@ -459,7 +288,6 @@
formtree,form
-
@@ -467,7 +295,6 @@
Claim line substatessubstate.substateform
-
. #
-#########################################################################
+##############################################################################
+#
+# Copyright 2013 Camptocamp
+# Copyright 2009-2013 Akretion,
+# Author: Emmanuel Samyn, Raphaël Valyi, Sébastien Beau, Joel Grand-Guillaume
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as
+# published by the Free Software Foundation, either version 3 of the
+# License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see .
+#
+##############################################################################
from osv import fields, osv
diff --git a/crm_claim_rma/res_company_view.xml b/crm_claim_rma/res_company_view.xml
index 2e076d44..492be670 100644
--- a/crm_claim_rma/res_company_view.xml
+++ b/crm_claim_rma/res_company_view.xml
@@ -1,15 +1,9 @@
-
-
-
+ crm_claim_rma.company_formres.company
diff --git a/crm_claim_rma/rma_data.xml b/crm_claim_rma/rma_data.xml
deleted file mode 100644
index a48e2e41..00000000
--- a/crm_claim_rma/rma_data.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-
-
-
-
-
- CRM claim
- crm.claim
-
-
-
- CRM claim
- crm.claim
- CL/%(year)s/
- 5
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/crm_claim_rma/stock.py b/crm_claim_rma/stock.py
index 2fd6989b..5ce21a51 100644
--- a/crm_claim_rma/stock.py
+++ b/crm_claim_rma/stock.py
@@ -1,36 +1,33 @@
# -*- coding: utf-8 -*-
-#########################################################################
-# #
-# #
-#########################################################################
-# #
-# Copyright (C) 2009-2011 Akretion, Raphaël Valyi, Sébastien Beau, #
-# Emmanuel Samyn, Benoît Guillot #
-# #
-#This program is free software: you can redistribute it and/or modify #
-#it under the terms of the GNU General Public License as published by #
-#the Free Software Foundation, either version 3 of the License, or #
-#(at your option) any later version. #
-# #
-#This program is distributed in the hope that it will be useful, #
-#but WITHOUT ANY WARRANTY; without even the implied warranty of #
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
-#GNU General Public License for more details. #
-# #
-#You should have received a copy of the GNU General Public License #
-#along with this program. If not, see . #
-#########################################################################
+##############################################################################
+#
+# Copyright 2013 Camptocamp
+# Copyright 2009-2013 Akretion,
+# Author: Emmanuel Samyn, Raphaël Valyi, Sébastien Beau, Joel Grand-Guillaume
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as
+# published by the Free Software Foundation, either version 3 of the
+# License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see .
+#
+##############################################################################
from osv import fields, osv
class stock_picking(osv.osv):
_inherit = "stock.picking"
-
_columns = {
'claim_id': fields.many2one('crm.claim', 'Claim'),
- 'claim_picking': fields.boolean('Picking from Claim'),
}
def create(self, cr, user, vals, context=None):
@@ -43,6 +40,24 @@ class stock_picking(osv.osv):
new_id = super(stock_picking, self).create(cr, user, vals, context)
return new_id
+class stock_picking_out(osv.osv):
+
+ _inherit = "stock.picking.out"
+
+ _columns = {
+ 'claim_id': fields.many2one('crm.claim', 'Claim'),
+ }
+
+
+class stock_picking_out(osv.osv):
+
+ _inherit = "stock.picking.in"
+
+ _columns = {
+ 'claim_id': fields.many2one('crm.claim', 'Claim'),
+ }
+
+
class stock_warehouse(osv.osv):
_inherit = "stock.warehouse"
@@ -66,6 +81,6 @@ class stock_move(osv.osv):
move_id = super(stock_move, self).create(cr, uid, vals, context=context)
if vals.get('picking_id'):
picking = self.pool.get('stock.picking').browse(cr, uid, vals['picking_id'], context=context)
- if picking.claim_picking and picking.type == u'in':
+ if picking.claim_id and picking.type == u'in':
move = self.write(cr, uid, move_id, {'state': 'confirmed'}, context=context)
return move_id
diff --git a/crm_claim_rma/stock_view.xml b/crm_claim_rma/stock_view.xml
index e0c3c7d6..65af7e22 100644
--- a/crm_claim_rma/stock_view.xml
+++ b/crm_claim_rma/stock_view.xml
@@ -1,91 +1,86 @@
-
-
-
+ crm_claim_rma.picking_in_form
- stock.picking
+ stock.picking.in
-
-
-
-
-
-
-
-
- 1
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
-
+ crm_claim_rma.picking_out_form
- stock.picking
+ stock.picking.out
-
-
-
-
-
-
-
- 1
-
-
+
+
+
-
+ crm_claim_rma.warehouse_formstock.warehouse
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+ crm_claim_rma.picking_in_search
- stock.picking
+ stock.picking.in
-
-
-
+
+
+
- s
+
+
+
+ crm_claim_rma.picking_out_search
+ stock.picking.out
+
+
+
+
+
+
+
+
+
diff --git a/crm_claim_rma/wizard/__init__.py b/crm_claim_rma/wizard/__init__.py
index b0c9c961..3e963c8f 100644
--- a/crm_claim_rma/wizard/__init__.py
+++ b/crm_claim_rma/wizard/__init__.py
@@ -1,34 +1,27 @@
# -*- coding: utf-8 -*-
-#########################################################################
-# #
-# #
-#########################################################################
-# #
-# Copyright (C) 2009-2011 Akretion, Raphaël Valyi, Sébastien Beau, #
-# Emmanuel Samyn #
-# #
-#This program is free software: you can redistribute it and/or modify #
-#it under the terms of the GNU General Public License as published by #
-#the Free Software Foundation, either version 3 of the License, or #
-#(at your option) any later version. #
-# #
-#This program is distributed in the hope that it will be useful, #
-#but WITHOUT ANY WARRANTY; without even the implied warranty of #
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
-#GNU General Public License for more details. #
-# #
-#You should have received a copy of the GNU General Public License #
-#along with this program. If not, see . #
-#########################################################################
+##############################################################################
+#
+# Copyright 2013 Camptocamp
+# Copyright 2009-2013 Akretion,
+# Author: Emmanuel Samyn, Raphaël Valyi, Sébastien Beau, Joel Grand-Guillaume
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as
+# published by the Free Software Foundation, either version 3 of the
+# License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see .
+#
+##############################################################################
import returned_lines_from_serial
-#import returned_lines_from_invoice
-#import picking_from_returned_lines
-#import refund_from_returned_lines
-#import exchange_from_returned_lines
-#import picking_from_exchange_lines
import get_empty_serial
-
import claim_make_picking
import account_invoice_refund
import claim_make_picking_from_picking
diff --git a/crm_claim_rma/wizard/claim_make_picking.py b/crm_claim_rma/wizard/claim_make_picking.py
index fdc97802..10594db0 100644
--- a/crm_claim_rma/wizard/claim_make_picking.py
+++ b/crm_claim_rma/wizard/claim_make_picking.py
@@ -94,14 +94,12 @@ class claim_make_picking(osv.osv_memory):
picking_obj = self.pool.get('stock.picking')
if context is None: context = {}
view_obj = self.pool.get('ir.ui.view')
- claim_picking = False
if context.get('picking_type') in ['in', 'loss']:
p_type = 'in'
view_xml_id = 'stock_picking_form'
view_name = 'stock.picking.form'
write_field = 'move_in_id'
if context.get('picking_type') == 'in':
- claim_picking = True
note = 'RMA picking in'
name = 'Customer picking in'
elif context.get('picking_type') == 'loss':
@@ -137,7 +135,6 @@ class claim_make_picking(osv.osv_memory):
'location_dest_id': wizard.claim_line_dest_location.id,
'note' : note,
'claim_id': claim.id,
- 'claim_picking': claim_picking
})
# Create picking lines
for wizard_claim_line in wizard.claim_line_ids: