Browse Source
Merge pull request #196 from Tecnativa/11.0-account_bank_statement_import_paypal_improve
Merge pull request #196 from Tecnativa/11.0-account_bank_statement_import_paypal_improve
[IMP] account_bank_statement_import_paypal: create paypal mapspull/156/merge
Pedro M. Baeza
6 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
23 changed files with 1167 additions and 98 deletions
-
27account_bank_statement_import_paypal/README.rst
-
1account_bank_statement_import_paypal/__init__.py
-
12account_bank_statement_import_paypal/__manifest__.py
-
114account_bank_statement_import_paypal/data/paypal_map_data.xml
-
295account_bank_statement_import_paypal/i18n/account_bank_statement_import_paypal.pot
-
348account_bank_statement_import_paypal/i18n/es.po
-
3account_bank_statement_import_paypal/models/__init__.py
-
64account_bank_statement_import_paypal/models/account_bank_statement_import_paypal_map.py
-
13account_bank_statement_import_paypal/models/account_journal.py
-
22account_bank_statement_import_paypal/readme/CONFIGURE.rst
-
3account_bank_statement_import_paypal/readme/DESCRIPTION.rst
-
3account_bank_statement_import_paypal/security/ir.model.access.csv
-
55account_bank_statement_import_paypal/static/description/index.html
-
1account_bank_statement_import_paypal/tests/__init__.py
-
3account_bank_statement_import_paypal/tests/paypal_en.csv
-
54account_bank_statement_import_paypal/tests/test_paypal_statement_import.py
-
16account_bank_statement_import_paypal/views/account_journal_views.xml
-
65account_bank_statement_import_paypal/views/paypal_map_views.xml
-
2account_bank_statement_import_paypal/wizards/__init__.py
-
81account_bank_statement_import_paypal/wizards/account_bank_statement_import_paypal.py
-
14account_bank_statement_import_paypal/wizards/account_bank_statement_import_view.xml
-
38account_bank_statement_import_paypal/wizards/create_map_lines_from_file.py
-
29account_bank_statement_import_paypal/wizards/create_map_lines_from_file_views.xml
@ -1 +1,2 @@ |
|||||
from . import models |
from . import models |
||||
|
from . import wizards |
@ -0,0 +1,114 @@ |
|||||
|
<?xml version="1.0" encoding="utf-8"?> |
||||
|
<odoo noupdate="1"> |
||||
|
|
||||
|
<record id="paypal_map" model="account.bank.statement.import.paypal.map"> |
||||
|
<field name="name">Paypal Monthly Statement</field> |
||||
|
</record> |
||||
|
|
||||
|
<record id="paypal_map_line_date" model="account.bank.statement.import.paypal.map.line"> |
||||
|
<field name="name">Date</field> |
||||
|
<field name="sequence">0</field> |
||||
|
<field name="map_parent_id" ref="paypal_map"/> |
||||
|
<field name="field_to_assign">date</field> |
||||
|
<field name="date_format">%m/%d/%Y</field> |
||||
|
</record> |
||||
|
<record id="paypal_map_line_time" model="account.bank.statement.import.paypal.map.line"> |
||||
|
<field name="name">Time</field> |
||||
|
<field name="sequence">1</field> |
||||
|
<field name="map_parent_id" ref="paypal_map"/> |
||||
|
<field name="field_to_assign">time</field> |
||||
|
</record> |
||||
|
<record id="paypal_map_line_time_zone" model="account.bank.statement.import.paypal.map.line"> |
||||
|
<field name="name">Time Zone</field> |
||||
|
<field name="sequence">2</field> |
||||
|
<field name="map_parent_id" ref="paypal_map"/> |
||||
|
</record> |
||||
|
<record id="paypal_map_line_description" model="account.bank.statement.import.paypal.map.line"> |
||||
|
<field name="name">Description</field> |
||||
|
<field name="sequence">3</field> |
||||
|
<field name="map_parent_id" ref="paypal_map"/> |
||||
|
<field name="field_to_assign">description</field> |
||||
|
</record> |
||||
|
<record id="paypal_map_line_currency" model="account.bank.statement.import.paypal.map.line"> |
||||
|
<field name="name">Currency</field> |
||||
|
<field name="sequence">4</field> |
||||
|
<field name="map_parent_id" ref="paypal_map"/> |
||||
|
<field name="field_to_assign">currency</field> |
||||
|
</record> |
||||
|
<record id="paypal_map_line_gross" model="account.bank.statement.import.paypal.map.line"> |
||||
|
<field name="name">Gross</field> |
||||
|
<field name="sequence">5</field> |
||||
|
<field name="map_parent_id" ref="paypal_map"/> |
||||
|
<field name="field_to_assign">amount</field> |
||||
|
</record> |
||||
|
<record id="paypal_map_line_fee" model="account.bank.statement.import.paypal.map.line"> |
||||
|
<field name="name">Fee</field> |
||||
|
<field name="sequence">6</field> |
||||
|
<field name="map_parent_id" ref="paypal_map"/> |
||||
|
<field name="field_to_assign">commission</field> |
||||
|
</record> |
||||
|
<record id="paypal_map_line_net" model="account.bank.statement.import.paypal.map.line"> |
||||
|
<field name="name">Net</field> |
||||
|
<field name="sequence">7</field> |
||||
|
<field name="map_parent_id" ref="paypal_map"/> |
||||
|
</record> |
||||
|
<record id="paypal_map_line_balance" model="account.bank.statement.import.paypal.map.line"> |
||||
|
<field name="name">Balance</field> |
||||
|
<field name="sequence">8</field> |
||||
|
<field name="map_parent_id" ref="paypal_map"/> |
||||
|
<field name="field_to_assign">balance</field> |
||||
|
</record> |
||||
|
<record id="paypal_map_line_transaction" model="account.bank.statement.import.paypal.map.line"> |
||||
|
<field name="name">Transaction ID</field> |
||||
|
<field name="sequence">9</field> |
||||
|
<field name="map_parent_id" ref="paypal_map"/> |
||||
|
<field name="field_to_assign">transaction_id</field> |
||||
|
</record> |
||||
|
<record id="paypal_map_line_email" model="account.bank.statement.import.paypal.map.line"> |
||||
|
<field name="name">From Email Address</field> |
||||
|
<field name="sequence">10</field> |
||||
|
<field name="map_parent_id" ref="paypal_map"/> |
||||
|
<field name="field_to_assign">email</field> |
||||
|
</record> |
||||
|
<record id="paypal_map_line_name" model="account.bank.statement.import.paypal.map.line"> |
||||
|
<field name="name">Name</field> |
||||
|
<field name="sequence">11</field> |
||||
|
<field name="map_parent_id" ref="paypal_map"/> |
||||
|
<field name="field_to_assign">partner_name</field> |
||||
|
</record> |
||||
|
<record id="paypal_map_line_bank_name" model="account.bank.statement.import.paypal.map.line"> |
||||
|
<field name="name">Bank Name</field> |
||||
|
<field name="sequence">12</field> |
||||
|
<field name="map_parent_id" ref="paypal_map"/> |
||||
|
<field name="field_to_assign">bank_name</field> |
||||
|
</record> |
||||
|
<record id="paypal_map_line_bank_account" model="account.bank.statement.import.paypal.map.line"> |
||||
|
<field name="name">Bank Account</field> |
||||
|
<field name="sequence">13</field> |
||||
|
<field name="map_parent_id" ref="paypal_map"/> |
||||
|
<field name="field_to_assign">bank_account</field> |
||||
|
</record> |
||||
|
<record id="paypal_map_line_shipping" model="account.bank.statement.import.paypal.map.line"> |
||||
|
<field name="name">Shipping and Handling Amount</field> |
||||
|
<field name="sequence">14</field> |
||||
|
<field name="map_parent_id" ref="paypal_map"/> |
||||
|
</record> |
||||
|
<record id="paypal_map_line_sales" model="account.bank.statement.import.paypal.map.line"> |
||||
|
<field name="name">Sales Tax</field> |
||||
|
<field name="sequence">15</field> |
||||
|
<field name="map_parent_id" ref="paypal_map"/> |
||||
|
</record> |
||||
|
<record id="paypal_map_line_invoice" model="account.bank.statement.import.paypal.map.line"> |
||||
|
<field name="name">Invoice ID</field> |
||||
|
<field name="sequence">16</field> |
||||
|
<field name="map_parent_id" ref="paypal_map"/> |
||||
|
<field name="field_to_assign">invoice_number</field> |
||||
|
</record> |
||||
|
<record id="paypal_map_line_reference" model="account.bank.statement.import.paypal.map.line"> |
||||
|
<field name="name">Reference Txn ID</field> |
||||
|
<field name="sequence">17</field> |
||||
|
<field name="map_parent_id" ref="paypal_map"/> |
||||
|
<field name="field_to_assign">origin_transaction_id</field> |
||||
|
</record> |
||||
|
|
||||
|
</odoo> |
@ -0,0 +1,348 @@ |
|||||
|
# Translation of Odoo Server. |
||||
|
# This file contains the translation of the following modules: |
||||
|
# * account_bank_statement_import_paypal |
||||
|
# |
||||
|
msgid "" |
||||
|
msgstr "" |
||||
|
"Project-Id-Version: Odoo Server 11.0\n" |
||||
|
"Report-Msgid-Bugs-To: \n" |
||||
|
"POT-Creation-Date: 2019-01-11 10:43+0000\n" |
||||
|
"PO-Revision-Date: 2019-01-11 11:44+0100\n" |
||||
|
"Language-Team: \n" |
||||
|
"Language: es\n" |
||||
|
"MIME-Version: 1.0\n" |
||||
|
"Content-Type: text/plain; charset=UTF-8\n" |
||||
|
"Content-Transfer-Encoding: 8bit\n" |
||||
|
"Plural-Forms: \n" |
||||
|
"X-Generator: Poedit 2.1.1\n" |
||||
|
|
||||
|
#. module: account_bank_statement_import_paypal |
||||
|
#: model:ir.ui.view,arch_db:account_bank_statement_import_paypal.create_paypal_map_lines_view |
||||
|
msgid "All the Paypal map lines will be created automatically." |
||||
|
msgstr "Todas las lineas de la plantilla se crearán automáticamente." |
||||
|
|
||||
|
#. module: account_bank_statement_import_paypal |
||||
|
#: selection:account.bank.statement.import.paypal.map.line,field_to_assign:0 |
||||
|
msgid "Balance" |
||||
|
msgstr "Saldo" |
||||
|
|
||||
|
#. module: account_bank_statement_import_paypal |
||||
|
#: selection:account.bank.statement.import.paypal.map.line,field_to_assign:0 |
||||
|
msgid "Bank Account" |
||||
|
msgstr "Cuenta bancaria" |
||||
|
|
||||
|
#. module: account_bank_statement_import_paypal |
||||
|
#: selection:account.bank.statement.import.paypal.map.line,field_to_assign:0 |
||||
|
msgid "Bank Name" |
||||
|
msgstr "Nombre del banco" |
||||
|
|
||||
|
#. module: account_bank_statement_import_paypal |
||||
|
#: model:ir.model.fields,field_description:account_bank_statement_import_paypal.field_wizard_paypal_map_create_data_file |
||||
|
msgid "Bank Statement File" |
||||
|
msgstr "Archivo de extracto bancario" |
||||
|
|
||||
|
#. module: account_bank_statement_import_paypal |
||||
|
#: model:ir.ui.view,arch_db:account_bank_statement_import_paypal.create_paypal_map_lines_view |
||||
|
msgid "Cancel" |
||||
|
msgstr "Cancelar" |
||||
|
|
||||
|
#. module: account_bank_statement_import_paypal |
||||
|
#: model:ir.ui.view,arch_db:account_bank_statement_import_paypal.create_paypal_map_lines_view |
||||
|
msgid "Choose a file to import..." |
||||
|
msgstr "Escoja un archivo a importar..." |
||||
|
|
||||
|
#. module: account_bank_statement_import_paypal |
||||
|
#: model:ir.ui.view,arch_db:account_bank_statement_import_paypal.create_paypal_map_lines_view |
||||
|
msgid "Create Lines" |
||||
|
msgstr "Crear líneas" |
||||
|
|
||||
|
#. module: account_bank_statement_import_paypal |
||||
|
#: model:ir.actions.act_window,name:account_bank_statement_import_paypal.action_create_paypal_map_lines |
||||
|
msgid "Create Paypal Map Lines" |
||||
|
msgstr "Crear las líneas de la plantilla de Paypal" |
||||
|
|
||||
|
#. module: account_bank_statement_import_paypal |
||||
|
#: model:ir.model.fields,field_description:account_bank_statement_import_paypal.field_account_bank_statement_import_paypal_map_create_uid |
||||
|
#: model:ir.model.fields,field_description:account_bank_statement_import_paypal.field_account_bank_statement_import_paypal_map_line_create_uid |
||||
|
#: model:ir.model.fields,field_description:account_bank_statement_import_paypal.field_wizard_paypal_map_create_create_uid |
||||
|
msgid "Created by" |
||||
|
msgstr "Creado el" |
||||
|
|
||||
|
#. module: account_bank_statement_import_paypal |
||||
|
#: model:ir.model.fields,field_description:account_bank_statement_import_paypal.field_account_bank_statement_import_paypal_map_create_date |
||||
|
#: model:ir.model.fields,field_description:account_bank_statement_import_paypal.field_account_bank_statement_import_paypal_map_line_create_date |
||||
|
#: model:ir.model.fields,field_description:account_bank_statement_import_paypal.field_wizard_paypal_map_create_create_date |
||||
|
msgid "Created on" |
||||
|
msgstr "Creado por" |
||||
|
|
||||
|
#. module: account_bank_statement_import_paypal |
||||
|
#: selection:account.bank.statement.import.paypal.map.line,field_to_assign:0 |
||||
|
msgid "Currency" |
||||
|
msgstr "Moneda" |
||||
|
|
||||
|
#. module: account_bank_statement_import_paypal |
||||
|
#: selection:account.bank.statement.import.paypal.map.line,field_to_assign:0 |
||||
|
msgid "Date" |
||||
|
msgstr "Fecha" |
||||
|
|
||||
|
#. module: account_bank_statement_import_paypal |
||||
|
#: model:ir.model.fields,field_description:account_bank_statement_import_paypal.field_account_bank_statement_import_paypal_map_line_date_format |
||||
|
msgid "Date Format" |
||||
|
msgstr "Formato de fecha" |
||||
|
|
||||
|
#. module: account_bank_statement_import_paypal |
||||
|
#: code:addons/account_bank_statement_import_paypal/wizards/account_bank_statement_import_paypal.py:90 |
||||
|
#, python-format |
||||
|
msgid "Date format of map file and Paypal date does not match." |
||||
|
msgstr "" |
||||
|
"El format de fecha del archivo de plantilla y la fecha de Paypal no " |
||||
|
"coinciden." |
||||
|
|
||||
|
#. module: account_bank_statement_import_paypal |
||||
|
#: selection:account.bank.statement.import.paypal.map.line,field_to_assign:0 |
||||
|
msgid "Description" |
||||
|
msgstr "Descripción" |
||||
|
|
||||
|
#. module: account_bank_statement_import_paypal |
||||
|
#: model:ir.model.fields,field_description:account_bank_statement_import_paypal.field_account_bank_statement_import_paypal_map_display_name |
||||
|
#: model:ir.model.fields,field_description:account_bank_statement_import_paypal.field_account_bank_statement_import_paypal_map_line_display_name |
||||
|
#: model:ir.model.fields,field_description:account_bank_statement_import_paypal.field_wizard_paypal_map_create_display_name |
||||
|
msgid "Display Name" |
||||
|
msgstr "Nombre mostrado" |
||||
|
|
||||
|
#. module: account_bank_statement_import_paypal |
||||
|
#: model:ir.ui.view,arch_db:account_bank_statement_import_paypal.create_paypal_map_lines_view |
||||
|
msgid "Download a bank statement from your bank and import it here." |
||||
|
msgstr "Descargue un extracto bancario desde su banco e impórtelo aquí." |
||||
|
|
||||
|
#. module: account_bank_statement_import_paypal |
||||
|
#: selection:account.bank.statement.import.paypal.map.line,field_to_assign:0 |
||||
|
msgid "Fee" |
||||
|
msgstr "Tarifa" |
||||
|
|
||||
|
#. module: account_bank_statement_import_paypal |
||||
|
#: model:ir.model.fields,field_description:account_bank_statement_import_paypal.field_account_bank_statement_import_paypal_map_line_sequence |
||||
|
msgid "Field number" |
||||
|
msgstr "Nº de campo" |
||||
|
|
||||
|
#. module: account_bank_statement_import_paypal |
||||
|
#: model:ir.model.fields,field_description:account_bank_statement_import_paypal.field_wizard_paypal_map_create_filename |
||||
|
msgid "Filename" |
||||
|
msgstr "Nombre de archivo" |
||||
|
|
||||
|
#. module: account_bank_statement_import_paypal |
||||
|
#: selection:account.bank.statement.import.paypal.map.line,field_to_assign:0 |
||||
|
msgid "From Email Address" |
||||
|
msgstr "Correo electrónico del remitente" |
||||
|
|
||||
|
#. module: account_bank_statement_import_paypal |
||||
|
#: selection:account.bank.statement.import.paypal.map.line,field_to_assign:0 |
||||
|
msgid "Gross" |
||||
|
msgstr "Bruto" |
||||
|
|
||||
|
#. module: account_bank_statement_import_paypal |
||||
|
#: model:ir.model.fields,field_description:account_bank_statement_import_paypal.field_account_bank_statement_import_paypal_map_line_name |
||||
|
msgid "Header Name" |
||||
|
msgstr "Nombre de la cabecera" |
||||
|
|
||||
|
#. module: account_bank_statement_import_paypal |
||||
|
#: code:addons/account_bank_statement_import_paypal/wizards/account_bank_statement_import_paypal.py:73 |
||||
|
#, python-format |
||||
|
msgid "Headers of file to import and Paypal map lines does not match." |
||||
|
msgstr "" |
||||
|
"La cabecera del archivo a importar y las lineas de la plantilla de Paypal no " |
||||
|
"coinciden." |
||||
|
|
||||
|
#. module: account_bank_statement_import_paypal |
||||
|
#: model:ir.model.fields,field_description:account_bank_statement_import_paypal.field_account_bank_statement_import_paypal_map_id |
||||
|
#: model:ir.model.fields,field_description:account_bank_statement_import_paypal.field_account_bank_statement_import_paypal_map_line_id |
||||
|
#: model:ir.model.fields,field_description:account_bank_statement_import_paypal.field_wizard_paypal_map_create_id |
||||
|
msgid "ID" |
||||
|
msgstr "ID" |
||||
|
|
||||
|
#. module: account_bank_statement_import_paypal |
||||
|
#: model:ir.model,name:account_bank_statement_import_paypal.model_account_bank_statement_import |
||||
|
msgid "Import Bank Statement" |
||||
|
msgstr "Importar Extracto Bancario" |
||||
|
|
||||
|
#. module: account_bank_statement_import_paypal |
||||
|
#: model:ir.ui.view,arch_db:account_bank_statement_import_paypal.create_paypal_map_lines_view |
||||
|
msgid "Import Paypal Map Lines" |
||||
|
msgstr "Importar las lineas de la plantilla de Paypal" |
||||
|
|
||||
|
#. module: account_bank_statement_import_paypal |
||||
|
#: selection:account.bank.statement.import.paypal.map.line,field_to_assign:0 |
||||
|
msgid "Invoice ID" |
||||
|
msgstr "Número de factura" |
||||
|
|
||||
|
#. module: account_bank_statement_import_paypal |
||||
|
#: model:ir.model,name:account_bank_statement_import_paypal.model_account_journal |
||||
|
msgid "Journal" |
||||
|
msgstr "Diario" |
||||
|
|
||||
|
#. module: account_bank_statement_import_paypal |
||||
|
#: model:ir.model.fields,field_description:account_bank_statement_import_paypal.field_account_bank_statement_import_paypal_map___last_update |
||||
|
#: model:ir.model.fields,field_description:account_bank_statement_import_paypal.field_account_bank_statement_import_paypal_map_line___last_update |
||||
|
#: model:ir.model.fields,field_description:account_bank_statement_import_paypal.field_wizard_paypal_map_create___last_update |
||||
|
msgid "Last Modified on" |
||||
|
msgstr "Última modificación en" |
||||
|
|
||||
|
#. module: account_bank_statement_import_paypal |
||||
|
#: model:ir.model.fields,field_description:account_bank_statement_import_paypal.field_account_bank_statement_import_paypal_map_line_write_uid |
||||
|
#: model:ir.model.fields,field_description:account_bank_statement_import_paypal.field_account_bank_statement_import_paypal_map_write_uid |
||||
|
#: model:ir.model.fields,field_description:account_bank_statement_import_paypal.field_wizard_paypal_map_create_write_uid |
||||
|
msgid "Last Updated by" |
||||
|
msgstr "Última actualización por" |
||||
|
|
||||
|
#. module: account_bank_statement_import_paypal |
||||
|
#: model:ir.model.fields,field_description:account_bank_statement_import_paypal.field_account_bank_statement_import_paypal_map_line_write_date |
||||
|
#: model:ir.model.fields,field_description:account_bank_statement_import_paypal.field_account_bank_statement_import_paypal_map_write_date |
||||
|
#: model:ir.model.fields,field_description:account_bank_statement_import_paypal.field_wizard_paypal_map_create_write_date |
||||
|
msgid "Last Updated on" |
||||
|
msgstr "Última actualización en" |
||||
|
|
||||
|
#. module: account_bank_statement_import_paypal |
||||
|
#: model:ir.model.fields,field_description:account_bank_statement_import_paypal.field_account_bank_statement_import_paypal_map_line_map_parent_id |
||||
|
msgid "Map Parent" |
||||
|
msgstr "Plantilla padre" |
||||
|
|
||||
|
#. module: account_bank_statement_import_paypal |
||||
|
#: model:ir.model.fields,field_description:account_bank_statement_import_paypal.field_account_bank_statement_import_paypal_map_map_line_ids |
||||
|
msgid "Map lines" |
||||
|
msgstr "Líneas de la plantilla" |
||||
|
|
||||
|
#. module: account_bank_statement_import_paypal |
||||
|
#: model:ir.ui.view,arch_db:account_bank_statement_import_paypal.statement_import_map_tax_form |
||||
|
msgid "Mapping Lines" |
||||
|
msgstr "Líneas de la plantilla" |
||||
|
|
||||
|
#. module: account_bank_statement_import_paypal |
||||
|
#: selection:account.bank.statement.import.paypal.map.line,field_to_assign:0 |
||||
|
#: model:ir.model.fields,field_description:account_bank_statement_import_paypal.field_account_bank_statement_import_paypal_map_name |
||||
|
msgid "Name" |
||||
|
msgstr "Nombre" |
||||
|
|
||||
|
#. module: account_bank_statement_import_paypal |
||||
|
#: selection:account.bank.statement.import.paypal.map.line,field_to_assign:0 |
||||
|
msgid "Origin Transaction ID" |
||||
|
msgstr "Id. de transacción" |
||||
|
|
||||
|
#. module: account_bank_statement_import_paypal |
||||
|
#: code:addons/account_bank_statement_import_paypal/wizards/account_bank_statement_import_paypal.py:226 |
||||
|
#, python-format |
||||
|
msgid "PAYPAL-COSTS" |
||||
|
msgstr "COSTES-PAYPAL" |
||||
|
|
||||
|
#. module: account_bank_statement_import_paypal |
||||
|
#: code:addons/account_bank_statement_import_paypal/wizards/account_bank_statement_import_paypal.py:191 |
||||
|
#, python-format |
||||
|
msgid "PayPal Import %s > %s" |
||||
|
msgstr "Importación de Paypal %s > %s" |
||||
|
|
||||
|
#. module: account_bank_statement_import_paypal |
||||
|
#: model:ir.model.fields,field_description:account_bank_statement_import_paypal.field_account_journal_paypal_map_id |
||||
|
#: model:ir.ui.view,arch_db:account_bank_statement_import_paypal.statement_import_map_tax_form |
||||
|
#: model:ir.ui.view,arch_db:account_bank_statement_import_paypal.statement_import_map_tax_tree |
||||
|
#: model:ir.ui.view,arch_db:account_bank_statement_import_paypal.view_account_journal_form_n43 |
||||
|
msgid "Paypal Map" |
||||
|
msgstr "Plantilla de Paypal" |
||||
|
|
||||
|
#. module: account_bank_statement_import_paypal |
||||
|
#: model:ir.actions.act_window,name:account_bank_statement_import_paypal.action_statement_import_paypal_mappging |
||||
|
#: model:ir.ui.menu,name:account_bank_statement_import_paypal.menu_statement_import_paypal_mapping |
||||
|
msgid "Paypal Mapping" |
||||
|
msgstr "Plantilla de Paypal" |
||||
|
|
||||
|
#. module: account_bank_statement_import_paypal |
||||
|
#: code:addons/account_bank_statement_import_paypal/wizards/account_bank_statement_import_paypal.py:225 |
||||
|
#, python-format |
||||
|
msgid "Paypal commissions" |
||||
|
msgstr "Tarifa de Paypal" |
||||
|
|
||||
|
#. module: account_bank_statement_import_paypal |
||||
|
#: model:ir.model.fields,field_description:account_bank_statement_import_paypal.field_account_bank_statement_import_paypal_map_id_4185 |
||||
|
msgid "Paypal map" |
||||
|
msgstr "Plantilla de Paypal" |
||||
|
|
||||
|
#. module: account_bank_statement_import_paypal |
||||
|
#: model:ir.ui.view,arch_db:account_bank_statement_import_paypal.statement_import_map_tax_line_form |
||||
|
msgid "Paypal mapping line" |
||||
|
msgstr "Línea de plantilla de Paypal" |
||||
|
|
||||
|
#. module: account_bank_statement_import_paypal |
||||
|
#: model:ir.ui.view,arch_db:account_bank_statement_import_paypal.statement_import_map_tax_line_tree |
||||
|
msgid "Paypal mapping lines" |
||||
|
msgstr "Líneas de plantilla de Paypal" |
||||
|
|
||||
|
#. module: account_bank_statement_import_paypal |
||||
|
#: model:ir.ui.view,arch_db:account_bank_statement_import_paypal.account_bank_statement_import_view |
||||
|
msgid "Paypal with Template:" |
||||
|
msgstr "Paypal con la plantilla:" |
||||
|
|
||||
|
#. module: account_bank_statement_import_paypal |
||||
|
#: model:ir.ui.view,arch_db:account_bank_statement_import_paypal.create_paypal_map_lines_view |
||||
|
msgid "" |
||||
|
"Select a Paypal bank statement file to create all the map lines from headers " |
||||
|
"file." |
||||
|
msgstr "" |
||||
|
"Seleccione un archivo de extracto bancario de Paypal para crear todas las " |
||||
|
"lineas de la plantilla a partir de la cabecera del archivo." |
||||
|
|
||||
|
#. module: account_bank_statement_import_paypal |
||||
|
#: model:ir.model.fields,field_description:account_bank_statement_import_paypal.field_account_bank_statement_import_paypal_map_line_field_to_assign |
||||
|
msgid "Statement Field to Assign" |
||||
|
msgstr "Campo del extracto a asignar" |
||||
|
|
||||
|
#. module: account_bank_statement_import_paypal |
||||
|
#: selection:account.bank.statement.import.paypal.map.line,field_to_assign:0 |
||||
|
msgid "Time" |
||||
|
msgstr "Hora" |
||||
|
|
||||
|
#. module: account_bank_statement_import_paypal |
||||
|
#: selection:account.bank.statement.import.paypal.map.line,field_to_assign:0 |
||||
|
msgid "Transaction ID" |
||||
|
msgstr "Id. de transacción" |
||||
|
|
||||
|
#. module: account_bank_statement_import_paypal |
||||
|
#: code:addons/account_bank_statement_import_paypal/wizards/account_bank_statement_import_paypal.py:100 |
||||
|
#, python-format |
||||
|
msgid "Value '%s' for the field '%s' on line %d, cannot be converted to float" |
||||
|
msgstr "" |
||||
|
"El valor '%s' del campo '%s' en la línea %d, no se puede convertir a float" |
||||
|
|
||||
|
#. module: account_bank_statement_import_paypal |
||||
|
#: code:addons/account_bank_statement_import_paypal/wizards/account_bank_statement_import_paypal.py:137 |
||||
|
#, python-format |
||||
|
msgid "You must run this wizard from the journal" |
||||
|
msgstr "Debe ejecutar este asistente des del diario" |
||||
|
|
||||
|
#. module: account_bank_statement_import_paypal |
||||
|
#: model:ir.model,name:account_bank_statement_import_paypal.model_account_bank_statement_import_paypal_map |
||||
|
msgid "account.bank.statement.import.paypal.map" |
||||
|
msgstr "account.bank.statement.import.paypal.map" |
||||
|
|
||||
|
#. module: account_bank_statement_import_paypal |
||||
|
#: model:ir.model,name:account_bank_statement_import_paypal.model_account_bank_statement_import_paypal_map_line |
||||
|
msgid "account.bank.statement.import.paypal.map.line" |
||||
|
msgstr "account.bank.statement.import.paypal.map.line" |
||||
|
|
||||
|
#. module: account_bank_statement_import_paypal |
||||
|
#: code:addons/account_bank_statement_import_paypal/wizards/account_bank_statement_import_paypal.py:122 |
||||
|
#, python-format |
||||
|
msgid "currency %s on line %d cannot be found in odoo" |
||||
|
msgstr "la monea %s de la línea %d no se puede encontrar en odoo" |
||||
|
|
||||
|
#. module: account_bank_statement_import_paypal |
||||
|
#: selection:account.bank.statement.import.paypal.map.line,date_format:0 |
||||
|
msgid "i.e. 12/15/2019" |
||||
|
msgstr "p.e. 12/15/2019" |
||||
|
|
||||
|
#. module: account_bank_statement_import_paypal |
||||
|
#: selection:account.bank.statement.import.paypal.map.line,date_format:0 |
||||
|
msgid "i.e. 15/12/2019" |
||||
|
msgstr "p.e. 15/12/2019" |
||||
|
|
||||
|
#. module: account_bank_statement_import_paypal |
||||
|
#: model:ir.model,name:account_bank_statement_import_paypal.model_wizard_paypal_map_create |
||||
|
msgid "wizard.paypal.map.create" |
||||
|
msgstr "wizard.paypal.map.create" |
@ -1 +1,2 @@ |
|||||
from . import account_bank_statement_import_paypal |
|
||||
|
from . import account_bank_statement_import_paypal_map |
||||
|
from . import account_journal |
@ -0,0 +1,64 @@ |
|||||
|
# Copyright 2019 Tecnativa - Vicent Cubells |
||||
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). |
||||
|
|
||||
|
from odoo import fields, models |
||||
|
|
||||
|
|
||||
|
class AccountBankStatementImportPaypalMap(models.Model): |
||||
|
_name = 'account.bank.statement.import.paypal.map' |
||||
|
|
||||
|
name = fields.Char( |
||||
|
required=True, |
||||
|
) |
||||
|
map_line_ids = fields.One2many( |
||||
|
comodel_name='account.bank.statement.import.paypal.map.line', |
||||
|
inverse_name='map_parent_id', |
||||
|
string="Map lines", |
||||
|
required=True, |
||||
|
copy=True, |
||||
|
) |
||||
|
|
||||
|
|
||||
|
class AccountBankStatementImportPaypalMapLIne(models.Model): |
||||
|
_name = 'account.bank.statement.import.paypal.map.line' |
||||
|
_order = "sequence asc, id asc" |
||||
|
|
||||
|
sequence = fields.Integer( |
||||
|
string="Field number", |
||||
|
required=True, |
||||
|
) |
||||
|
name = fields.Char( |
||||
|
string="Header Name", |
||||
|
required=True, |
||||
|
) |
||||
|
map_parent_id = fields.Many2one( |
||||
|
comodel_name='account.bank.statement.import.paypal.map', |
||||
|
required=True, |
||||
|
ondelete='cascade', |
||||
|
) |
||||
|
field_to_assign = fields.Selection( |
||||
|
selection=[ |
||||
|
('date', 'Date'), |
||||
|
('time', 'Time'), |
||||
|
('description', 'Description'), |
||||
|
('currency', 'Currency'), |
||||
|
('amount', 'Gross'), |
||||
|
('commission', 'Fee'), |
||||
|
('balance', 'Balance'), |
||||
|
('transaction_id', 'Transaction ID'), |
||||
|
('email', 'From Email Address'), |
||||
|
('partner_name', 'Name'), |
||||
|
('bank_name', 'Bank Name'), |
||||
|
('bank_account', 'Bank Account'), |
||||
|
('invoice_number', 'Invoice ID'), |
||||
|
('origin_transaction_id', 'Origin Transaction ID'), |
||||
|
], |
||||
|
string="Statement Field to Assign", |
||||
|
) |
||||
|
date_format = fields.Selection( |
||||
|
selection=[ |
||||
|
('%d/%m/%Y', 'i.e. 15/12/2019'), |
||||
|
('%m/%d/%Y', 'i.e. 12/15/2019'), |
||||
|
], |
||||
|
string="Date Format", |
||||
|
) |
@ -0,0 +1,13 @@ |
|||||
|
# Copyright 2019 Tecnativa - Vicent Cubells |
||||
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). |
||||
|
|
||||
|
from odoo import fields, models |
||||
|
|
||||
|
|
||||
|
class AccountJournal(models.Model): |
||||
|
_inherit = "account.journal" |
||||
|
|
||||
|
paypal_map_id = fields.Many2one( |
||||
|
comodel_name='account.bank.statement.import.paypal.map', |
||||
|
string='Paypal Map', |
||||
|
) |
@ -1,12 +1,12 @@ |
|||||
In the menu Accounting > Configuration > Accounting > Bank Accounts, |
|
||||
make sure that you have your Paypal bank account with the following parameters: |
|
||||
* Bank Account Type: Normal Bank Account |
|
||||
* Account Number: the email address associated with your Paypal account |
|
||||
* Account Journal: the journal associated to your Paypal account |
|
||||
|
* Create or go to a bank journal where you want to import Paypal statement. |
||||
|
* Edit that journal and set a Paypal map in **Paypal Map** section in **Advanced |
||||
|
Settings** tab. |
||||
|
|
||||
TIPS |
|
||||
~~~~ |
|
||||
For now only French and English report are supported. |
|
||||
For adding new support you just need to add your header in |
|
||||
model/account_bank_statement_import_paypal.py in the variables HEADERS. |
|
||||
Please help us and do a PR for adding new header ! Thanks |
|
||||
|
* Now you can import Paypal statements in that journal. |
||||
|
|
||||
|
Note: if existent Paypal Map does not fit to your file to import, you can |
||||
|
create another map in **Invoicing > Configuration > Accounting > Paypal |
||||
|
Mapping**. |
||||
|
|
||||
|
You can import headers from any Paypal file in **Action > Create Paypal Map |
||||
|
Lines** and set every line with which field of statement have to match. |
@ -1 +1,2 @@ |
|||||
This module allows you to import the Paypal CSV files in Odoo as bank statements. |
|
||||
|
This module allows you to import the Paypal CSV files in Odoo as bank |
||||
|
statements. |
@ -0,0 +1,3 @@ |
|||||
|
"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink" |
||||
|
access_account_bank_statement_import_paypal_map,Paypal map manager,model_account_bank_statement_import_paypal_map,account.group_account_manager,1,1,1,1 |
||||
|
access_account_bank_statement_import_paypal_map_line,Paypal map line manager,model_account_bank_statement_import_paypal_map_line,account.group_account_manager,1,1,1,1 |
@ -0,0 +1 @@ |
|||||
|
from . import test_paypal_statement_import |
@ -0,0 +1,3 @@ |
|||||
|
"Date","Time","Time Zone","Description","Currency","Gross","Fee ","Net","Balance","Transaction ID","From Email Address","Name","Bank Name","Bank Account","Shipping and Handling Amount","Sales Tax","Invoice ID","Reference Txn ID" |
||||
|
"12/15/2018","20:07:53","CET","Your best supplier","USD","-33,50","-2,3","-31,2","-31,2","53820712527632627","","John Doe","Bank of America","123456789","0","0","INV25","23" |
||||
|
"12/15/2018","22:07:53","CET","Your payment","USD","525","0","525","493,80","34731322767782103","","Agrolait","","","0","0","INV/2019/0003","24" |
@ -0,0 +1,54 @@ |
|||||
|
# Copyright 2019 Tecnativa - Vicent Cubells |
||||
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). |
||||
|
|
||||
|
import os |
||||
|
import base64 |
||||
|
from odoo.tests import common |
||||
|
|
||||
|
|
||||
|
class TestPaypalFile(common.SavepointCase): |
||||
|
@classmethod |
||||
|
def setUpClass(cls): |
||||
|
super(TestPaypalFile, cls).setUpClass() |
||||
|
|
||||
|
cls.map = cls.env['account.bank.statement.import.paypal.map'].create({ |
||||
|
'name': 'Paypal Map Test', |
||||
|
}) |
||||
|
cls.journal = cls.env['account.journal'].create({ |
||||
|
'name': 'Paypal Bank', |
||||
|
'type': 'bank', |
||||
|
'code': 'PYPAL', |
||||
|
}) |
||||
|
|
||||
|
def _do_import(self, file_name): |
||||
|
file_name = os.path.join(os.path.dirname(__file__), file_name) |
||||
|
return open(file_name).read() |
||||
|
|
||||
|
def test_import_header(self): |
||||
|
file = self._do_import('paypal_en.csv') |
||||
|
file = base64.b64encode(file.encode("utf-8")) |
||||
|
wizard = self.env['wizard.paypal.map.create'].with_context({ |
||||
|
'journal_id': self.journal.id, |
||||
|
'active_ids': [self.map.id], |
||||
|
}).create({'data_file': file}) |
||||
|
wizard.create_map_lines() |
||||
|
self.assertEqual(len(self.map.map_line_ids.ids), 18) |
||||
|
|
||||
|
def test_import_paypal_file(self): |
||||
|
# Current statements before to run the wizard |
||||
|
old_statements = self.env['account.bank.statement'].search([]) |
||||
|
# This journal is for Paypal statements |
||||
|
map = self.env.ref('account_bank_statement_import_paypal.paypal_map') |
||||
|
self.journal.paypal_map_id = map.id |
||||
|
file = self._do_import('paypal_en.csv') |
||||
|
file = base64.b64encode(file.encode("utf-8")) |
||||
|
wizard = self.env['account.bank.statement.import'].with_context({ |
||||
|
'journal_id': self.journal.id, |
||||
|
}).create({'data_file': file}) |
||||
|
wizard.import_file() |
||||
|
staments_now = self.env['account.bank.statement'].search([]) |
||||
|
statement = staments_now - old_statements |
||||
|
self.assertEqual(len(statement.line_ids), 3) |
||||
|
self.assertEqual(len(statement.mapped('line_ids').filtered( |
||||
|
lambda x: x.partner_id and x.account_id)), 1) |
||||
|
self.assertAlmostEqual(sum(statement.mapped('line_ids.amount')), 489.2) |
@ -0,0 +1,16 @@ |
|||||
|
<?xml version="1.0" encoding="utf-8"?> |
||||
|
<odoo> |
||||
|
|
||||
|
<record id="view_account_journal_form_n43" model="ir.ui.view"> |
||||
|
<field name="model">account.journal</field> |
||||
|
<field name="inherit_id" ref="account.view_account_journal_form"/> |
||||
|
<field name="arch" type="xml"> |
||||
|
<xpath expr="//page[@name='advanced_settings']/group" position="inside"> |
||||
|
<group string="Paypal Map" attrs="{'invisible': [('type','!=','bank')]}"> |
||||
|
<field name="paypal_map_id"/> |
||||
|
</group> |
||||
|
</xpath> |
||||
|
</field> |
||||
|
</record> |
||||
|
|
||||
|
</odoo> |
@ -0,0 +1,65 @@ |
|||||
|
<?xml version="1.0" encoding="utf-8"?> |
||||
|
<odoo> |
||||
|
|
||||
|
<record id="statement_import_map_tax_tree" model="ir.ui.view"> |
||||
|
<field name="model">account.bank.statement.import.paypal.map</field> |
||||
|
<field name="arch" type="xml"> |
||||
|
<tree string="Paypal Map"> |
||||
|
<field name="name"/> |
||||
|
</tree> |
||||
|
</field> |
||||
|
</record> |
||||
|
|
||||
|
<record id="statement_import_map_tax_form" model="ir.ui.view"> |
||||
|
<field name="model">account.bank.statement.import.paypal.map</field> |
||||
|
<field name="arch" type="xml"> |
||||
|
<form string="Paypal Map"> |
||||
|
<group> |
||||
|
<field name="name"/> |
||||
|
</group> |
||||
|
<separator string="Mapping Lines"/> |
||||
|
<field name="map_line_ids"/> |
||||
|
</form> |
||||
|
</field> |
||||
|
</record> |
||||
|
|
||||
|
<record id="statement_import_map_tax_line_tree" model="ir.ui.view"> |
||||
|
<field name="model">account.bank.statement.import.paypal.map.line</field> |
||||
|
<field name="arch" type="xml"> |
||||
|
<tree string="Paypal mapping lines" editable="bottom"> |
||||
|
<field name="sequence"/> |
||||
|
<field name="name"/> |
||||
|
<field name="field_to_assign"/> |
||||
|
<field name="date_format" attrs="{'readonly':[('field_to_assign','!=','date')], 'required':[('field_to_assign','=','date')]}"/> |
||||
|
</tree> |
||||
|
</field> |
||||
|
</record> |
||||
|
|
||||
|
<record id="statement_import_map_tax_line_form" model="ir.ui.view"> |
||||
|
<field name="model">account.bank.statement.import.paypal.map.line</field> |
||||
|
<field name="arch" type="xml"> |
||||
|
<form string="Paypal mapping line"> |
||||
|
<group> |
||||
|
<group> |
||||
|
<field name="name"/> |
||||
|
<field name="sequence"/> |
||||
|
<field name="field_to_assign"/> |
||||
|
</group> |
||||
|
</group> |
||||
|
</form> |
||||
|
</field> |
||||
|
</record> |
||||
|
|
||||
|
<record model="ir.actions.act_window" id="action_statement_import_paypal_mappging"> |
||||
|
<field name="name">Paypal Mapping</field> |
||||
|
<field name="res_model">account.bank.statement.import.paypal.map</field> |
||||
|
<field name="view_type">form</field> |
||||
|
<field name="view_mode">tree,form</field> |
||||
|
</record> |
||||
|
|
||||
|
<menuitem id="menu_statement_import_paypal_mapping" |
||||
|
parent="account.account_account_menu" |
||||
|
action="action_statement_import_paypal_mappging" |
||||
|
name="Paypal Mapping"/> |
||||
|
|
||||
|
</odoo> |
@ -0,0 +1,2 @@ |
|||||
|
from . import create_map_lines_from_file |
||||
|
from . import account_bank_statement_import_paypal |
@ -0,0 +1,14 @@ |
|||||
|
<?xml version="1.0" encoding="utf-8"?> |
||||
|
<odoo> |
||||
|
|
||||
|
<record id="account_bank_statement_import_view" model="ir.ui.view"> |
||||
|
<field name="model">account.bank.statement.import</field> |
||||
|
<field name="inherit_id" ref="account_bank_statement_import.account_bank_statement_import_view"/> |
||||
|
<field name="arch" type="xml"> |
||||
|
<xpath expr="//ul[@id='statement_format']" position="inside"> |
||||
|
<li>Paypal with Template: <field name="paypal_map_id"/></li> |
||||
|
</xpath> |
||||
|
</field> |
||||
|
</record> |
||||
|
|
||||
|
</odoo> |
@ -0,0 +1,38 @@ |
|||||
|
# Copyright 2019 Tecnativa - Vicent Cubells |
||||
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). |
||||
|
|
||||
|
import csv |
||||
|
import base64 |
||||
|
from odoo import api, fields, models |
||||
|
from io import StringIO |
||||
|
|
||||
|
|
||||
|
class WizardPaypalMapCreate(models.TransientModel): |
||||
|
_name = 'wizard.paypal.map.create' |
||||
|
|
||||
|
data_file = fields.Binary( |
||||
|
string='Bank Statement File', |
||||
|
required=True, |
||||
|
) |
||||
|
filename = fields.Char() |
||||
|
|
||||
|
@api.multi |
||||
|
def create_map_lines(self): |
||||
|
statement_obj = self.env['account.bank.statement.import.paypal.map'] |
||||
|
data_file = base64.b64decode(self.data_file) |
||||
|
if not isinstance(data_file, str): |
||||
|
data_file = data_file.decode('utf-8-sig').strip() |
||||
|
file = StringIO(data_file) |
||||
|
file.seek(0) |
||||
|
reader = csv.reader(file) |
||||
|
headers = [] |
||||
|
for row in reader: |
||||
|
headers = row |
||||
|
break |
||||
|
lines = [] |
||||
|
for idx, title in enumerate(headers): |
||||
|
lines.append((0, 0, {'sequence': idx, 'name': title})) |
||||
|
if lines: |
||||
|
for statement in statement_obj.browse( |
||||
|
self.env.context.get('active_ids')): |
||||
|
statement.map_line_ids = lines |
@ -0,0 +1,29 @@ |
|||||
|
<?xml version="1.0" encoding="utf-8"?> |
||||
|
<odoo> |
||||
|
|
||||
|
<record id="create_paypal_map_lines_view" model="ir.ui.view"> |
||||
|
<field name="name">Create Paypal Map Lines</field> |
||||
|
<field name="model">wizard.paypal.map.create</field> |
||||
|
<field name="arch" type="xml"> |
||||
|
<form string="Import Paypal Map Lines"> |
||||
|
<h2>Select a Paypal bank statement file to create all the map lines from headers file.</h2> |
||||
|
<p>Download a bank statement from your bank and import it here.</p> |
||||
|
<p>All the Paypal map lines will be created automatically.</p> |
||||
|
<field name="data_file" filename="filename" placeholder="Choose a file to import..."/> |
||||
|
<field name="filename" invisible="1"/> |
||||
|
<footer> |
||||
|
<button name="create_map_lines" string="Create Lines" type="object" class="btn-primary" /> |
||||
|
<button string="Cancel" class="btn-default" special="cancel"/> |
||||
|
</footer> |
||||
|
</form> |
||||
|
</field> |
||||
|
</record> |
||||
|
<act_window name="Create Paypal Map Lines" |
||||
|
res_model="wizard.paypal.map.create" |
||||
|
src_model="account.bank.statement.import.paypal.map" |
||||
|
view_mode="form" |
||||
|
target="new" |
||||
|
key2="client_action_multi" |
||||
|
id="action_create_paypal_map_lines"/> |
||||
|
|
||||
|
</odoo> |
Write
Preview
Loading…
Cancel
Save
Reference in new issue