~agilebg/openobject-italia/imp_save_fiscalcode_data

« back to all changes in this revision

Viewing changes to l10n_it_sale/stock/picking.py

  • Committer: Lorenzo Battistini
  • Date: 2013-05-13 06:26:40 UTC
  • mfrom: (210.1.1 italia-addons-7.0)
  • Revision ID: lorenzo.battistini@agilebg.com-20130513062640-504y47lv43d8nqda
[FIX] errore generazione numero DDT

Show diffs side-by-side

added added

removed removed

Lines of Context:
34
34
        'name':fields.char('Carriage Condition', size=64, required=True, readonly=False),
35
35
        'note': fields.text('Note'),
36
36
    }
37
 
stock_picking_carriage_condition()
38
37
 
39
38
class stock_picking_goods_description(orm.Model):
40
39
    """
47
46
        'name':fields.char('Description of Goods', size=64, required=True, readonly=False),
48
47
        'note': fields.text('Note'),
49
48
    }
50
 
stock_picking_goods_description()
51
 
 
52
49
 
53
50
class stock_picking_reason(orm.Model):
54
51
    """
61
58
        'name':fields.char('Reason For Transportation', size=64, required=True, readonly=False),
62
59
        'note': fields.text('Note'),
63
60
    }
64
 
stock_picking_reason()
65
61
 
66
62
class stock_picking(orm.Model):
67
63
    _inherit = "stock.picking.out"
103
99
        default.update({'ddt_number': ''})
104
100
        return super(stock_picking, self).copy(cr, uid, id, default, context)
105
101
 
106
 
stock_picking()
 
102
# Redefinition of the new fields in order to update the model stock.picking in the orm
 
103
# FIXME: this is a temporary workaround because of a framework bug (ref: lp996816).
 
104
# It should be removed as soon as
 
105
# the bug is fixed
 
106
class stock_picking(orm.Model):
 
107
    _inherit = 'stock.picking'
 
108
    _columns =  {
 
109
        'carriage_condition_id': fields.many2one('stock.picking.carriage_condition', 'Carriage condition'),
 
110
        'goods_description_id': fields.many2one('stock.picking.goods_description', 'Description of goods'),
 
111
        'transportation_reason_id': fields.many2one('stock.picking.transportation_reason', 'Reason for transportation'),
 
112
        'ddt_number':  fields.char('DDT', size=64),
 
113
        'ddt_date':  fields.date('DDT date'),
 
114
    }