~unifield-team/unifield-wm/us-826

« back to all changes in this revision

Viewing changes to finance/invoice.py

  • Committer: Quentin THEURET
  • Date: 2011-11-30 13:31:37 UTC
  • mto: This revision was merged to the branch mainline in revision 515.
  • Revision ID: qt@tempo-consulting.fr-20111130133137-mdf2fp6hkqmwbppn
UF-647 [ADD] Added a line in Purchase Order to have information about international transport costs

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#-*- coding:utf-8 -*-
2
 
##############################################################################
3
 
#
4
 
#    OpenERP, Open Source Management Solution
5
 
#    Copyright (C) 2014 TeMPO Consulting, MSF. All Rights Reserved
6
 
#
7
 
#    This program is free software: you can redistribute it and/or modify
8
 
#    it under the terms of the GNU Affero General Public License as
9
 
#    published by the Free Software Foundation, either version 3 of the
10
 
#    License, or (at your option) any later version.
11
 
#
12
 
#    This program is distributed in the hope that it will be useful,
13
 
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
14
 
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15
 
#    GNU Affero General Public License for more details.
16
 
#
17
 
#    You should have received a copy of the GNU Affero General Public License
18
 
#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
19
 
#
20
 
##############################################################################
21
 
 
22
 
from osv import osv
23
 
from osv import fields
24
 
 
25
 
class account_invoice(osv.osv):
26
 
    _name = 'account.invoice'
27
 
    _inherit = 'account.invoice'
28
 
 
29
 
    _columns = {
30
 
        'picking_id': fields.many2one('stock.picking', string="Picking"),
31
 
        'purchase_ids': fields.many2many('purchase.order', 'purchase_invoice_rel', 'invoice_id', 'purchase_id', 'Purchase Order',
32
 
            help="Purchase Order from which invoice have been generated"),
33
 
    }
34
 
 
35
 
account_invoice()
36
 
 
37
 
class account_invoice_line(osv.osv):
38
 
    _name = 'account.invoice.line'
39
 
    _inherit = 'account.invoice.line'
40
 
 
41
 
    _columns = {
42
 
        'order_line_id': fields.many2one('purchase.order.line', string="Purchase Order Line", readonly=True,
43
 
            help="Purchase Order Line from which this invoice line has been generated (when coming from a purchase order)."),
44
 
    }
45
 
 
46
 
account_invoice_line()
47
 
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
 
 
b'\\ No newline at end of file'