Browse Source

[MIG] pos_payment_entries_globalization: Migration to 11.0

pull/325/head
David 5 years ago
parent
commit
2fe1d02b7a
  1. 81
      pos_payment_entries_globalization/README.rst
  2. 5
      pos_payment_entries_globalization/__manifest__.py
  3. 59
      pos_payment_entries_globalization/i18n/es.po
  4. 60
      pos_payment_entries_globalization/i18n/pos_payment_entries_globalization.pot
  5. 1
      pos_payment_entries_globalization/models/account_journal.py
  6. 8
      pos_payment_entries_globalization/models/pos_session.py
  7. 7
      pos_payment_entries_globalization/readme/CONFIGURE.rst
  8. 6
      pos_payment_entries_globalization/readme/CONTRIBUTORS.rst
  9. 5
      pos_payment_entries_globalization/readme/DESCRIPTION.rst
  10. 1
      pos_payment_entries_globalization/readme/USAGE.rst
  11. 1
      pos_payment_entries_globalization/tests/test_pos_payment_entries_globalization.py
  12. 2
      pos_payment_entries_globalization/views/account_journal_view.xml

81
pos_payment_entries_globalization/README.rst

@ -1,63 +1,98 @@
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
=================================
POS payment entries globalization
=================================
.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fpos-lightgray.png?logo=github
:target: https://github.com/OCA/pos/tree/11.0/pos_payment_entries_globalization
:alt: OCA/pos
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/pos-11-0/pos-11-0-pos_payment_entries_globalization
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
:target: https://runbot.odoo-community.org/runbot/184/11.0
:alt: Try me on Runbot
|badge1| |badge2| |badge3| |badge4| |badge5|
This module allows to globalize payment entries created by the POS.
In some cases, all banking transactions are received in a single bank statement line.
With this module, it's possible to reconcile this one line with the payment globalization line.
In some cases, all banking transactions are received in a single bank statement
line. With this module, it's possible to reconcile this one line with the
payment globalization line.
**Table of contents**
.. contents::
:local:
Configuration
=============
To configure this module, you need to:
* Configure globalize account and journal on POS payment methods (Account journal).
* Configure globalize account and journal on POS payment methods
(Account journal).
A globalization entry is generated for each globalization journal and each globalization account defined on payment methods.
A globalization entry is generated for each globalization journal and each
globalization account defined on payment methods.
Usage
=====
.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
:alt: Try me on Runbot
:target: https://runbot.odoo-community.org/runbot/184/10.0
For further information, please visit:
* https://www.odoo.com/forum/help-1
Now it's easier to reconcile bank transactions with PoS payments.
Bug Tracker
===========
Bugs are tracked on `GitHub Issues <https://github.com/OCA/pos/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed feedback
`here <https://github.com/OCA/pos/issues/new?body=module:%20pos_payment_entries_globalization%0Aversion:%208.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
If you spotted it first, help us smashing it by providing a detailed and welcomed
`feedback <https://github.com/OCA/pos/issues/new?body=module:%20pos_payment_entries_globalization%0Aversion:%2011.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
Do not contact contributors directly about support or help with technical issues.
Credits
=======
Authors
~~~~~~~
* ACSONE SA/NV
Contributors
------------
~~~~~~~~~~~~
* Adrien Peiffer <adrien.peiffer@acsone.eu>
* Meyomesse Gilles <meyomesse.gilles@gmail.com>
* `Tecnativa <https://www.tecnativa.com>`_
Maintainer
----------
* David Vidal <david.vidal@tecnativa.com>
* Rafael Blasco <rafael.blasco@tecnativa.com>
Maintainers
~~~~~~~~~~~
This module is maintained by the OCA.
.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org
This module is maintained by the OCA.
OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.
OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use.
This module is part of the `OCA/pos <https://github.com/OCA/pos/tree/11.0/pos_payment_entries_globalization>`_ project on GitHub.
To contribute to this module, please visit http://odoo-community.org.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

5
pos_payment_entries_globalization/__manifest__.py

@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
# Copyright 2015-2017 ACSONE SA/NV (<http://acsone.eu>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
{
@ -6,9 +5,9 @@
'summary': """Globalize POS Payment""",
'author': 'ACSONE SA/NV,'
'Odoo Community Association (OCA)',
'website': "http://acsone.eu",
'website': "http://github.com/OCA/pos",
'category': 'Point Of Sale',
'version': '10.0.1.0.0',
'version': '11.0.1.0.0',
'license': 'AGPL-3',
'depends': [
'point_of_sale',

59
pos_payment_entries_globalization/i18n/es.po

@ -0,0 +1,59 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * pos_payment_entries_globalization
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 11.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-02-21 09:03+0000\n"
"PO-Revision-Date: 2019-02-21 09:03+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
#. module: pos_payment_entries_globalization
#: model:ir.model,name:pos_payment_entries_globalization.model_account_journal
msgid "Journal"
msgstr "Diario"
#. module: pos_payment_entries_globalization
#: model:ir.ui.view,arch_db:pos_payment_entries_globalization.view_account_journal_pos_user_form
msgid "Payment Globalization"
msgstr "Globalización de pagos"
#. module: pos_payment_entries_globalization
#: code:addons/pos_payment_entries_globalization/models/pos_session.py:35
#: code:addons/pos_payment_entries_globalization/models/pos_session.py:59
#, python-format
msgid "Payment globalization"
msgstr "Globalización de pagos"
#. module: pos_payment_entries_globalization
#: code:addons/pos_payment_entries_globalization/models/pos_session.py:44
#, python-format
msgid "Payment globalization counterpart"
msgstr "Contrapartida de globalización de pagos"
#. module: pos_payment_entries_globalization
#: model:ir.model.fields,field_description:pos_payment_entries_globalization.field_account_journal_pos_payment_globalization
msgid "Pos Payment Globalization"
msgstr "Globalización de pagos en Punto de Venta"
#. module: pos_payment_entries_globalization
#: model:ir.model.fields,field_description:pos_payment_entries_globalization.field_account_journal_pos_payment_globalization_account
msgid "Pos Payment Globalization Account"
msgstr "Cuenta para globalización de pagos en Punto de Venta"
#. module: pos_payment_entries_globalization
#: model:ir.model.fields,field_description:pos_payment_entries_globalization.field_account_journal_pos_payment_globalization_journal
msgid "Pos Payment Globalization Journal"
msgstr "Diario para globalización de pagos en Punto de Venta"
#. module: pos_payment_entries_globalization
#: model:ir.model,name:pos_payment_entries_globalization.model_pos_session
msgid "pos.session"
msgstr "pos.session"

60
pos_payment_entries_globalization/i18n/pos_payment_entries_globalization.pot

@ -0,0 +1,60 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * pos_payment_entries_globalization
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 11.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-02-21 09:05+0000\n"
"PO-Revision-Date: 2019-02-21 09:05+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
#. module: pos_payment_entries_globalization
#: model:ir.model,name:pos_payment_entries_globalization.model_account_journal
msgid "Journal"
msgstr ""
#. module: pos_payment_entries_globalization
#: model:ir.ui.view,arch_db:pos_payment_entries_globalization.view_account_journal_pos_user_form
msgid "Payment Globalization"
msgstr ""
#. module: pos_payment_entries_globalization
#: code:addons/pos_payment_entries_globalization/models/pos_session.py:35
#: code:addons/pos_payment_entries_globalization/models/pos_session.py:59
#, python-format
msgid "Payment globalization"
msgstr ""
#. module: pos_payment_entries_globalization
#: code:addons/pos_payment_entries_globalization/models/pos_session.py:44
#, python-format
msgid "Payment globalization counterpart"
msgstr ""
#. module: pos_payment_entries_globalization
#: model:ir.model.fields,field_description:pos_payment_entries_globalization.field_account_journal_pos_payment_globalization
msgid "Pos Payment Globalization"
msgstr ""
#. module: pos_payment_entries_globalization
#: model:ir.model.fields,field_description:pos_payment_entries_globalization.field_account_journal_pos_payment_globalization_account
msgid "Pos Payment Globalization Account"
msgstr ""
#. module: pos_payment_entries_globalization
#: model:ir.model.fields,field_description:pos_payment_entries_globalization.field_account_journal_pos_payment_globalization_journal
msgid "Pos Payment Globalization Journal"
msgstr ""
#. module: pos_payment_entries_globalization
#: model:ir.model,name:pos_payment_entries_globalization.model_pos_session
msgid "pos.session"
msgstr ""

1
pos_payment_entries_globalization/models/account_journal.py

@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
# Copyright 2015-2017 ACSONE SA/NV (<http://acsone.eu>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

8
pos_payment_entries_globalization/models/pos_session.py

@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
# Copyright 2015-2017 ACSONE SA/NV (<http://acsone.eu>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
@ -75,7 +74,7 @@ class PosSession(models.Model):
self.ensure_one()
grouped_move_lines = self._get_move_lines_for_globalization()
to_reconcile = []
for key, lines in grouped_move_lines.iteritems():
for key, lines in grouped_move_lines.items():
global_account_id, global_journal_id = key
move = self._prepare_globalization_move(global_journal_id)
counterpart_debit = 0.0
@ -92,12 +91,13 @@ class PosSession(models.Model):
if counterpart_credit:
self._prepare_globalization_counterpart_line(
0.0, counterpart_credit, global_account_id, move)
move.post()
for lines in to_reconcile:
lines.reconcile()
@api.multi
def action_pos_session_closing_control(self):
super(PosSession, self).action_pos_session_closing_control()
def action_pos_session_close(self):
super(PosSession, self).action_pos_session_close()
for record in self:
# Call the method to generate globalization entries
record._generate_globalization_entries()

7
pos_payment_entries_globalization/readme/CONFIGURE.rst

@ -0,0 +1,7 @@
To configure this module, you need to:
* Configure globalize account and journal on POS payment methods
(Account journal).
A globalization entry is generated for each globalization journal and each
globalization account defined on payment methods.

6
pos_payment_entries_globalization/readme/CONTRIBUTORS.rst

@ -0,0 +1,6 @@
* Adrien Peiffer <adrien.peiffer@acsone.eu>
* Meyomesse Gilles <meyomesse.gilles@gmail.com>
* `Tecnativa <https://www.tecnativa.com>`_
* David Vidal <david.vidal@tecnativa.com>
* Rafael Blasco <rafael.blasco@tecnativa.com>

5
pos_payment_entries_globalization/readme/DESCRIPTION.rst

@ -0,0 +1,5 @@
This module allows to globalize payment entries created by the POS.
In some cases, all banking transactions are received in a single bank statement
line. With this module, it's possible to reconcile this one line with the
payment globalization line.

1
pos_payment_entries_globalization/readme/USAGE.rst

@ -0,0 +1 @@
Now it's easier to reconcile bank transactions with PoS payments.

1
pos_payment_entries_globalization/tests/test_pos_payment_entries_globalization.py

@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
# Copyright 2015 ACSONE SA/NV (<http://acsone.eu>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

2
pos_payment_entries_globalization/views/account_journal_view.xml

@ -8,7 +8,7 @@
<field name="model">account.journal</field>
<field name="inherit_id" ref="point_of_sale.view_account_journal_pos_user_form"/>
<field name="arch" type="xml">
<xpath expr="//group[field[@name='journal_user']]" position="after">
<xpath expr="//group[@name='amount_authorized']" position="after">
<group string="Payment Globalization" name="globalization">
<field name="pos_payment_globalization" />
<field name="pos_payment_globalization_account" attrs="{'required': [('pos_payment_globalization', '=', True)], 'invisible': [('pos_payment_globalization', '=', False)]}"/>

Loading…
Cancel
Save