Files
odoo_source/addons/payment/tests/common.py
T
qdp-odoo 01216345e2 [REF] account,payment(_*),sale*: downgrade transactions into debug items
It was very confusing for the user to distinct account.payment and payment.transaction. From now on, the transactions are
technical objects and, in the backend, we only refer to it in log messages (Front end will be adapted in the same fashion
later on). They are hidden in debug mode in accounting\configuration\payments as their purpose is now purely technical/log

This commit also aims to reduce the gap between the accounting app and the transactions: account.payment objects are
created/validated upon completion of transaction.

To ease the capture/voiding of pending transactions, the related buttons are now displayed directly on the SO/invoice
instead of the transactions.

Was task: https://www.odoo.com/web#id=35857&view_type=form&model=project.task&action=333&active_id=967&menu_id=4720
Was PR #24043

[FIX] add domain based on journal to payment tokens

Was opw: https://www.odoo.com/web?debug#id=1828206&view_type=form&model=project.task&menu_id=5200
2018-05-23 15:44:55 +02:00

52 lines
2.2 KiB
Python

# -*- coding: utf-8 -*-
from odoo.addons.account.tests.account_test_classes import AccountingTestCase
class PaymentAcquirerCommon(AccountingTestCase):
def setUp(self):
super(PaymentAcquirerCommon, self).setUp()
self.currency_euro = self.env['res.currency'].search([('name', '=', 'EUR')], limit=1)
self.country_belgium = self.env['res.country'].search([('code', 'like', 'BE')], limit=1)
self.country_france = self.env['res.country'].search([('code', 'like', 'FR')], limit=1)
# dict partner values
self.buyer_values = {
'partner_name': 'Norbert Buyer',
'partner_lang': 'en_US',
'partner_email': 'norbert.buyer@example.com',
'partner_address': 'Huge Street 2/543',
'partner_phone': '0032 12 34 56 78',
'partner_city': 'Sin City',
'partner_zip': '1000',
'partner_country': self.env['res.country'].browse(self.country_belgium.id),
'partner_country_id': self.country_belgium.id,
'partner_country_name': 'Belgium',
'billing_partner_name': 'Norbert Buyer',
'billing_partner_commercial_company_name': 'Big Company',
'billing_partner_lang': 'en_US',
'billing_partner_email': 'norbert.buyer@example.com',
'billing_partner_address': 'Huge Street 2/543',
'billing_partner_phone': '0032 12 34 56 78',
'billing_partner_city': 'Sin City',
'billing_partner_zip': '1000',
'billing_partner_country': self.env['res.country'].browse(self.country_belgium.id),
'billing_partner_country_id': self.country_belgium.id,
'billing_partner_country_name': 'Belgium',
}
# test partner
self.buyer = self.env['res.partner'].create({
'name': 'Norbert Buyer',
'lang': 'en_US',
'email': 'norbert.buyer@example.com',
'street': 'Huge Street',
'street2': '2/543',
'phone': '0032 12 34 56 78',
'city': 'Sin City',
'zip': '1000',
'country_id': self.country_belgium.id})
self.buyer_id = self.buyer.id