From a2c84964af7739a5cfc02cf25af2136e1ca4e2d1 Mon Sep 17 00:00:00 2001 From: Andrius Preimantas Date: Tue, 19 May 2015 11:37:54 +0300 Subject: [PATCH 01/14] [INIT][pos_trade_receivable_autoreconcile] --- pos_trade_receivable_autoreconcile/README.rst | 54 +++++++++++++++++++ .../__init__.py | 5 ++ .../__openerp__.py | 18 +++++++ .../model/__init__.py | 5 ++ .../model/point_of_sale.py | 48 +++++++++++++++++ 5 files changed, 130 insertions(+) create mode 100644 pos_trade_receivable_autoreconcile/README.rst create mode 100644 pos_trade_receivable_autoreconcile/__init__.py create mode 100644 pos_trade_receivable_autoreconcile/__openerp__.py create mode 100644 pos_trade_receivable_autoreconcile/model/__init__.py create mode 100644 pos_trade_receivable_autoreconcile/model/point_of_sale.py diff --git a/pos_trade_receivable_autoreconcile/README.rst b/pos_trade_receivable_autoreconcile/README.rst new file mode 100644 index 00000000..e0f67d76 --- /dev/null +++ b/pos_trade_receivable_autoreconcile/README.rst @@ -0,0 +1,54 @@ +.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg + :alt: License: AGPL-3 + +POS Trade Receivable Autoreconcile +================================== + +This module reconciles "Trade Receivable" record created on Customer account +with Payments made by this customer. + +Example: + +* Product costs 8EUR but customer pays 10EUR by cash getting 2EUR in return. +In accounting it looks like this: +1) D: cash: 10 +2) C: account_receivable: 10 + +3) D: account_receivable: 2 +4) C: cash: 2 + +* When closing & validating a session system would create "Trade Receivable" +counterpart like this: +5) D: account_receivable: 8 +6) C: income_account: 8 + +When this module is installed 2), 3) and 5) items would be reconciled when +closing a session. + +Usage +===== + +* Install the module. No configuration needed. + +Credits +======= + +Contributors +------------ + +* Andrius Preimantas + +Maintainer +---------- + +.. image:: http://odoo-community.org/logo.png + :alt: Odoo Community Association + :target: http://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. + +To contribute to this module, please visit http://odoo-community.org. diff --git a/pos_trade_receivable_autoreconcile/__init__.py b/pos_trade_receivable_autoreconcile/__init__.py new file mode 100644 index 00000000..43414012 --- /dev/null +++ b/pos_trade_receivable_autoreconcile/__init__.py @@ -0,0 +1,5 @@ +# -*- coding: utf-8 -*- +# This file is part of OpenERP. The COPYRIGHT file at the top level of +# this module contains the full copyright notices and license terms. + +from . import model diff --git a/pos_trade_receivable_autoreconcile/__openerp__.py b/pos_trade_receivable_autoreconcile/__openerp__.py new file mode 100644 index 00000000..6244dc30 --- /dev/null +++ b/pos_trade_receivable_autoreconcile/__openerp__.py @@ -0,0 +1,18 @@ +# -*- coding: utf-8 -*- +# This file is part of OpenERP. The COPYRIGHT file at the top level of +# this module contains the full copyright notices and license terms. + +{ + 'name': 'POS Trade Receivable Autoreconcile', + 'version': '0.1', + 'author': 'Versada UAB', + 'category': 'Other', + 'website': 'http://www.versada.lt', + 'depends': [ + 'point_of_sale', + ], + 'data': [ + ], + 'installable': True, + 'application': False, +} diff --git a/pos_trade_receivable_autoreconcile/model/__init__.py b/pos_trade_receivable_autoreconcile/model/__init__.py new file mode 100644 index 00000000..e284389e --- /dev/null +++ b/pos_trade_receivable_autoreconcile/model/__init__.py @@ -0,0 +1,5 @@ +# -*- coding: utf-8 -*- +# This file is part of OpenERP. The COPYRIGHT file at the top level of +# this module contains the full copyright notices and license terms. + +from . import point_of_sale diff --git a/pos_trade_receivable_autoreconcile/model/point_of_sale.py b/pos_trade_receivable_autoreconcile/model/point_of_sale.py new file mode 100644 index 00000000..261a476b --- /dev/null +++ b/pos_trade_receivable_autoreconcile/model/point_of_sale.py @@ -0,0 +1,48 @@ +# -*- coding: utf-8 -*- +# This file is part of OpenERP. The COPYRIGHT file at the top level of +# this module contains the full copyright notices and license terms. + +from openerp import models + + +class POSOrder(models.Model): + _inherit = "pos.order" + + def _create_account_move_line(self, cr, uid, ids, session=None, + move_id=None, context=None): + to_ret = super(POSOrder, self)._create_account_move_line( + cr, uid, ids, session=session, move_id=move_id, context=context) + + account_def = self.pool.get('ir.property').get( + cr, uid, 'property_account_receivable', 'res.partner') + + grouped_data = {} + + for order in self.browse(cr, uid, ids, context=context): + current_company = order.sale_journal.company_id + order_account = ( + order.partner_id and + order.partner_id.property_account_receivable and + order.partner_id.property_account_receivable.id or + account_def and account_def.id or + current_company.account_receivable.id + ) + debit = ((order.amount_total > 0) and order.amount_total) or 0.0 + key = (order.partner_id.id, order_account, debit > 0) + grouped_data.setdefault(key, []) + for each in order.statement_ids: + if each.account_id.id != order_account: + continue + + for line in each.journal_entry_id.line_id: + if line.account_id.id == order_account: + grouped_data[key].append(line.id) + for key, value in grouped_data.iteritems(): + for line in order.account_move.line_id: + if line.account_id.id == key[1] and line.partner_id.id == key[0]: + grouped_data[key].append(line.id) + break + for key, value in grouped_data.iteritems(): + self.pool.get('account.move.line').reconcile_partial(cr, uid, value) + + return to_ret From 99357a768e70d1488c126427fbb974c998388bc6 Mon Sep 17 00:00:00 2001 From: Andrius Preimantas Date: Tue, 19 May 2015 11:47:43 +0300 Subject: [PATCH 02/14] [IMP] A few minor changes --- pos_trade_receivable_autoreconcile/README.rst | 2 ++ pos_trade_receivable_autoreconcile/__openerp__.py | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/pos_trade_receivable_autoreconcile/README.rst b/pos_trade_receivable_autoreconcile/README.rst index e0f67d76..267edf31 100644 --- a/pos_trade_receivable_autoreconcile/README.rst +++ b/pos_trade_receivable_autoreconcile/README.rst @@ -11,6 +11,7 @@ Example: * Product costs 8EUR but customer pays 10EUR by cash getting 2EUR in return. In accounting it looks like this: + 1) D: cash: 10 2) C: account_receivable: 10 @@ -19,6 +20,7 @@ In accounting it looks like this: * When closing & validating a session system would create "Trade Receivable" counterpart like this: + 5) D: account_receivable: 8 6) C: income_account: 8 diff --git a/pos_trade_receivable_autoreconcile/__openerp__.py b/pos_trade_receivable_autoreconcile/__openerp__.py index 6244dc30..e51d8cc4 100644 --- a/pos_trade_receivable_autoreconcile/__openerp__.py +++ b/pos_trade_receivable_autoreconcile/__openerp__.py @@ -5,8 +5,8 @@ { 'name': 'POS Trade Receivable Autoreconcile', 'version': '0.1', - 'author': 'Versada UAB', - 'category': 'Other', + 'author': 'Versada UAB,Odoo Community Association (OCA)', + 'category': 'Point Of Sale', 'website': 'http://www.versada.lt', 'depends': [ 'point_of_sale', From 191e71b2a60e54fe02c509c931486f1bdcf331c4 Mon Sep 17 00:00:00 2001 From: Andrius Preimantas Date: Wed, 20 May 2015 08:31:19 +0300 Subject: [PATCH 03/14] [FIX][flake8] E501 line too long --- pos_trade_receivable_autoreconcile/model/point_of_sale.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pos_trade_receivable_autoreconcile/model/point_of_sale.py b/pos_trade_receivable_autoreconcile/model/point_of_sale.py index 261a476b..d4f7a26a 100644 --- a/pos_trade_receivable_autoreconcile/model/point_of_sale.py +++ b/pos_trade_receivable_autoreconcile/model/point_of_sale.py @@ -39,10 +39,12 @@ class POSOrder(models.Model): grouped_data[key].append(line.id) for key, value in grouped_data.iteritems(): for line in order.account_move.line_id: - if line.account_id.id == key[1] and line.partner_id.id == key[0]: + if (line.account_id.id == key[1] and + line.partner_id.id == key[0]): grouped_data[key].append(line.id) break for key, value in grouped_data.iteritems(): - self.pool.get('account.move.line').reconcile_partial(cr, uid, value) + self.pool.get('account.move.line').reconcile_partial( + cr, uid, value) return to_ret From c68aa2f5cf0f4993f0b8996532d2fd3b964d35bf Mon Sep 17 00:00:00 2001 From: Andrius Preimantas Date: Wed, 20 May 2015 09:11:18 +0300 Subject: [PATCH 04/14] [FIX] Trade Receivable records was not properly matched --- pos_trade_receivable_autoreconcile/model/point_of_sale.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pos_trade_receivable_autoreconcile/model/point_of_sale.py b/pos_trade_receivable_autoreconcile/model/point_of_sale.py index d4f7a26a..4c99d3ad 100644 --- a/pos_trade_receivable_autoreconcile/model/point_of_sale.py +++ b/pos_trade_receivable_autoreconcile/model/point_of_sale.py @@ -39,8 +39,9 @@ class POSOrder(models.Model): grouped_data[key].append(line.id) for key, value in grouped_data.iteritems(): for line in order.account_move.line_id: - if (line.account_id.id == key[1] and - line.partner_id.id == key[0]): + if (line.partner_id.id == key[0] and + line.account_id.id == key[1] and + (line.debit > 0) == key[2]): grouped_data[key].append(line.id) break for key, value in grouped_data.iteritems(): From 2f6ee9973cdd401413840ddbc60232723dd548f6 Mon Sep 17 00:00:00 2001 From: Andrius Preimantas Date: Thu, 21 May 2015 10:59:33 +0300 Subject: [PATCH 05/14] [FIX] POS user might not have rights to reconcile entries. We do that as SUPERUSER --- pos_trade_receivable_autoreconcile/model/point_of_sale.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pos_trade_receivable_autoreconcile/model/point_of_sale.py b/pos_trade_receivable_autoreconcile/model/point_of_sale.py index 4c99d3ad..3bd12a08 100644 --- a/pos_trade_receivable_autoreconcile/model/point_of_sale.py +++ b/pos_trade_receivable_autoreconcile/model/point_of_sale.py @@ -2,7 +2,7 @@ # This file is part of OpenERP. The COPYRIGHT file at the top level of # this module contains the full copyright notices and license terms. -from openerp import models +from openerp import models, SUPERUSER_ID class POSOrder(models.Model): @@ -18,7 +18,7 @@ class POSOrder(models.Model): grouped_data = {} - for order in self.browse(cr, uid, ids, context=context): + for order in self.browse(cr, SUPERUSER_ID, ids, context=context): current_company = order.sale_journal.company_id order_account = ( order.partner_id and @@ -46,6 +46,6 @@ class POSOrder(models.Model): break for key, value in grouped_data.iteritems(): self.pool.get('account.move.line').reconcile_partial( - cr, uid, value) + cr, SUPERUSER_ID, value) return to_ret From 082b3fe53c651f74457a33c0dd13ecb2ded319a5 Mon Sep 17 00:00:00 2001 From: Andrius Preimantas Date: Thu, 21 May 2015 11:00:07 +0300 Subject: [PATCH 06/14] [FIX] Skip empty lines if any - reconcile_partial throws an error when passing empty list --- pos_trade_receivable_autoreconcile/model/point_of_sale.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pos_trade_receivable_autoreconcile/model/point_of_sale.py b/pos_trade_receivable_autoreconcile/model/point_of_sale.py index 3bd12a08..cf1ade22 100644 --- a/pos_trade_receivable_autoreconcile/model/point_of_sale.py +++ b/pos_trade_receivable_autoreconcile/model/point_of_sale.py @@ -45,6 +45,8 @@ class POSOrder(models.Model): grouped_data[key].append(line.id) break for key, value in grouped_data.iteritems(): + if not value: + continue self.pool.get('account.move.line').reconcile_partial( cr, SUPERUSER_ID, value) From 44f0b0d97c14b041d0213cf3124ff043ca6053c3 Mon Sep 17 00:00:00 2001 From: Andrius Preimantas Date: Thu, 18 Jun 2015 11:08:38 +0300 Subject: [PATCH 07/14] [FIX][pos_trade_receivable_autoreconcile] Only reconcile Trade receivable when it's valid --- pos_trade_receivable_autoreconcile/model/point_of_sale.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pos_trade_receivable_autoreconcile/model/point_of_sale.py b/pos_trade_receivable_autoreconcile/model/point_of_sale.py index cf1ade22..5d457e4f 100644 --- a/pos_trade_receivable_autoreconcile/model/point_of_sale.py +++ b/pos_trade_receivable_autoreconcile/model/point_of_sale.py @@ -35,7 +35,7 @@ class POSOrder(models.Model): continue for line in each.journal_entry_id.line_id: - if line.account_id.id == order_account: + if line.account_id.id == order_account and line.state == 'valid': grouped_data[key].append(line.id) for key, value in grouped_data.iteritems(): for line in order.account_move.line_id: From c904c0bd7a305717186158f469c40268e23d5de5 Mon Sep 17 00:00:00 2001 From: Andrius Preimantas Date: Thu, 18 Jun 2015 11:17:04 +0300 Subject: [PATCH 08/14] [FIX][pos_trade_receivable_autoreconcile] One more check for valid move related to previous commit --- pos_trade_receivable_autoreconcile/model/point_of_sale.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pos_trade_receivable_autoreconcile/model/point_of_sale.py b/pos_trade_receivable_autoreconcile/model/point_of_sale.py index 5d457e4f..d5dcf484 100644 --- a/pos_trade_receivable_autoreconcile/model/point_of_sale.py +++ b/pos_trade_receivable_autoreconcile/model/point_of_sale.py @@ -41,7 +41,8 @@ class POSOrder(models.Model): for line in order.account_move.line_id: if (line.partner_id.id == key[0] and line.account_id.id == key[1] and - (line.debit > 0) == key[2]): + (line.debit > 0) == key[2] and + line.state == 'valid'): grouped_data[key].append(line.id) break for key, value in grouped_data.iteritems(): From bbe303c7455e44f49eade9ec3e887898a29de1e7 Mon Sep 17 00:00:00 2001 From: Andrius Preimantas Date: Fri, 4 Sep 2015 09:25:58 +0300 Subject: [PATCH 09/14] [FIX][pos_trade_receivable_autoreconcile] Flake8 issue --- pos_trade_receivable_autoreconcile/model/point_of_sale.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pos_trade_receivable_autoreconcile/model/point_of_sale.py b/pos_trade_receivable_autoreconcile/model/point_of_sale.py index d5dcf484..af18c9c6 100644 --- a/pos_trade_receivable_autoreconcile/model/point_of_sale.py +++ b/pos_trade_receivable_autoreconcile/model/point_of_sale.py @@ -35,7 +35,8 @@ class POSOrder(models.Model): continue for line in each.journal_entry_id.line_id: - if line.account_id.id == order_account and line.state == 'valid': + if (line.account_id.id == order_account and + line.state == 'valid'): grouped_data[key].append(line.id) for key, value in grouped_data.iteritems(): for line in order.account_move.line_id: From 1d589c2c6af45eb83930acdb3279684d6277cf8a Mon Sep 17 00:00:00 2001 From: Andrius Preimantas Date: Fri, 4 Sep 2015 09:30:31 +0300 Subject: [PATCH 10/14] [IMP][pos_trade_receivable_autoreconcile] ACL for pos user to reconcile entries Do not reconcile as SUPERUSER --- pos_trade_receivable_autoreconcile/README.rst | 2 ++ pos_trade_receivable_autoreconcile/__openerp__.py | 1 + pos_trade_receivable_autoreconcile/model/point_of_sale.py | 6 +++--- .../security/ir.model.access.csv | 2 ++ 4 files changed, 8 insertions(+), 3 deletions(-) create mode 100644 pos_trade_receivable_autoreconcile/security/ir.model.access.csv diff --git a/pos_trade_receivable_autoreconcile/README.rst b/pos_trade_receivable_autoreconcile/README.rst index 267edf31..4314ef98 100644 --- a/pos_trade_receivable_autoreconcile/README.rst +++ b/pos_trade_receivable_autoreconcile/README.rst @@ -27,6 +27,8 @@ counterpart like this: When this module is installed 2), 3) and 5) items would be reconciled when closing a session. +Module also grants access rights for POS users to create reconciliation records + Usage ===== diff --git a/pos_trade_receivable_autoreconcile/__openerp__.py b/pos_trade_receivable_autoreconcile/__openerp__.py index e51d8cc4..b4eef227 100644 --- a/pos_trade_receivable_autoreconcile/__openerp__.py +++ b/pos_trade_receivable_autoreconcile/__openerp__.py @@ -12,6 +12,7 @@ 'point_of_sale', ], 'data': [ + 'security/ir.model.access.csv', ], 'installable': True, 'application': False, diff --git a/pos_trade_receivable_autoreconcile/model/point_of_sale.py b/pos_trade_receivable_autoreconcile/model/point_of_sale.py index af18c9c6..331399be 100644 --- a/pos_trade_receivable_autoreconcile/model/point_of_sale.py +++ b/pos_trade_receivable_autoreconcile/model/point_of_sale.py @@ -2,7 +2,7 @@ # This file is part of OpenERP. The COPYRIGHT file at the top level of # this module contains the full copyright notices and license terms. -from openerp import models, SUPERUSER_ID +from openerp import models class POSOrder(models.Model): @@ -18,7 +18,7 @@ class POSOrder(models.Model): grouped_data = {} - for order in self.browse(cr, SUPERUSER_ID, ids, context=context): + for order in self.browse(cr, uid, ids, context=context): current_company = order.sale_journal.company_id order_account = ( order.partner_id and @@ -50,6 +50,6 @@ class POSOrder(models.Model): if not value: continue self.pool.get('account.move.line').reconcile_partial( - cr, SUPERUSER_ID, value) + cr, uid, value) return to_ret diff --git a/pos_trade_receivable_autoreconcile/security/ir.model.access.csv b/pos_trade_receivable_autoreconcile/security/ir.model.access.csv new file mode 100644 index 00000000..e1ca47c6 --- /dev/null +++ b/pos_trade_receivable_autoreconcile/security/ir.model.access.csv @@ -0,0 +1,2 @@ +id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink +access_account_move_reconcile,account.move.reconcile,account.model_account_move_reconcile,point_of_sale.group_pos_user,1,1,1,0 From 79989f0cdb1a0c225cb0da8a0267de3f877777ba Mon Sep 17 00:00:00 2001 From: Andrius Preimantas Date: Thu, 24 Sep 2015 09:41:40 +0300 Subject: [PATCH 11/14] [IMP][pos_trade_receivable_autoreconcile] Update README.rst according to latest template --- pos_trade_receivable_autoreconcile/README.rst | 42 +++++++++++++++++-- 1 file changed, 38 insertions(+), 4 deletions(-) diff --git a/pos_trade_receivable_autoreconcile/README.rst b/pos_trade_receivable_autoreconcile/README.rst index 4314ef98..7f693bbe 100644 --- a/pos_trade_receivable_autoreconcile/README.rst +++ b/pos_trade_receivable_autoreconcile/README.rst @@ -1,6 +1,8 @@ .. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg - :alt: License: AGPL-3 + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 +================================== POS Trade Receivable Autoreconcile ================================== @@ -29,10 +31,42 @@ closing a session. Module also grants access rights for POS users to create reconciliation records +Installation +============ + +To install this module, you need to: + +* Click on Install button + +Configuration +============= + +No additional configuration is needed. + Usage ===== -* Install the module. No configuration needed. +To use this module, you need to: + +* operate your POS as usual + +For further information, please visit: + +* https://www.odoo.com/forum/help-1 + +Known issues / Roadmap +====================== + +* No bugs reported + +Bug Tracker +=========== + +Bugs are tracked on `GitHub 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 `_. + Credits ======= @@ -45,9 +79,9 @@ Contributors Maintainer ---------- -.. image:: http://odoo-community.org/logo.png +.. image:: https://odoo-community.org/logo.png :alt: Odoo Community Association - :target: http://odoo-community.org + :target: https://odoo-community.org This module is maintained by the OCA. From 1cf3f8750dff9f516d775d5abb5571b864a9b84d Mon Sep 17 00:00:00 2001 From: Andrius Preimantas Date: Thu, 24 Sep 2015 09:42:56 +0300 Subject: [PATCH 12/14] [IMP][pos_trade_receivable_autoreconcile] .py file header update --- .../__init__.py | 24 ++++++++++++++++--- .../__openerp__.py | 24 ++++++++++++++++--- .../model/__init__.py | 24 ++++++++++++++++--- .../model/point_of_sale.py | 24 ++++++++++++++++--- 4 files changed, 84 insertions(+), 12 deletions(-) diff --git a/pos_trade_receivable_autoreconcile/__init__.py b/pos_trade_receivable_autoreconcile/__init__.py index 43414012..ad75e006 100644 --- a/pos_trade_receivable_autoreconcile/__init__.py +++ b/pos_trade_receivable_autoreconcile/__init__.py @@ -1,5 +1,23 @@ -# -*- coding: utf-8 -*- -# This file is part of OpenERP. The COPYRIGHT file at the top level of -# this module contains the full copyright notices and license terms. +# -*- encoding: utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Management Solution +# This module copyright (C) 2015 UAB Versada +# (). +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################## from . import model diff --git a/pos_trade_receivable_autoreconcile/__openerp__.py b/pos_trade_receivable_autoreconcile/__openerp__.py index b4eef227..9f8fb9a9 100644 --- a/pos_trade_receivable_autoreconcile/__openerp__.py +++ b/pos_trade_receivable_autoreconcile/__openerp__.py @@ -1,6 +1,24 @@ -# -*- coding: utf-8 -*- -# This file is part of OpenERP. The COPYRIGHT file at the top level of -# this module contains the full copyright notices and license terms. +# -*- encoding: utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Management Solution +# This module copyright (C) 2015 UAB Versada +# (). +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################## { 'name': 'POS Trade Receivable Autoreconcile', diff --git a/pos_trade_receivable_autoreconcile/model/__init__.py b/pos_trade_receivable_autoreconcile/model/__init__.py index e284389e..236f7c2f 100644 --- a/pos_trade_receivable_autoreconcile/model/__init__.py +++ b/pos_trade_receivable_autoreconcile/model/__init__.py @@ -1,5 +1,23 @@ -# -*- coding: utf-8 -*- -# This file is part of OpenERP. The COPYRIGHT file at the top level of -# this module contains the full copyright notices and license terms. +# -*- encoding: utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Management Solution +# This module copyright (C) 2015 UAB Versada +# (). +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################## from . import point_of_sale diff --git a/pos_trade_receivable_autoreconcile/model/point_of_sale.py b/pos_trade_receivable_autoreconcile/model/point_of_sale.py index 331399be..58a5d7a9 100644 --- a/pos_trade_receivable_autoreconcile/model/point_of_sale.py +++ b/pos_trade_receivable_autoreconcile/model/point_of_sale.py @@ -1,6 +1,24 @@ -# -*- coding: utf-8 -*- -# This file is part of OpenERP. The COPYRIGHT file at the top level of -# this module contains the full copyright notices and license terms. +# -*- encoding: utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Management Solution +# This module copyright (C) 2015 UAB Versada +# (). +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################## from openerp import models From c6979778b654a4c24653c2ec42a9ac524c4cf22a Mon Sep 17 00:00:00 2001 From: Andrius Preimantas Date: Mon, 28 Sep 2015 08:58:48 +0300 Subject: [PATCH 13/14] [IMP][pos_autoreconcile] Rename pos_trade_receivable_autoreconcile to pos_autoreconcile --- .../README.rst | 0 .../__init__.py | 0 .../__openerp__.py | 0 .../model/__init__.py | 0 .../model/point_of_sale.py | 0 .../security/ir.model.access.csv | 0 6 files changed, 0 insertions(+), 0 deletions(-) rename {pos_trade_receivable_autoreconcile => pos_autoreconcile}/README.rst (100%) rename {pos_trade_receivable_autoreconcile => pos_autoreconcile}/__init__.py (100%) rename {pos_trade_receivable_autoreconcile => pos_autoreconcile}/__openerp__.py (100%) rename {pos_trade_receivable_autoreconcile => pos_autoreconcile}/model/__init__.py (100%) rename {pos_trade_receivable_autoreconcile => pos_autoreconcile}/model/point_of_sale.py (100%) rename {pos_trade_receivable_autoreconcile => pos_autoreconcile}/security/ir.model.access.csv (100%) diff --git a/pos_trade_receivable_autoreconcile/README.rst b/pos_autoreconcile/README.rst similarity index 100% rename from pos_trade_receivable_autoreconcile/README.rst rename to pos_autoreconcile/README.rst diff --git a/pos_trade_receivable_autoreconcile/__init__.py b/pos_autoreconcile/__init__.py similarity index 100% rename from pos_trade_receivable_autoreconcile/__init__.py rename to pos_autoreconcile/__init__.py diff --git a/pos_trade_receivable_autoreconcile/__openerp__.py b/pos_autoreconcile/__openerp__.py similarity index 100% rename from pos_trade_receivable_autoreconcile/__openerp__.py rename to pos_autoreconcile/__openerp__.py diff --git a/pos_trade_receivable_autoreconcile/model/__init__.py b/pos_autoreconcile/model/__init__.py similarity index 100% rename from pos_trade_receivable_autoreconcile/model/__init__.py rename to pos_autoreconcile/model/__init__.py diff --git a/pos_trade_receivable_autoreconcile/model/point_of_sale.py b/pos_autoreconcile/model/point_of_sale.py similarity index 100% rename from pos_trade_receivable_autoreconcile/model/point_of_sale.py rename to pos_autoreconcile/model/point_of_sale.py diff --git a/pos_trade_receivable_autoreconcile/security/ir.model.access.csv b/pos_autoreconcile/security/ir.model.access.csv similarity index 100% rename from pos_trade_receivable_autoreconcile/security/ir.model.access.csv rename to pos_autoreconcile/security/ir.model.access.csv From 978005ccab46a1b57df4ab4f1404d9f97e2868c2 Mon Sep 17 00:00:00 2001 From: Andrius Preimantas Date: Mon, 28 Sep 2015 09:02:41 +0300 Subject: [PATCH 14/14] [IMP][pos_autoreconcile] Update README and __openerp__ for autoreconcile feature --- pos_autoreconcile/README.rst | 14 +++++++------- pos_autoreconcile/__openerp__.py | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/pos_autoreconcile/README.rst b/pos_autoreconcile/README.rst index 7f693bbe..4e5fd867 100644 --- a/pos_autoreconcile/README.rst +++ b/pos_autoreconcile/README.rst @@ -2,14 +2,14 @@ :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html :alt: License: AGPL-3 -================================== -POS Trade Receivable Autoreconcile -================================== +================= +POS Autoreconcile +================= -This module reconciles "Trade Receivable" record created on Customer account -with Payments made by this customer. +Module reconciles Invoices and "Trade Receivable" records with payments made by +related Customer. -Example: +Example of "Trade Receivable" reconciliation: * Product costs 8EUR but customer pays 10EUR by cash getting 2EUR in return. In accounting it looks like this: @@ -89,4 +89,4 @@ 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. -To contribute to this module, please visit http://odoo-community.org. +To contribute to this module, please visit http://odoo-community.org. \ No newline at end of file diff --git a/pos_autoreconcile/__openerp__.py b/pos_autoreconcile/__openerp__.py index 9f8fb9a9..8e08a88a 100644 --- a/pos_autoreconcile/__openerp__.py +++ b/pos_autoreconcile/__openerp__.py @@ -21,7 +21,7 @@ ############################################################################## { - 'name': 'POS Trade Receivable Autoreconcile', + 'name': 'POS Autoreconcile', 'version': '0.1', 'author': 'Versada UAB,Odoo Community Association (OCA)', 'category': 'Point Of Sale',