~ajite/openobject-addons/elico-7.0-add-0003

« back to all changes in this revision

Viewing changes to wms/stock.py

  • Committer:
  • Date: 2014-02-15 09:00:31 UTC
  • Revision ID: elicoidal@hotmail.com-20140215090031-zck4q099ih5jybru
[ADD] wms for 7.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# -*- coding: utf-8 -*-
 
2
##############################################################################
 
3
#
 
4
#    wms module for OpenERP, This module allows to manage crossdocking in warehouses
 
5
#    Copyright (C) 2011 SYLEAM Info Services (<http://www.Syleam.fr/>)
 
6
#              Sylvain Garancher <sylvain.garancher@syleam.fr>
 
7
#              Sebastien LANGE <sebastien.lange@syleam.fr>
 
8
#
 
9
#    This file is a part of wms
 
10
#
 
11
#    wms is free software: you can redistribute it and/or modify
 
12
#    it under the terms of the GNU General Public License as published by
 
13
#    the Free Software Foundation, either version 3 of the License, or
 
14
#    (at your option) any later version.
 
15
#
 
16
#    wms is distributed in the hope that it will be useful,
 
17
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
 
18
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
19
#    GNU General Public License for more details.
 
20
#
 
21
#    You should have received a copy of the GNU General Public License
 
22
#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
23
#
 
24
##############################################################################
 
25
 
 
26
from openerp.osv import osv
 
27
from openerp.osv import fields
 
28
 
 
29
 
 
30
class stock_location_category(osv.osv):
 
31
    _name = 'stock.location.category'
 
32
    _description = 'Category of stock location'
 
33
 
 
34
    _columns = {
 
35
        'name': fields.char('Name', size=64, required=True, help='Name of the category of stock location'),
 
36
        'code': fields.char('Code', size=64, required=True, help='Code of the category of stock location'),
 
37
        'active': fields.boolean('Active', help='This field allows to hide the category without removing it'),
 
38
    }
 
39
 
 
40
stock_location_category()
 
41
 
 
42
 
 
43
class stock_location(osv.osv):
 
44
    _inherit = 'stock.location'
 
45
 
 
46
    _columns = {
 
47
        'warehouse_id': fields.many2one('stock.warehouse', 'Warehouse', help='Warehouse where is located this location'),
 
48
        'categ_id': fields.many2one('stock.location.category', 'Category', help='Category of this location'),
 
49
    }
 
50
 
 
51
stock_location()
 
52
 
 
53
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: