From 85bcd6fdd86123e26a022d07be21b1e8bc16a771 Mon Sep 17 00:00:00 2001 From: Ravi Patel Date: Mon, 7 Mar 2016 10:46:20 +0530 Subject: [PATCH] [REF] account,payment_paypal: Remove the 'paypal_account' field This field was relevant before the salepocalypse, it is no longer. Replaced by generic payment providers instead of putting paypal payment methods in account. Remove it from the res.company and res.config model Remove the method `_migrate_paypal_account` as it was used to find paypal accounts based on the removed field Closes #11231, task-22286 --- addons/account/models/company.py | 1 - addons/account/models/res_config.py | 5 --- addons/account/views/res_config_view.xml | 5 +-- addons/payment_paypal/data/paypal.xml | 1 - addons/payment_paypal/models/__init__.py | 1 - addons/payment_paypal/models/paypal.py | 19 --------- addons/payment_paypal/models/res_company.py | 43 --------------------- 7 files changed, 1 insertion(+), 74 deletions(-) delete mode 100644 addons/payment_paypal/models/res_company.py diff --git a/addons/account/models/company.py b/addons/account/models/company.py index 1a43f3c59f9..faa20059bc4 100644 --- a/addons/account/models/company.py +++ b/addons/account/models/company.py @@ -24,7 +24,6 @@ class ResCompany(models.Model): ('round_globally', 'Round Globally'), ], default='round_per_line', string='Tax Calculation Rounding Method', help="If you select 'Round per Line' : for each tax, the tax amount will first be computed and rounded for each PO/SO/invoice line and then these rounded amounts will be summed, leading to the total amount for that tax. If you select 'Round Globally': for each tax, the tax amount will be computed for each PO/SO/invoice line, then these amounts will be summed and eventually this total tax amount will be rounded. If you sell with tax included, you should choose 'Round per line' because you certainly want the sum of your tax-included line subtotals to be equal to the total amount with taxes.") - paypal_account = fields.Char(string='Paypal Account', size=128, help="Paypal username (usually email) for receiving online payments.") currency_exchange_journal_id = fields.Many2one('account.journal', string="Exchange Gain or Loss Journal", domain=[('type', '=', 'general')]) income_currency_exchange_account_id = fields.Many2one('account.account', related='currency_exchange_journal_id.default_credit_account_id', string="Gain Exchange Rate Account", domain="[('internal_type', '=', 'other'), ('deprecated', '=', False), ('company_id', '=', id)]") diff --git a/addons/account/models/res_config.py b/addons/account/models/res_config.py index 4f7d7e134f3..ee77d3bf03d 100644 --- a/addons/account/models/res_config.py +++ b/addons/account/models/res_config.py @@ -24,10 +24,6 @@ class AccountConfigSettings(models.TransientModel): help='Check this box if this company is a legal entity.') currency_id = fields.Many2one('res.currency', related='company_id.currency_id', required=True, string='Default company currency', help="Main currency of the company.") - paypal_account = fields.Char(related='company_id.paypal_account', size=128, string='Paypal account', - help="""Paypal account (email) for receiving online payments (credit card, etc.) - If you set a paypal account, the customer will be able to pay your invoices or quotations - with a button \"Pay with Paypal\" in automated emails or through the Odoo portal.""") company_footer = fields.Text(related='company_id.rml_footer', string='Bank accounts footer preview', readonly=True, help="Bank accounts as printed in the footer of each printed document") @@ -144,7 +140,6 @@ class AccountConfigSettings(models.TransientModel): self.expects_chart_of_accounts = company.expects_chart_of_accounts self.currency_id = company.currency_id self.transfer_account_id = company.transfer_account_id - self.paypal_account = company.paypal_account self.company_footer = company.rml_footer self.tax_calculation_rounding_method = company.tax_calculation_rounding_method self.bank_account_code_prefix = company.bank_account_code_prefix diff --git a/addons/account/views/res_config_view.xml b/addons/account/views/res_config_view.xml index 3128ba57c0f..a433ae97291 100644 --- a/addons/account/views/res_config_view.xml +++ b/addons/account/views/res_config_view.xml @@ -229,10 +229,7 @@