Bootstrapped crm_rma_stock_location and moved there lot_rma_id from

crm_rma_advance_location
This commit is contained in:
Guewen Baconnier
2014-09-11 10:22:34 +02:00
parent a205361fa1
commit 35ea114dbb
9 changed files with 134 additions and 11 deletions

View File

@@ -23,7 +23,8 @@
{'name': 'RMA Claims Advance Location',
'version': '1.0',
'category': 'Generic Modules/CRM & SRM',
'depends': ['crm_claim_rma'
'depends': ['crm_claim_rma',
'crm_rma_stock_location',
],
'author': 'Akretion',
'license': 'AGPL-3',

View File

@@ -27,7 +27,6 @@ class stock_warehouse(orm.Model):
_inherit = "stock.warehouse"
_columns = {
'lot_rma_id': fields.many2one('stock.location', 'Location RMA'),
'lot_carrier_loss_id': fields.many2one(
'stock.location',
'Location Carrier Loss'),

View File

@@ -9,11 +9,6 @@
<field name="usage">internal</field>
<field name="location_id" ref="stock.stock_location_company"/>
</record>
<record id="stock_location_rma" model="stock.location">
<field name="name">RMA</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>
@@ -33,7 +28,6 @@
Default Values for : Stock Warehouse
-->
<record id="stock.warehouse0" model="stock.warehouse">
<field name="lot_rma_id" ref="stock_location_rma"/>
<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"/>

View File

@@ -32,10 +32,9 @@
<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 name="inherit_id" ref="crm_rma_stock_location.view_warehouse_form" />
<field name="arch" type="xml">
<xpath expr="/form/group/group/field[@name='lot_output_id']" position="after">
<field name="lot_rma_id"/>
<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"/>

View File

@@ -0,0 +1,22 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# Author: Guewen Baconnier
# Copyright 2014 Camptocamp SA
#
# 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_warehouse

View File

@@ -0,0 +1,46 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# Author: Guewen Baconnier
# Copyright 2014 Camptocamp SA
#
# 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 Stock Location',
'version': '1.0',
'author': 'Camptocamp',
'maintainer': 'Camptocamp',
'license': 'AGPL-3',
'category': 'Generic Modules/CRM & SRM',
'depends': ['stock',
],
'description': """
RMA Stock Location
==================
A RMA location can be selected on the warehouses.
The product views displays the quantity available and virtual in this
RMA location (including the children locations).
""",
'website': 'http://www.camptocamp.com',
'data': ['stock_data.xml',
'stock_warehouse_view.xml',
],
'test': [],
'installable': True,
'auto_install': False,
}

View File

@@ -0,0 +1,15 @@
<?xml version="1.0"?>
<openerp>
<data noupdate="1">
<record id="stock_location_rma" model="stock.location">
<field name="name">RMA</field>
<field name="usage">internal</field>
<field name="location_id" ref="stock.stock_location_company"/>
</record>
<record id="stock.warehouse0" model="stock.warehouse">
<field name="lot_rma_id" ref="stock_location_rma"/>
</record>
</data>
</openerp>

View File

@@ -0,0 +1,30 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# Author: Guewen Baconnier
# Copyright 2014 Camptocamp SA
#
# 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 orm, fields
class StockWarehouse(orm.Model):
_inherit = 'stock.warehouse'
_columns = {
'lot_rma_id': fields.many2one('stock.location', 'Location RMA'),
}

View File

@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data noupdate="0">
<record id="view_warehouse_form" model="ir.ui.view">
<field name="name">view_warehouse_form</field>
<field name="model">stock.warehouse</field>
<field name="inherit_id" ref="stock.view_warehouse" />
<field name="arch" type="xml">
<xpath expr="/form/group/group/field[@name='lot_output_id']" position="after">
<field name="lot_rma_id"/>
</xpath>
</field>
</record>
</data>
</openerp>