~jan-philipp-fischer/e-commerce-addons/7.0-payment-name-required

« back to all changes in this revision

Viewing changes to sale_payment_method/payment_method.py

  • Committer: Yannick Vaucher
  • Author(s): arthur.vuillard at akretion
  • Date: 2014-01-14 10:03:35 UTC
  • mfrom: (286.1.1 e-commerce-addons)
  • Revision ID: yannick.vaucher@camptocamp.com-20140114100335-rpzf3ydqpiukvn2j
[MRG] Add multicompany support for payment methods

Show diffs side-by-side

added added

removed removed

Lines of Context:
40
40
            'account.payment.term',
41
41
            'Payment Term',
42
42
             help="Default payment term of a sale order using this method."),
 
43
        'company_id': fields.many2one(
 
44
            'res.company',
 
45
            'Company',
 
46
        ),
 
47
    }
 
48
 
 
49
    def _default_company_id(self, cr, uid, context):
 
50
        company_model = self.pool.get('res.company')
 
51
        return company_model._company_default_get(cr, uid, 'payment.method',
 
52
                                                  context=context)
 
53
 
 
54
    _defaults = {
 
55
         'company_id': _default_company_id,
43
56
    }