mirror of
https://github.com/OCA/rma.git
synced 2025-02-16 17:11:47 +02:00
[IMP] Clean of the module, mainly:
- Move unsused wizard in crm_claim_ext - Move unused view in crm_claim_ext - Move optionnal behavior (like hide the return button) to crm_claim_ext - Fix and improve all views and filter - Remove the field claim_picking as we can test claim_id for the same purpose - Change the author by adding Camptocamp - Adaptation of the description
This commit is contained in:
@@ -19,5 +19,5 @@
|
||||
#You should have received a copy of the GNU General Public License #
|
||||
#along with this program. If not, see <http://www.gnu.org/licenses/>. #
|
||||
#########################################################################
|
||||
|
||||
import wizard
|
||||
import crm_claim_ext
|
||||
|
||||
@@ -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': [],
|
||||
|
||||
@@ -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()
|
||||
|
||||
|
||||
@@ -33,5 +33,122 @@
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="crm_claim_rma.picking_out_form" model="ir.ui.view">
|
||||
<field name="name">crm_claim_rma.picking_out_form</field>
|
||||
<field name="model">stock.picking.out</field>
|
||||
<field name="inherit_id" ref="stock.view_picking_out_form" />
|
||||
<field name="arch" type="xml">
|
||||
<!-- If we use crm_claim_rma we should not use the old return products anymore-->
|
||||
<xpath expr="/form/header/button[@string='Return Products']" position="attributes">
|
||||
<attribute name="invisible">1</attribute>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="picking_in_form" model="ir.ui.view">
|
||||
<field name="name">crm_claim_rma.picking_in_form</field>
|
||||
<field name="model">stock.picking.in</field>
|
||||
<field name="inherit_id" ref="stock.view_picking_in_form" />
|
||||
<field name="arch" type="xml">
|
||||
<!-- If we use crm_claim_rma we should not use the old return products anymore-->
|
||||
<xpath expr="/form/header/button[@string='Return Products']" position="attributes">
|
||||
<attribute name="invisible">1</attribute>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Picking follow -->
|
||||
<!-- TREE -->
|
||||
<!--
|
||||
<record model="ir.ui.view" id="crm_picking_follow_tree_view">
|
||||
<field name="name">CRM - Picking follow Tree</field>
|
||||
<field name="model">picking.follow</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Picking follows">
|
||||
<field name="picking_id"/>
|
||||
<field name="related_picking_state"/>
|
||||
<field name="related_picking_due_date"/>
|
||||
<field name="related_picking_delivered_date"/>
|
||||
<field name="name"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
-->
|
||||
<!-- FORM -->
|
||||
<!--
|
||||
<record model="ir.ui.view" id="crm_picking_follow_form_view">
|
||||
<field name="name">CRM - Picking follow Form</field>
|
||||
<field name="model">picking.follow</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Picking follow">
|
||||
<field name="picking_id"/>
|
||||
<field name="related_picking_state"/>
|
||||
<field name="related_picking_due_date"/>
|
||||
<field name="related_picking_delivered_date"/>
|
||||
<field name="name"/>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
-->
|
||||
|
||||
|
||||
|
||||
<!-- PRODUCT EXCHANGE -->
|
||||
<!-- TREE -->
|
||||
<!-- <record model="ir.ui.view" id="crm_product_exchange_tree_view">-->
|
||||
<!-- <field name="name">CRM - Product exchange Tree</field>-->
|
||||
<!-- <field name="model">product.exchange</field>-->
|
||||
<!-- <field name="type">tree</field>-->
|
||||
<!-- <field name="arch" type="xml">-->
|
||||
<!-- <tree string="Product exchanges" editable="top" >-->
|
||||
<!-- <field name="selected"/>-->
|
||||
<!-- <field name="state"/>-->
|
||||
<!-- <field name="exchange_send_date"/>-->
|
||||
<!-- <field name="returned_product"/> -->
|
||||
<!-- <field name="returned_product_serial"/>-->
|
||||
<!-- <field name="replacement_product"/>-->
|
||||
<!-- <field name="replacement_product_serial"/>-->
|
||||
<!-- <field name="returned_value"/>-->
|
||||
<!-- <field name="replacement_value"/>-->
|
||||
<!-- <field name="name"/> -->
|
||||
<!-- </tree>-->
|
||||
<!-- </field>-->
|
||||
<!-- </record>-->
|
||||
|
||||
<!-- FORM -->
|
||||
<!-- <record model="ir.ui.view" id="crm_product_exchange_form_view">-->
|
||||
<!-- <field name="name">CRM - Product exchange Form</field>-->
|
||||
<!-- <field name="model">product.exchange</field>-->
|
||||
<!-- <field name="arch" type="xml">-->
|
||||
<!-- <form string="Product exchange">-->
|
||||
<!-- <field name="state"/>-->
|
||||
<!-- <field name="exchange_send_date"/>-->
|
||||
<!-- <separator string="Returned product" colspan="2"/>-->
|
||||
<!-- <separator string="Replacement product" colspan="2"/>-->
|
||||
<!-- <field name="returned_product"/> -->
|
||||
<!-- <field name="replacement_product"/>-->
|
||||
<!-- <field name="returned_product_serial"/>-->
|
||||
<!-- <field name="replacement_product_serial"/> -->
|
||||
<!-- <field name="returned_product_qty"/> -->
|
||||
<!-- <field name="replacement_product_qty"/>-->
|
||||
<!-- <field name="returned_unit_sale_price"/>-->
|
||||
<!-- <field name="replacement_unit_sale_price"/>-->
|
||||
<!-- <field name="returned_value"/>-->
|
||||
<!-- <field name="replacement_value"/>-->
|
||||
<!-- <separator string="Comment" colspan="2"/>-->
|
||||
<!-- <field name="name" colspan="4" nolabel="1"/> -->
|
||||
<!-- </form>-->
|
||||
<!-- </field>-->
|
||||
<!-- </record>-->
|
||||
<!-- -->
|
||||
|
||||
<!-- act_window
|
||||
|
||||
context="{'search_default_account_id':[active_id], 'search_default_unreconciled':1, 'default_account_id': active_id}"
|
||||
src_model="account.account"/>
|
||||
|
||||
<act_window domain="[('reconcile_id', '=', active_id)]" id="act_account_acount_move_line_reconcile_open"
|
||||
name="Reconciled entries" res_model="account.move.line" src_model="account.move.reconcile"/ -->
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
26
crm_claim_ext/wizard/__init__.py
Normal file
26
crm_claim_ext/wizard/__init__.py
Normal file
@@ -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 <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
#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
|
||||
@@ -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 <http://www.gnu.org/licenses/>. #
|
||||
#########################################################################
|
||||
##############################################################################
|
||||
#
|
||||
# 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 <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
import wizard
|
||||
import crm_claim_rma
|
||||
|
||||
@@ -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 <http://www.gnu.org/licenses/>. #
|
||||
#########################################################################
|
||||
|
||||
|
||||
##############################################################################
|
||||
#
|
||||
# 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 <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
{
|
||||
'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)
|
||||
|
||||
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
|
||||
* access to related customer data (orders, invoices, refunds, picking in/out) from a claim
|
||||
|
||||
""",
|
||||
'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,
|
||||
|
||||
@@ -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 <http://www.gnu.org/licenses/>. #
|
||||
#########################################################################
|
||||
##############################################################################
|
||||
#
|
||||
# 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 <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
from osv import fields, osv
|
||||
from tools.translate import _
|
||||
|
||||
@@ -1,15 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
crm_claim_rma for OpenERP
|
||||
Copyright (C) 2011 Akretion Benoît Guillot <benoit.guillot@akretion.com>
|
||||
The licence is in the file __openerp__.py
|
||||
-->
|
||||
|
||||
<openerp>
|
||||
<data>
|
||||
<!-- INHERITED VIEW FOR THE OBJECT : account_invoice -->
|
||||
|
||||
<record id="crm_claim_rma.invoice_form" model="ir.ui.view">
|
||||
<record id="invoice_form" model="ir.ui.view">
|
||||
<field name="name">crm_claim_rma.invoice_form</field>
|
||||
<field name="model">account.invoice</field>
|
||||
<field name="inherit_id" ref="account.invoice_form" />
|
||||
|
||||
@@ -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 <http://www.gnu.org/licenses/>. #
|
||||
#########################################################################
|
||||
##############################################################################
|
||||
#
|
||||
# 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 <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
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),
|
||||
|
||||
@@ -1,26 +1,4 @@
|
||||
<?xml version="1.0"?>
|
||||
<!--
|
||||
#########################################################################
|
||||
# #
|
||||
# #
|
||||
#########################################################################
|
||||
# #
|
||||
# Copyright (C) 2009-2011 Akretion, 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 <http://www.gnu.org/licenses/>. #
|
||||
#########################################################################
|
||||
-->
|
||||
<openerp>
|
||||
<data>
|
||||
<!-- Return line -->
|
||||
@@ -102,7 +80,7 @@
|
||||
<field name="name"/>
|
||||
<separator string="Returned good" colspan="4"/>
|
||||
<group col="6" colspan="4">
|
||||
<field name="invoice_line_id"/> <!-- domain="[('type', '=', 'out_invoice')]" -->
|
||||
<field name="invoice_line_id"/>
|
||||
<field name="product_id"/>
|
||||
<field name="prodlot_id"/>
|
||||
<field name="product_returned_quantity"/>
|
||||
@@ -132,87 +110,6 @@
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Picking follow -->
|
||||
<!-- TREE -->
|
||||
<!--
|
||||
<record model="ir.ui.view" id="crm_picking_follow_tree_view">
|
||||
<field name="name">CRM - Picking follow Tree</field>
|
||||
<field name="model">picking.follow</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Picking follows">
|
||||
<field name="picking_id"/>
|
||||
<field name="related_picking_state"/>
|
||||
<field name="related_picking_due_date"/>
|
||||
<field name="related_picking_delivered_date"/>
|
||||
<field name="name"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
-->
|
||||
<!-- FORM -->
|
||||
<!--
|
||||
<record model="ir.ui.view" id="crm_picking_follow_form_view">
|
||||
<field name="name">CRM - Picking follow Form</field>
|
||||
<field name="model">picking.follow</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Picking follow">
|
||||
<field name="picking_id"/>
|
||||
<field name="related_picking_state"/>
|
||||
<field name="related_picking_due_date"/>
|
||||
<field name="related_picking_delivered_date"/>
|
||||
<field name="name"/>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
-->
|
||||
<!-- PRODUCT EXCHANGE -->
|
||||
<!-- TREE -->
|
||||
<!-- <record model="ir.ui.view" id="crm_product_exchange_tree_view">-->
|
||||
<!-- <field name="name">CRM - Product exchange Tree</field>-->
|
||||
<!-- <field name="model">product.exchange</field>-->
|
||||
<!-- <field name="type">tree</field>-->
|
||||
<!-- <field name="arch" type="xml">-->
|
||||
<!-- <tree string="Product exchanges" editable="top" >-->
|
||||
<!-- <field name="selected"/>-->
|
||||
<!-- <field name="state"/>-->
|
||||
<!-- <field name="exchange_send_date"/>-->
|
||||
<!-- <field name="returned_product"/> -->
|
||||
<!-- <field name="returned_product_serial"/>-->
|
||||
<!-- <field name="replacement_product"/>-->
|
||||
<!-- <field name="replacement_product_serial"/>-->
|
||||
<!-- <field name="returned_value"/>-->
|
||||
<!-- <field name="replacement_value"/>-->
|
||||
<!-- <field name="name"/> -->
|
||||
<!-- </tree>-->
|
||||
<!-- </field>-->
|
||||
<!-- </record>-->
|
||||
|
||||
<!-- FORM -->
|
||||
<!-- <record model="ir.ui.view" id="crm_product_exchange_form_view">-->
|
||||
<!-- <field name="name">CRM - Product exchange Form</field>-->
|
||||
<!-- <field name="model">product.exchange</field>-->
|
||||
<!-- <field name="arch" type="xml">-->
|
||||
<!-- <form string="Product exchange">-->
|
||||
<!-- <field name="state"/>-->
|
||||
<!-- <field name="exchange_send_date"/>-->
|
||||
<!-- <separator string="Returned product" colspan="2"/>-->
|
||||
<!-- <separator string="Replacement product" colspan="2"/>-->
|
||||
<!-- <field name="returned_product"/> -->
|
||||
<!-- <field name="replacement_product"/>-->
|
||||
<!-- <field name="returned_product_serial"/>-->
|
||||
<!-- <field name="replacement_product_serial"/> -->
|
||||
<!-- <field name="returned_product_qty"/> -->
|
||||
<!-- <field name="replacement_product_qty"/>-->
|
||||
<!-- <field name="returned_unit_sale_price"/>-->
|
||||
<!-- <field name="replacement_unit_sale_price"/>-->
|
||||
<!-- <field name="returned_value"/>-->
|
||||
<!-- <field name="replacement_value"/>-->
|
||||
<!-- <separator string="Comment" colspan="2"/>-->
|
||||
<!-- <field name="name" colspan="4" nolabel="1"/> -->
|
||||
<!-- </form>-->
|
||||
<!-- </field>-->
|
||||
<!-- </record>-->
|
||||
<!-- -->
|
||||
<!-- CLAIM VIEWS -->
|
||||
|
||||
<record model="ir.ui.view" id="crm_case_claims_tree_view">
|
||||
@@ -242,7 +139,6 @@
|
||||
<field name="model">crm.claim</field>
|
||||
<field name="inherit_id" ref="crm_claim.crm_case_claims_form_view"/>
|
||||
<field name="arch" type="xml">
|
||||
<<<<<<< TREE
|
||||
<page string="Follow Up" position="before">
|
||||
<page string="Product Return">
|
||||
<group name="Product Return">
|
||||
@@ -295,62 +191,6 @@
|
||||
<field name="picking_ids" colspan="4" readonly="1"/>
|
||||
</page>
|
||||
</page>
|
||||
=======
|
||||
<field name="type_action" position="after">
|
||||
<separator string="Invoice and Picking" colspan="4"/>
|
||||
<b><label string="Invoice" /></b>
|
||||
<field name="invoice_ids" colspan="4" nolabel="1" readonly="1"/>
|
||||
<b><label string="Picking" /></b>
|
||||
<field name="picking_ids" colspan="4" nolabel="1" readonly="1"/>
|
||||
</field>
|
||||
<!--
|
||||
<xpath expr="/form/group/notebook/page[@string='Communication & History']/field" position="after">
|
||||
<field name="invoice_ids" colspan="4" nolabel="1" readonly="1"/>
|
||||
<field name="picking_ids" colspan="4" nolabel="1" readonly="1"/>
|
||||
</xpath>
|
||||
-->
|
||||
<field name="description" position="after">
|
||||
<group name="Product Return" colspan="4">
|
||||
<separator string="Product Return" colspan="4"/>
|
||||
<field name="invoice_id" colspan="1" on_change="onchange_invoice_id(invoice_id, context)" domain="[('partner_id','=',partner_id)]" />
|
||||
<button name="%(action_create_return_serial)d" string="Mass return from serial/lot n°" states="draft,open" type="action" target="new"/>
|
||||
<field name="claim_line_ids" nolabel="1" colspan="3"/>
|
||||
</group>
|
||||
<group col="4" colspan="4" attrs="{'invisible':[('state', '<>','open')]}">
|
||||
<separator string="Action" colspan="4" />
|
||||
<button name="%(action_claim_picking_in)d"
|
||||
string="New picking IN" states="open"
|
||||
type="action" target="new"
|
||||
context="{'warehouse_id': warehouse_id,
|
||||
'partner_id': partner_id}"/>
|
||||
|
||||
|
||||
<button name="%(action_claim_picking_out)d"
|
||||
string="New picking OUT" states="open"
|
||||
type="action" target="new"
|
||||
context="{'warehouse_id': warehouse_id,
|
||||
'partner_id': partner_id}"/>
|
||||
|
||||
<button name="%(action_claim_picking_loss)d"
|
||||
string="New Product Loss" states="open"
|
||||
type="action" target="new"
|
||||
context="{'warehouse_id': warehouse_id,
|
||||
'partner_id': partner_id}"/>
|
||||
|
||||
|
||||
<button name="%(account.action_account_invoice_refund)d"
|
||||
type='action' string='New Refund'
|
||||
states='open' icon="gtk-execute"
|
||||
context="{
|
||||
'invoice_ids': [invoice_id],
|
||||
'claim_line_ids': claim_line_ids,
|
||||
'description': name,
|
||||
'claim_id': id,
|
||||
'type': 'out_refund'
|
||||
}"/>
|
||||
</group>
|
||||
</field>
|
||||
>>>>>>> MERGE-SOURCE
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -436,22 +276,11 @@
|
||||
res_model="stock.picking"
|
||||
src_model="crm.claim"/>
|
||||
|
||||
|
||||
<!-- act_window
|
||||
|
||||
context="{'search_default_account_id':[active_id], 'search_default_unreconciled':1, 'default_account_id': active_id}"
|
||||
src_model="account.account"/>
|
||||
|
||||
<act_window domain="[('reconcile_id', '=', active_id)]" id="act_account_acount_move_line_reconcile_open"
|
||||
name="Reconciled entries" res_model="account.move.line" src_model="account.move.reconcile"/ -->
|
||||
|
||||
<!-- Menu -->
|
||||
<record model="ir.actions.act_window" id="crm_claim.crm_case_categ_claim0">
|
||||
<field name="context">{"search_default_user_id":uid, "stage_type":'claim'}</field>
|
||||
</record>
|
||||
|
||||
|
||||
|
||||
<!-- return lines action -->
|
||||
<record model="ir.actions.act_window" id="act_crm_case_claim_lines">
|
||||
<field name="name">Claim lines</field>
|
||||
@@ -459,7 +288,6 @@
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="view_id" ref="crm_claim_line_tree_view"/>
|
||||
<!-- field name="context">{'search_default_section_id': section_id, "search_default_current":1,"search_default_user_id":uid, "stage_type":'claim'}</field -->
|
||||
<field name="search_view_id" ref="view_crm_claim_lines_filter"/>
|
||||
</record>
|
||||
<!-- substates action -->
|
||||
@@ -467,7 +295,6 @@
|
||||
<field name="name">Claim line substates</field>
|
||||
<field name="res_model">substate.substate</field>
|
||||
<field name="view_type">form</field>
|
||||
<!-- field name="view_id" ref="crm.crm_case_categ_tree-view"/ -->
|
||||
</record>
|
||||
<!-- Menu -->
|
||||
<menuitem name="Return lines" id="menu_crm_case_claims_claim_lines"
|
||||
|
||||
@@ -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 <http://www.gnu.org/licenses/>. #
|
||||
#########################################################################
|
||||
##############################################################################
|
||||
#
|
||||
# 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 <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
from osv import fields, osv
|
||||
|
||||
|
||||
@@ -1,15 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
crm_claim_rma for OpenERP
|
||||
Copyright (C) 2011 Akretion Benoît Guillot <benoit.guillot@akretion.com>
|
||||
The licence is in the file __openerp__.py
|
||||
-->
|
||||
|
||||
<openerp>
|
||||
<data>
|
||||
<!-- INHERITED VIEW FOR THE OBJECT : res_company -->
|
||||
|
||||
<record id="crm_claim_rma.company_form" model="ir.ui.view">
|
||||
<record id="company_form" model="ir.ui.view">
|
||||
<field name="name">crm_claim_rma.company_form</field>
|
||||
<field name="model">res.company</field>
|
||||
<field name="inherit_id" ref="base.view_company_form" />
|
||||
|
||||
@@ -1,65 +0,0 @@
|
||||
<?xml version="1.0" ?>
|
||||
<openerp>
|
||||
<data>
|
||||
<!-- Sequences for crm.claim -->
|
||||
<record id="seq_type_crm_claim" model="ir.sequence.type">
|
||||
<field name="name">CRM claim</field>
|
||||
<field name="code">crm.claim</field>
|
||||
</record>
|
||||
|
||||
<record id="seq_crm_claim" model="ir.sequence">
|
||||
<field name="name">CRM claim</field>
|
||||
<field name="code">crm.claim</field>
|
||||
<field name="prefix">CL/%(year)s/</field>
|
||||
<field name="padding">5</field>
|
||||
</record>
|
||||
|
||||
<!-- STANDARD SUBSTATE FOR CLAIM RMA -->
|
||||
<!-- TO TREATE -->
|
||||
<record id="rma_to_treate_refund" model="substate.substate">
|
||||
<field name="name" eval=""""To refund""""/>
|
||||
<field name="substate_descr" eval=""""Returned product has to be refunded"""" />
|
||||
</record>
|
||||
<record id="rma_to_treate_exchange" model="substate.substate">
|
||||
<field name="name" eval=""""To exchange""""/>
|
||||
<field name="substate_descr" eval=""""Returned product has to be exchanged"""" />
|
||||
</record>
|
||||
<record id="rma_to_treate_repair" model="substate.substate">
|
||||
<field name="name" eval=""""To repair""""/>
|
||||
<field name="substate_descr" eval=""""Returned product has to be repaired"""" />
|
||||
</record>
|
||||
<record id="rma_to_treate_send_supplier" model="substate.substate">
|
||||
<field name="name" eval=""""To send back to supplier""""/>
|
||||
<field name="substate_descr" eval=""""Returned product has to be sent back to supplier"""" />
|
||||
</record>
|
||||
<record id="rma_to_treate_back_from_supplier" model="substate.substate">
|
||||
<field name="name" eval=""""Back from supplier, to send to customer""""/>
|
||||
<field name="substate_descr" eval=""""Returned product has to be sent back from supplier and is to be sent back to customer"""" />
|
||||
</record>
|
||||
<!-- TREATED -->
|
||||
<record id="rma_treated_refund" model="substate.substate">
|
||||
<field name="name" eval=""""Refunded and stock""""/>
|
||||
<field name="substate_descr" eval=""""Returned product refunded and sent back to stock"""" />
|
||||
</record>
|
||||
<record id="rma_treated_refund_waste" model="substate.substate">
|
||||
<field name="name" eval=""""Refunded and waste""""/>
|
||||
<field name="substate_descr" eval=""""Returned product refunded and sent to waste"""" />
|
||||
</record>
|
||||
<record id="rma_treated_exchange" model="substate.substate">
|
||||
<field name="name" eval=""""Exchanged""""/>
|
||||
<field name="substate_descr" eval=""""Returned product exchanged"""" />
|
||||
</record>
|
||||
<record id="rma_treated_repair" model="substate.substate">
|
||||
<field name="name" eval=""""Repaired""""/>
|
||||
<field name="substate_descr" eval=""""Returned product repaired"""" />
|
||||
</record>
|
||||
<record id="rma_treated_sent_to_supplier" model="substate.substate">
|
||||
<field name="name" eval=""""Sent to supplier, pending""""/>
|
||||
<field name="substate_descr" eval=""""Returned product sent to supplier. Waiting for supplier response"""" />
|
||||
</record>
|
||||
<record id="rma_treated_repaired_by_supplier" model="substate.substate">
|
||||
<field name="name" eval=""""Repaired by supplier and sent back to customer""""/>
|
||||
<field name="substate_descr" eval=""""Returned product repaired by supplier and sent back to customer"""" />
|
||||
</record>
|
||||
</data>
|
||||
</openerp>
|
||||
@@ -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 <http://www.gnu.org/licenses/>. #
|
||||
#########################################################################
|
||||
##############################################################################
|
||||
#
|
||||
# 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 <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
from osv import fields, osv
|
||||
|
||||
@@ -27,10 +26,8 @@ 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
|
||||
|
||||
@@ -1,91 +1,86 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
crm_claim_rma for OpenERP
|
||||
Copyright (C) 2011 Akretion Benoît Guillot <benoit.guillot@akretion.com>
|
||||
The licence is in the file __openerp__.py
|
||||
-->
|
||||
|
||||
<openerp>
|
||||
<data>
|
||||
<!-- INHERITED VIEW FOR THE OBJECT : stock_picking -->
|
||||
|
||||
<record id="crm_claim_rma.picking_in_form" model="ir.ui.view">
|
||||
<record id="picking_in_form" model="ir.ui.view">
|
||||
<field name="name">crm_claim_rma.picking_in_form</field>
|
||||
<field name="model">stock.picking</field>
|
||||
<field name="model">stock.picking.in</field>
|
||||
<field name="inherit_id" ref="stock.view_picking_in_form" />
|
||||
<field eval="16" name="priority"/>
|
||||
<field name="arch" type="xml">
|
||||
<data>
|
||||
<xpath expr="/form/notebook/page[@string='Additional Info']/field[@name='type']" position="after">
|
||||
<xpath expr="//field[@name='move_type']" position="after">
|
||||
<field name="claim_id" />
|
||||
<field name="claim_picking" invisible="1"/>
|
||||
</xpath>
|
||||
<!-- If we use crm_claim_rma we should not use the old return products anymore-->
|
||||
<xpath expr="/form/notebook/page[@string='General Information']/group/button[@string='Return Products']" position="attributes">
|
||||
<attribute name="invisible">1</attribute>
|
||||
</xpath>
|
||||
<xpath expr="/form/notebook/page[@string='General Information']/group/button[@string='Return Products']" position="after">
|
||||
<group name="claim_picking_button" attrs="{'invisible':['|',
|
||||
('state','<>','done'),
|
||||
('claim_picking', '=', False)]}">
|
||||
<!-- Those wizard aren't working yet -->
|
||||
<xpath expr="/form/header/button[@string='Return Products']" position="after">
|
||||
<button name="%(action_stock_picking_from_claim_picking)d"
|
||||
string="Product to stock" type="action"/>
|
||||
string="Product to stock" type="action"
|
||||
attrs="{'invisible':['|',
|
||||
('state','<>','done'),
|
||||
('claim_id', '=', False)]}"/>
|
||||
<button name="%(action_loss_picking_from_claim_picking)d"
|
||||
string="Product to Loss" type="action"/>
|
||||
string="Product to Loss" type="action"
|
||||
attrs="{'invisible':['|',
|
||||
('state','<>','done'),
|
||||
('claim_id', '=', False)]}"/>
|
||||
<button name="%(action_used_picking_from_claim_picking)d"
|
||||
string="Product to refurbish stock" type="action"/>
|
||||
</group>
|
||||
string="Product to refurbish stock" type="action"
|
||||
attrs="{'invisible':['|',
|
||||
('state','<>','done'),
|
||||
('claim_id', '=', False)]}"/>
|
||||
</xpath>
|
||||
</data>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="crm_claim_rma.picking_out_form" model="ir.ui.view">
|
||||
<record id="picking_out_form" model="ir.ui.view">
|
||||
<field name="name">crm_claim_rma.picking_out_form</field>
|
||||
<field name="model">stock.picking</field>
|
||||
<field name="model">stock.picking.out</field>
|
||||
<field name="inherit_id" ref="stock.view_picking_out_form" />
|
||||
<field eval="16" name="priority"/>
|
||||
<field name="arch" type="xml">
|
||||
<data>
|
||||
<xpath expr="/form/notebook/page[@string='Additional info']/field[@name='type']" position="after">
|
||||
<xpath expr="/form/sheet/notebook/page/group/group/field[@name='move_type']" position="after">
|
||||
<field name="claim_id" />
|
||||
</xpath>
|
||||
<!-- If we use crm_claim_rma we should not use the old return products anymore-->
|
||||
<xpath expr="/form/notebook/page[@string='Products']/group/button[@string='Return Products']" position="attributes">
|
||||
<attribute name="invisible">1</attribute>
|
||||
</xpath>
|
||||
</data>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="crm_claim_rma.warehouse_form" model="ir.ui.view">
|
||||
<record id="warehouse_form" model="ir.ui.view">
|
||||
<field name="name">crm_claim_rma.warehouse_form</field>
|
||||
<field name="model">stock.warehouse</field>
|
||||
<field name="inherit_id" ref="stock.view_warehouse" />
|
||||
<field eval="16" name="priority"/>
|
||||
<field name="arch" type="xml">
|
||||
<data>
|
||||
<xpath expr="/form/group/group/field[@name='lot_output_id']" position="after">
|
||||
<field name="lot_rma_id"/>
|
||||
<field name="lot_carrier_loss_id"/>
|
||||
<field name="lot_breakage_loss_id"/>
|
||||
<field name="lot_refurbish_id"/>
|
||||
</xpath>
|
||||
</data>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_picking_in_search" model="ir.ui.view">
|
||||
<field name="name">crm_claim_rma.picking_in_search</field>
|
||||
<field name="model">stock.picking</field>
|
||||
<field name="model">stock.picking.in</field>
|
||||
<field name="inherit_id" ref="stock.view_picking_in_search" />
|
||||
<field name="arch" type="xml">
|
||||
<filter string="To Invoice" position="after">
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="RMA" name="to_do" icon="terp-accessories-archiver-minus" domain="[('claim_picking', '=', 'False'), ('claim_id', '!=', 'False')]" />
|
||||
<filter string="To Invoice" name="to_invoice" icon="terp-dolar" domain="[('invoice_state', '=', '2binvoiced')]" position="after">
|
||||
<separator/>
|
||||
<filter string="RMA" icon="terp-accessories-archiver-minus" domain="[('claim_id', '!=', 'False')]" />
|
||||
</filter>
|
||||
</field>
|
||||
</record>s
|
||||
</record>
|
||||
|
||||
<record id="view_picking_out_search" model="ir.ui.view">
|
||||
<field name="name">crm_claim_rma.picking_out_search</field>
|
||||
<field name="model">stock.picking.out</field>
|
||||
<field name="inherit_id" ref="stock.view_picking_out_search" />
|
||||
<field name="arch" type="xml">
|
||||
<filter icon="terp-dolar" name="to_invoice" string="To Invoice" domain="[('invoice_state','=','2binvoiced')]" help="Delivery orders to invoice" position="after">
|
||||
<separator/>
|
||||
<filter string="RMA" icon="terp-accessories-archiver-minus" domain="[('claim_id', '!=', 'False')]" />
|
||||
</filter>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
@@ -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 <http://www.gnu.org/licenses/>. #
|
||||
#########################################################################
|
||||
##############################################################################
|
||||
#
|
||||
# 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 <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
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
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user