[DEL] remove module crm_rma_advance_location

This commit is contained in:
Osval Reyes
2015-12-01 11:55:43 -04:30
parent bdc11ae77a
commit d19c2f8c54
12 changed files with 0 additions and 682 deletions

View File

@@ -1,23 +0,0 @@
# -*- 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/>.
#
##############################################################################
from . import stock
from . import wizard

View File

@@ -1,65 +0,0 @@
# -*- 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/>.
#
##############################################################################
{'name': 'RMA Claims Advance Location',
'version': '1.0',
'category': 'Generic Modules/CRM & SRM',
'depends': ['crm_claim_rma',
'crm_rma_stock_location',
],
'author': "Akretion,Odoo Community Association (OCA)",
'license': 'AGPL-3',
'website': 'http://www.akretion.com',
'description': """
RMA Claim Advance Location
==========================
This module adds the following location on warehouses :
* Carrier Loss
* RMA
* Breakage Loss
* Refurbish
* Mistake Loss
And also various wizards on icoming deliveries that allow you to move your goods easily in those
new locations from a done reception.
Using this module make the logistic flow of return a bit more complexe:
* Returning product goes into RMA location with a incoming shipment
* From the incoming shipment, forward them to another places (stock, loss,...)
WARNING: Use with caution, this module is currently not yet completely debugged and is waiting his author to be.
""",
'images': [],
'demo': [],
'data': ['wizard/claim_make_picking_from_picking_view.xml',
'wizard/claim_make_picking_view.xml',
'stock_view.xml',
'stock_data.xml',
'claim_rma_view.xml',
],
'installable': False,
'application': True,
}

View File

@@ -1,20 +0,0 @@
<?xml version="1.0"?>
<openerp>
<data>
<record model="ir.ui.view" id="crm_claim_rma_form_view">
<field name="name">CRM - Claim product return Form</field>
<field name="model">crm.claim</field>
<field name="inherit_id" ref="crm_claim_rma.crm_claim_rma_form_view"/>
<field name="arch" type="xml">
<xpath expr="//button[@string='New Delivery']" position="after">
<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}"/>
</xpath>
</field>
</record>
</data>
</openerp>

View File

@@ -1,122 +0,0 @@
# Translation of OpenERP Server.
# This file contains the translation of the following modules:
# * crm_rma_advance_location
#
msgid ""
msgstr ""
"Project-Id-Version: OpenERP Server 7.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2013-11-15 13:27+0000\n"
"PO-Revision-Date: 2013-11-15 13:27+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
#. module: crm_rma_advance_location
#: model:ir.actions.act_window,name:crm_rma_advance_location.action_claim_picking_loss
msgid "Create Products Loss"
msgstr ""
#. module: crm_rma_advance_location
#: model:ir.actions.act_window,name:crm_rma_advance_location.action_used_picking_from_claim_picking
msgid "Create Incomming Shipment to Refurbish Location"
msgstr ""
#. module: crm_rma_advance_location
#: view:claim_make_picking_from_picking.wizard:0
msgid "Locations"
msgstr ""
#. module: crm_rma_advance_location
#: view:claim_make_picking_from_picking.wizard:0
msgid "Select lines for picking"
msgstr ""
#. module: crm_rma_advance_location
#: model:stock.location,name:crm_rma_advance_location.stock_location_breakage_loss
msgid "Breakage Loss"
msgstr ""
#. module: crm_rma_advance_location
#: model:ir.model,name:crm_rma_advance_location.model_claim_make_picking_wizard
msgid "Wizard to create pickings from claim lines"
msgstr ""
#. module: crm_rma_advance_location
#: model:stock.location,name:crm_rma_advance_location.stock_location_carrier_loss
msgid "Carrier Loss"
msgstr ""
#. module: crm_rma_advance_location
#: model:stock.location,name:crm_rma_advance_location.stock_location_mistake_loss
msgid "Mistake Loss"
msgstr ""
#. module: crm_rma_advance_location
#: model:ir.actions.act_window,name:crm_rma_advance_location.action_loss_picking_from_claim_picking
msgid "Create Incomming Shipment to Breakkage Loss Location"
msgstr ""
#. module: crm_rma_advance_location
#: view:stock.picking.in:0
msgid "Product to refurbish stock"
msgstr ""
#. module: crm_rma_advance_location
#: model:ir.model,name:crm_rma_advance_location.model_stock_warehouse
msgid "Warehouse"
msgstr ""
#. module: crm_rma_advance_location
#: model:stock.location,name:crm_rma_advance_location.stock_location_rma
msgid "RMA"
msgstr ""
#. module: crm_rma_advance_location
#: model:stock.location,name:crm_rma_advance_location.stock_location_refurbish
msgid "Refurbish"
msgstr ""
#. module: crm_rma_advance_location
#: view:stock.picking.in:0
msgid "Product to stock"
msgstr ""
#. module: crm_rma_advance_location
#: model:ir.actions.act_window,name:crm_rma_advance_location.action_stock_picking_from_claim_picking
msgid "Create Incomming Shipment to Stock"
msgstr ""
#. module: crm_rma_advance_location
#: view:claim_make_picking_from_picking.wizard:0
msgid "Create picking"
msgstr ""
#. module: crm_rma_advance_location
#: view:claim_make_picking_from_picking.wizard:0
msgid "Cancel"
msgstr ""
#. module: crm_rma_advance_location
#: view:crm.claim:0
msgid "New Product Loss"
msgstr ""
#. module: crm_rma_advance_location
#: model:ir.model,name:crm_rma_advance_location.model_claim_make_picking_from_picking_wizard
msgid "Wizard to create pickings from picking lines"
msgstr ""
#. module: crm_rma_advance_location
#: view:stock.picking.in:0
msgid "Product to Loss"
msgstr ""
#. module: crm_rma_advance_location
#: view:claim_make_picking_from_picking.wizard:0
msgid "Select lines to add in picking"
msgstr ""

View File

@@ -1,39 +0,0 @@
# -*- 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/>.
#
##############################################################################
from openerp.osv import fields, orm
class stock_warehouse(orm.Model):
_inherit = "stock.warehouse"
_columns = {
'lot_carrier_loss_id': fields.many2one(
'stock.location',
'Location Carrier Loss'),
'lot_breakage_loss_id': fields.many2one(
'stock.location',
'Location Breakage Loss'),
'lot_refurbish_id': fields.many2one(
'stock.location',
'Location Refurbish'),
}

View File

@@ -1,36 +0,0 @@
<?xml version="1.0"?>
<openerp>
<data noupdate="1">
<!--
Default Values for : Stock Location
-->
<record id="stock_location_carrier_loss" model="stock.location">
<field name="name">Carrier Loss</field>
<field name="usage">internal</field>
<field name="location_id" ref="stock.stock_location_company"/>
</record>
<record id="stock_location_breakage_loss" model="stock.location">
<field name="name">Breakage Loss</field>
<field name="usage">internal</field>
<field name="location_id" ref="stock.stock_location_company"/>
</record>
<record id="stock_location_refurbish" model="stock.location">
<field name="name">Refurbish</field>
<field name="usage">internal</field>
<field name="location_id" ref="stock.stock_location_company"/>
</record>
<record id="stock_location_mistake_loss" model="stock.location">
<field name="name">Mistake Loss</field>
<field name="usage">internal</field>
<field name="location_id" ref="stock.stock_location_company"/>
</record>
<!--
Default Values for : Stock Warehouse
-->
<record id="stock.warehouse0" model="stock.warehouse">
<field name="lot_breakage_loss_id" ref="stock_location_breakage_loss"/>
<field name="lot_carrier_loss_id" ref="stock_location_carrier_loss"/>
<field name="lot_refurbish_id" ref="stock_location_refurbish"/>
</record>
</data>
</openerp>

View File

@@ -1,47 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<!-- INHERITED VIEW FOR THE OBJECT : stock_picking -->
<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">
<!-- 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"
attrs="{'invisible':['|',
('state','&lt;&gt;','done'),
('claim_id', '=', False)]}"/>
<button name="%(action_loss_picking_from_claim_picking)d"
string="Product to Loss" type="action"
attrs="{'invisible':['|',
('state','&lt;&gt;','done'),
('claim_id', '=', False)]}"/>
<button name="%(action_used_picking_from_claim_picking)d"
string="Product to refurbish stock" type="action"
attrs="{'invisible':['|',
('state','&lt;&gt;','done'),
('claim_id', '=', False)]}"/>
</xpath>
</field>
</record>
<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="crm_rma_stock_location.view_warehouse_form" />
<field name="arch" type="xml">
<xpath expr="/form/group/group/field[@name='lot_rma_id']" position="after">
<field name="lot_carrier_loss_id"/>
<field name="lot_breakage_loss_id"/>
<field name="lot_refurbish_id"/>
</xpath>
</field>
</record>
</data>
</openerp>

View File

@@ -1,23 +0,0 @@
# -*- 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/>.
#
##############################################################################
from . import claim_make_picking_from_picking
from . import claim_make_picking

View File

@@ -1,53 +0,0 @@
# -*- coding: utf-8 -*-
#########################################################################
# #
# #
#########################################################################
# #
# crm_claim_rma for OpenERP #
# Copyright (C) 2009-2012 Akretion, Emmanuel Samyn, #
# Benoît GUILLOT <benoit.guillot@akretion.com> #
#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/>. #
#########################################################################
from openerp.osv import orm
class claim_make_picking(orm.TransientModel):
_inherit = 'claim_make_picking.wizard'
def _get_dest_loc(self, cr, uid, context=None):
""" Get default destination location """
loc_id = super(claim_make_picking, self)._get_dest_loc(cr, uid, context=context)
if context is None:
context = {}
warehouse_obj = self.pool.get('stock.warehouse')
warehouse_id = context.get('warehouse_id')
if context.get('picking_type') == 'in':
loc_id = warehouse_obj.read(
cr, uid,
warehouse_id,
['lot_rma_id'],
context=context)['lot_rma_id'][0]
elif context.get('picking_type') == 'loss':
loc_id = warehouse_obj.read(
cr, uid,
warehouse_id,
['lot_carrier_loss_id'],
context=context)['lot_carrier_loss_id'][0]
return loc_id
_defaults = {
'claim_line_dest_location': _get_dest_loc,
}

View File

@@ -1,169 +0,0 @@
# -*- coding: utf-8 -*-
#########################################################################
# #
# #
#########################################################################
# #
# crm_claim_rma for OpenERP #
# Copyright (C) 2009-2012 Akretion, Emmanuel Samyn, #
# Benoît GUILLOT <benoit.guillot@akretion.com> #
#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/>. #
#########################################################################
from openerp.osv import fields, orm
from openerp.tools import DEFAULT_SERVER_DATETIME_FORMAT
from openerp import netsvc
import time
class claim_make_picking_from_picking(orm.TransientModel):
_name = 'claim_make_picking_from_picking.wizard'
_description = 'Wizard to create pickings from picking lines'
_columns = {
'picking_line_source_location': fields.many2one('stock.location',
'Source Location',
help="Location where the returned products are from.",
required=True),
'picking_line_dest_location': fields.many2one('stock.location',
'Dest. Location',
help="Location where the system will stock the returned products.",
required=True),
'picking_line_ids': fields.many2many('stock.move',
'claim_picking_line_picking',
'claim_picking_id',
'picking_line_id',
'Picking lines'),
}
def _get_default_warehouse(self, cr, uid, context=None):
warehouse_id=self.pool.get('crm.claim')._get_default_warehouse(cr, uid, context=context)
return warehouse_id
def _get_picking_lines(self, cr, uid, context):
return self.pool.get('stock.picking').read(cr, uid,
context['active_id'], ['move_lines'], context=context)['move_lines']
# Get default source location
def _get_source_loc(self, cr, uid, context):
if context is None:
context = {}
warehouse_obj = self.pool.get('stock.warehouse')
warehouse_id = self._get_default_warehouse(cr, uid, context=context)
return warehouse_obj.read(cr, uid,
warehouse_id, ['lot_rma_id'], context=context)['lot_rma_id'][0]
# Get default destination location
def _get_dest_loc(self, cr, uid, context):
if context is None:
context = {}
warehouse_id = self._get_default_warehouse(cr, uid, context=context)
warehouse_obj = self.pool.get('stock.warehouse')
if context.get('picking_type'):
context_loc = context.get('picking_type')[8:]
loc_field = 'lot_%s_id' %context.get('picking_type')[8:]
loc_id = warehouse_obj.read(cr, uid,
warehouse_id, [loc_field], context=context)[loc_field][0]
return loc_id
_defaults = {
'picking_line_source_location': _get_source_loc,
'picking_line_dest_location': _get_dest_loc,
'picking_line_ids': _get_picking_lines,
}
def action_cancel(self,cr,uid,ids,conect=None):
return {'type': 'ir.actions.act_window_close',}
# If "Create" button pressed
def action_create_picking_from_picking(self, cr, uid, ids, context=None):
picking_obj = self.pool.get('stock.picking')
move_obj = self.pool.get('stock.move')
view_obj = self.pool.get('ir.ui.view')
if context is None:
context = {}
p_type = 'internal'
if context.get('picking_type'):
context_type = context.get('picking_type')[8:]
note = 'Internal picking from RMA to %s' %context_type
name = 'Internal picking to %s' %context_type
view_id = view_obj.search(cr, uid, [
('xml_id', '=', 'view_picking_form'),
('model', '=', 'stock.picking'),
('type', '=', 'form'),
('name', '=', 'stock.picking.form')
], context=context)[0]
wizard = self.browse(cr, uid, ids[0], context=context)
prev_picking = picking_obj.browse(cr, uid,
context['active_id'], context=context)
partner_id = prev_picking.partner_id.id
# create picking
picking_id = picking_obj.create(cr, uid, {
'origin': prev_picking.origin,
'type': p_type,
'move_type': 'one', # direct
'state': 'draft',
'date': time.strftime(DEFAULT_SERVER_DATETIME_FORMAT),
'partner_id': prev_picking.partner_id.id,
'invoice_state': "none",
'company_id': prev_picking.company_id.id,
'location_id': wizard.picking_line_source_location.id,
'location_dest_id': wizard.picking_line_dest_location.id,
'note' : note,
'claim_id': prev_picking.claim_id.id,
})
# Create picking lines
for wizard_picking_line in wizard.picking_line_ids:
move_id = move_obj.create(cr, uid, {
'name' : wizard_picking_line.product_id.name_template, # Motif : crm id ? stock_picking_id ?
'priority': '0',
#'create_date':
'date': time.strftime(DEFAULT_SERVER_DATETIME_FORMAT),
'date_expected': time.strftime(DEFAULT_SERVER_DATETIME_FORMAT),
'product_id': wizard_picking_line.product_id.id,
'product_qty': wizard_picking_line.product_qty,
'product_uom': wizard_picking_line.product_uom.id,
'partner_id': prev_picking.partner_id.id,
'prodlot_id': wizard_picking_line.prodlot_id.id,
# 'tracking_id':
'picking_id': picking_id,
'state': 'draft',
'price_unit': wizard_picking_line.price_unit,
# 'price_currency_id': claim_id.company_id.currency_id.id, # from invoice ???
'company_id': prev_picking.company_id.id,
'location_id': wizard.picking_line_source_location.id,
'location_dest_id': wizard.picking_line_dest_location.id,
'note': note,
})
wizard_move = move_obj.write(cr, uid,
wizard_picking_line.id,
{'move_dest_id': move_id},
context=context)
wf_service = netsvc.LocalService("workflow")
if picking_id:
wf_service.trg_validate(uid,
'stock.picking', picking_id,'button_confirm', cr)
picking_obj.action_assign(cr, uid, [picking_id])
domain = "[('type','=','%s'),('partner_id','=',%s)]"%(p_type, partner_id)
return {
'name': '%s' % name,
'view_type': 'form',
'view_mode': 'form',
'view_id': view_id,
'domain' : domain,
'res_model': 'stock.picking',
'res_id': picking_id,
'type': 'ir.actions.act_window',
}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@@ -1,63 +0,0 @@
<?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>
<record id="view_claim_picking_from_picking" model="ir.ui.view">
<field name="name">claim_picking</field>
<field name="model">claim_make_picking_from_picking.wizard</field>
<field name="arch" type="xml">
<form string="Select lines to add in picking">
<separator string="Locations" colspan="4"/>
<field name="picking_line_source_location" nolabel="1" />
<field name="picking_line_dest_location" nolabel="1" />
<separator string="Select lines for picking" colspan="4"/>
<field name="picking_line_ids" nolabel="1" colspan="4"/>
<group col="4" colspan="2">
<button special="cancel" string="Cancel" name="action_cancel" type="object" icon='gtk-cancel'/>
<button name="action_create_picking_from_picking" string="Create picking"
icon='gtk-ok' type="object"/>
</group>
</form>
</field>
</record>
<record id="action_stock_picking_from_claim_picking" model="ir.actions.act_window">
<field name="name">Create Incomming Shipment to Stock</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">claim_make_picking_from_picking.wizard</field>
<field name="src_model">stock.picking</field>
<field name="view_type">form</field>
<field name="view_mode">form</field>
<field name="target">new</field>
<field name="context">{'picking_type': 'picking_stock'}</field>
</record>
<record id="action_loss_picking_from_claim_picking" model="ir.actions.act_window">
<field name="name">Create Incomming Shipment to Breakkage Loss Location</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">claim_make_picking_from_picking.wizard</field>
<field name="src_model">stock.picking</field>
<field name="view_type">form</field>
<field name="view_mode">form</field>
<field name="target">new</field>
<field name="context">{'picking_type': 'picking_breakage_loss'}</field>
</record>
<record id="action_used_picking_from_claim_picking" model="ir.actions.act_window">
<field name="name">Create Incomming Shipment to Refurbish Location</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">claim_make_picking_from_picking.wizard</field>
<field name="src_model">stock.picking</field>
<field name="view_type">form</field>
<field name="view_mode">form</field>
<field name="target">new</field>
<field name="context">{'picking_type': 'picking_refurbish'}</field>
</record>
</data>
</openerp>

View File

@@ -1,22 +0,0 @@
<?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>
<record id="action_claim_picking_loss" model="ir.actions.act_window">
<field name="name">Create Products Loss</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">claim_make_picking.wizard</field>
<field name="src_model">crm.claim</field>
<field name="view_type">form</field>
<field name="view_mode">form</field>
<field name="target">new</field>
<field name="context">{'picking_type': 'loss'}</field>
</record>
</data>
</openerp>