[FIX] crm_rma_advance_location to let it be installable

[DEL] Remove the images as they are deprecated.
This commit is contained in:
Joel Grand-Guillaume
2013-11-15 14:24:39 +01:00
parent 4756af3ed8
commit 2429c0bb3b
8 changed files with 16 additions and 12 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 109 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 69 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 112 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 70 KiB

View File

@@ -25,9 +25,9 @@
'category': 'Generic Modules/CRM & SRM',
'depends': ['crm_claim_rma'
],
'author': 'Akretion, Camptocamp',
'author': 'Akretion',
'license': 'AGPL-3',
'website': 'http://www.akretion.com, http://www.camptocamp.com',
'website': 'http://www.akretion.com',
'description': """
RMA Claim Advance Location
==========================
@@ -48,17 +48,17 @@ 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: This module is currently not yet completely debugged and is waiting his author to be.
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',
'wizard/claim_make_picking_from_picking_view.xml',
'wizard/claim_make_picking_view.xml',
],
'installable': True,
'application': True,

View File

@@ -4,7 +4,7 @@
<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.crm_case_claims_form_view"/>
<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"

View File

@@ -46,6 +46,10 @@ class claim_make_picking_from_picking(orm.TransientModel):
'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']
@@ -54,21 +58,21 @@ class claim_make_picking_from_picking(orm.TransientModel):
def _get_source_loc(self, cr, uid, context):
if context is None: context = {}
warehouse_obj = self.pool.get('stock.warehouse')
warehouse_id = context.get('warehouse_id')
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')
warehouse_id = context.get('warehouse_id')
print warehouse_id
import pdb;pdb.set_trace()
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]
warehouse_id, [loc_field], context=context)[loc_field][0]
return loc_id
_defaults = {

View File

@@ -25,9 +25,9 @@
'category': 'Generic Modules/CRM & SRM',
'depends': ['crm_claim_rma'
],
'author': 'Akretion, Camptocamp',
'author': 'Akretion',
'license': 'AGPL-3',
'website': 'http://www.akretion.com, http://www.camptocamp.com',
'website': 'http://www.akretion.com',
'description': """
RMA Claim Mass Return by Lot
============================