~oscarolar/addons-vauxoo/addons-vauxoo

« back to all changes in this revision

Viewing changes to payment_terms/model/account.py

  • Committer: Jose Morales
  • Date: 2013-05-22 05:53:36 UTC
  • mfrom: (553.1.1 addons-vauxoo)
  • Revision ID: jose@vauxoo.com-20130522055336-62012wrb5e7ttabm
 
[MERGE]  Add Payments terms by partner, Each payments termn is set in each partner   
    and each partner have a different payment termn by company,                    
                                                                                   
    These fields are located in the Accounting tab, above Others terms added by 
    accounting module.                                                             
                                                                                                                                                                                                     
    The Payment term is in sale, stock,purchase and invoice modules and is send 
    through are models                                                       

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/python
 
2
# -*- encoding: utf-8 -*-
 
3
###########################################################################
 
4
#    Module Writen to OpenERP, Open Source Management Solution
 
5
#    Copyright (C) OpenERP Venezuela (<http://openerp.com.ve>).
 
6
#    All Rights Reserved
 
7
# Credits######################################################
 
8
#    Coded by: Vauxoo C.A.
 
9
#    Planified by: Nhomar Hernandez
 
10
#    Audited by: Vauxoo C.A.
 
11
#############################################################################
 
12
#    This program is free software: you can redistribute it and/or modify
 
13
#    it under the terms of the GNU Affero General Public License as published by
 
14
#    the Free Software Foundation, either version 3 of the License, or
 
15
#    (at your option) any later version.
 
16
#
 
17
#    This program is distributed in the hope that it will be useful,
 
18
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
 
19
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
20
#    GNU Affero General Public License for more details.
 
21
#
 
22
#    You should have received a copy of the GNU Affero General Public License
 
23
#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
24
##########################################################################
 
25
 
 
26
from openerp.osv import osv, fields
 
27
from openerp.tools.translate import _
 
28
 
 
29
from datetime import datetime
 
30
from DateTime import DateTime
 
31
import time
 
32
 
 
33
 
 
34
class account_invoice(osv.Model):
 
35
 
 
36
    _inherit = 'account.invoice'
 
37
 
 
38
    _columns = {
 
39
            'payment_terms_id':fields.many2one('payment.terms.partner',
 
40
                                               'Payment Terms',
 
41
                                               help='Select the payment term '
 
42
                                                    'agreed by company for '
 
43
                                                    'this partner'), 
 
44
    }
 
45
 
 
46
 
 
47
 
 
48
 
 
49
class payments_term_partner(osv.Model):
 
50
    
 
51
    '''Payments terms agreed by company to define how to will 
 
52
       pay each partner'''
 
53
    
 
54
    _name = 'payment.terms.partner'
 
55
    
 
56
    _columns = {
 
57
            'name':fields.char('Name', 50,
 
58
                               help='Name to identify payment term'), 
 
59
            
 
60
            
 
61
            }
 
62
 
 
63
 
 
64
 
 
65