diff --git a/pos_debt_notebook/README.rst b/pos_debt_notebook/README.rst index c59bb20a44..885463a26f 100644 --- a/pos_debt_notebook/README.rst +++ b/pos_debt_notebook/README.rst @@ -53,9 +53,9 @@ Sponsors Further information =================== -Demo: http://runbot.it-projects.info/demo/pos-addons/9.0 +Demo: http://runbot.it-projects.info/demo/pos-addons/11.0 -HTML Description: https://apps.odoo.com/apps/modules/9.0/pos_debt_notebook/ +HTML Description: https://apps.odoo.com/apps/modules/11.0/pos_debt_notebook/ Usage instructions: ``__ diff --git a/pos_debt_notebook/__manifest__.py b/pos_debt_notebook/__manifest__.py index 12f54a383f..56b58510eb 100644 --- a/pos_debt_notebook/__manifest__.py +++ b/pos_debt_notebook/__manifest__.py @@ -15,7 +15,7 @@ 'category': 'Point Of Sale', 'live_test_url': 'http://apps.it-projects.info/shop/product/pos-debt-notebook?version=11.0', "images": ['images/debt_notebook.png'], - 'version': '11.0.5.3.0', + 'version': '11.0.5.3.1', 'author': 'IT-Projects LLC, Ivan Yelizariev', "support": "pos@it-projects.info", 'website': 'https://it-projects.info', diff --git a/pos_debt_notebook/doc/changelog.rst b/pos_debt_notebook/doc/changelog.rst index 9f72560237..7002749253 100644 --- a/pos_debt_notebook/doc/changelog.rst +++ b/pos_debt_notebook/doc/changelog.rst @@ -1,14 +1,22 @@ +`5.3.1` +------- + +- **FIX:** with installed pos_journal_pin, pos_invoice_postponed demo-user can't create pos-session + `5.3.0` ------- + - **Improvement:** New Balance is amount for selected journal, not for total Credits. `5.2.0` ------- + - **ADD:** Button on the ``Write-off Credits`` form. Adds all partners with debt according to the selected journal - **ADD:** Availability to write-off credits via ``Manual Credit Updates`` `5.1.4` ------- + - **FIX:** Payment mistakes on in case SERIALIZATION_FAILURE in order processing `5.1.4` @@ -17,10 +25,12 @@ `5.1.3` ------- + - **FIX:** Error related to pos loading with the lack of customers `5.1.2` ------- + - **FIX:** Availability to buy credit top-up products with discount credits - **FIX:** Error related to automatic receipt printing - **ADD:** Mandatory Payment Method selection for return orders @@ -30,10 +40,12 @@ `5.1.1` ------- + - **FIX:** Compatibility with pos_orders_history_return module `5.1.0` ------- + - **NEW:** Wizard allow to create invoices for sets of partners: `Balance update`, `New Balance` - **FIX:** Error related to paying with not discount credit journals in POS - **FIX:** Invoices paid with credit journals now counts in partner debts diff --git a/pos_debt_notebook/models.py b/pos_debt_notebook/models.py index 146b501cef..155241a937 100644 --- a/pos_debt_notebook/models.py +++ b/pos_debt_notebook/models.py @@ -254,7 +254,7 @@ def init_debt_journal(self): # Check if the debt journal is created already for the company. return - account_obj = self.env['account.account'] + account_obj = self.env['account.account'].sudo() debt_account_old_version = account_obj.search([ ('code', '=', 'XDEBT'), ('company_id', '=', user.company_id.id)]) if debt_account_old_version: @@ -275,7 +275,7 @@ def init_debt_journal(self): }) default_debt_limit = 0 - demo_is_on = self.env['ir.module.module'].search([('name', '=', 'pos_debt_notebook')]).demo + demo_is_on = self.env['ir.module.module'].sudo().search([('name', '=', 'pos_debt_notebook')]).demo if demo_is_on: self.create_demo_debt_journals(user, debt_account) default_debt_limit = 1000 @@ -332,7 +332,7 @@ def init_debt_journal(self): 'statement_ids': statement, }) if demo_is_on: - self.env.ref('pos_debt_notebook.product_credit_product').write({ + self.env.ref('pos_debt_notebook.product_credit_product').sudo().write({ 'credit_product': debt_journal.id }) @@ -344,7 +344,7 @@ def create_journal(self, vals): _logger.info("Creating '" + vals['journal_name'] + "' journal") user = vals['user'] debt_account = vals['debt_account'] - new_sequence = self.env['ir.sequence'].create({ + new_sequence = self.env['ir.sequence'].sudo().create({ 'name': vals['sequence_name'] + str(user.company_id.id), 'padding': 3, 'prefix': vals['prefix'] + str(user.company_id.id), @@ -356,7 +356,7 @@ def create_journal(self, vals): 'res_id': new_sequence.id, 'noupdate': vals['noupdate'], # If it's False, target record (res_id) will be removed while module update }) - debt_journal = self.env['account.journal'].create({ + debt_journal = self.env['account.journal'].sudo().create({ 'name': vals['journal_name'], 'code': vals['code'], 'type': vals['type'], diff --git a/pos_debt_notebook/tests/test_pos_debt.py b/pos_debt_notebook/tests/test_pos_debt.py index f8e2c625c7..3bb1fc1a05 100644 --- a/pos_debt_notebook/tests/test_pos_debt.py +++ b/pos_debt_notebook/tests/test_pos_debt.py @@ -19,6 +19,6 @@ def test_pos_debt(self): # without a delay there might be problems on the steps whilst opening a POS # caused by a not yet loaded button's action self.phantom_js("/web", - "odoo.__DEBUG__.services['web_tour.tour'].run('tour_pos_debt_notebook', 1000)", + "odoo.__DEBUG__.services['web_tour.tour'].run('tour_pos_debt_notebook', 500)", "odoo.__DEBUG__.services['web_tour.tour'].tours.tour_pos_debt_notebook.ready", login="admin", timeout=140) diff --git a/pos_invoice_postponed/__manifest__.py b/pos_invoice_postponed/__manifest__.py index 5edad4433e..cf41852c95 100644 --- a/pos_invoice_postponed/__manifest__.py +++ b/pos_invoice_postponed/__manifest__.py @@ -5,9 +5,9 @@ "name": """Creation of Postponed invoices in POS""", "summary": """This module allows the usage of a regular POS order payment process to create an invoice to be paid later""", "category": "Point of Sale", - # "live_test_url": "http://apps.it-projects.info/shop/product/DEMO-URL?version=10.0", + # "live_test_url": "http://apps.it-projects.info/shop/product/DEMO-URL?version=11.0", "images": ['images/postponed2.jpg'], - "version": "11.0.1.0.0", + "version": "11.0.1.0.1", "application": False, "author": "IT-Projects LLC, Kolushov Alexandr", diff --git a/pos_invoice_postponed/doc/changelog.rst b/pos_invoice_postponed/doc/changelog.rst index 5583eb326a..34d1378a86 100644 --- a/pos_invoice_postponed/doc/changelog.rst +++ b/pos_invoice_postponed/doc/changelog.rst @@ -1,3 +1,8 @@ +`1.0.1` +------- + +- **Fix:** Creating of session by non-administrators + `1.0.0` ------- diff --git a/pos_invoice_postponed/models/models.py b/pos_invoice_postponed/models/models.py index 70547901f0..06b4868e5c 100644 --- a/pos_invoice_postponed/models/models.py +++ b/pos_invoice_postponed/models/models.py @@ -131,7 +131,7 @@ def init_postponed_journal(self): def _create_postponed_journal(self, vals): user = self.env.user - new_sequence = self.env['ir.sequence'].create({ + new_sequence = self.env['ir.sequence'].sudo().create({ 'name': vals['sequence_name'] + str(user.company_id.id), 'padding': 3, 'prefix': vals['prefix'] + str(user.company_id.id), @@ -143,7 +143,7 @@ def _create_postponed_journal(self, vals): 'res_id': new_sequence.id, 'noupdate': True, # If it's False, target record (res_id) will be removed while module update }) - pin_journal = self.env['account.journal'].create({ + pin_journal = self.env['account.journal'].sudo().create({ 'name': vals['journal_name'], 'code': vals['code'], 'type': vals['type'], diff --git a/pos_invoice_postponed/tests/test_default.py b/pos_invoice_postponed/tests/test_default.py index cad470bba0..d0ac85e570 100644 --- a/pos_invoice_postponed/tests/test_default.py +++ b/pos_invoice_postponed/tests/test_default.py @@ -9,12 +9,11 @@ @odoo.tests.common.post_install(True) class TestUi(odoo.tests.HttpCase): - def test_01_pos_postponed_invoice(self): - + def main(self, login): self.phantom_js('/pos/web?m=1', "odoo.__DEBUG__.services['web_tour.tour'].run('pos_invoice_postponed_tour', 1000)", "odoo.__DEBUG__.services['web_tour.tour'].tours.pos_invoice_postponed_tour.ready", - login="admin", timeout=240) + login=login, timeout=240) cr = self.registry.cursor() cr.execute('select "id" from "pos_order" order by "id" desc limit 1') @@ -25,3 +24,9 @@ def test_01_pos_postponed_invoice(self): self.assertEqual(len(order.statement_ids), 0, 'Number of statements are %s expected %s' % (len(order.statement_ids), 0)) self.assertEqual(order.amount_paid, 0, 'Amount paid is %s expected %s' % (order.amount_paid, 0)) cr.release() + + def test_01_pos_postponed_invoice(self): + self.main("admin") + + def test_02_pos_postponed_invoice(self): + self.main("demo") diff --git a/pos_journal_pin/README.rst b/pos_journal_pin/README.rst index b97436d05b..67af1087db 100644 --- a/pos_journal_pin/README.rst +++ b/pos_journal_pin/README.rst @@ -14,7 +14,6 @@ Credits Contributors ------------ * `Kolushov Alexandr `__ -* `Kildebekov Anvar `__ Sponsors -------- diff --git a/pos_journal_pin/__manifest__.py b/pos_journal_pin/__manifest__.py index 74b0aa7e38..788ffc7545 100644 --- a/pos_journal_pin/__manifest__.py +++ b/pos_journal_pin/__manifest__.py @@ -1,5 +1,5 @@ # Copyright 2019 Kolushov Alexandr -# Copyright 2019 Kildebekov Anvar +# Copyright 2019 Kildebekov Anvar # License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html). { "name": """POS Payments by Manager's PIN""", @@ -7,7 +7,7 @@ "category": "Point of Sale", # "live_test_url": "http://apps.it-projects.info/shop/product/DEMO-URL?version=11.0", "images": ['images/pos_journal_pin.jpg'], - "version": "11.0.1.0.0", + "version": "11.0.1.0.1", "application": False, "author": "IT-Projects LLC, Kolushov Alexandr", diff --git a/pos_journal_pin/doc/changelog.rst b/pos_journal_pin/doc/changelog.rst index 5583eb326a..d7370362d8 100644 --- a/pos_journal_pin/doc/changelog.rst +++ b/pos_journal_pin/doc/changelog.rst @@ -1,3 +1,9 @@ +`1.0.1` +------- + +- **Fix:** Adding first payment line by clicking numpad button, without asking manager's PIN, if first payment method in list require manager's PIN +- **Fix:** Creating sessions by non-administrators + `1.0.0` ------- diff --git a/pos_journal_pin/models/models.py b/pos_journal_pin/models/models.py index 6b7c6c33f5..392e5a0e4e 100644 --- a/pos_journal_pin/models/models.py +++ b/pos_journal_pin/models/models.py @@ -56,7 +56,7 @@ def init_pin_journal(self): def _create_pin_journal(self, vals): user = self.env.user - new_sequence = self.env['ir.sequence'].create({ + new_sequence = self.env['ir.sequence'].sudo().create({ 'name': vals['sequence_name'] + str(user.company_id.id), 'padding': 3, 'prefix': vals['prefix'] + str(user.company_id.id), @@ -68,7 +68,7 @@ def _create_pin_journal(self, vals): 'res_id': new_sequence.id, 'noupdate': True, # If it's False, target record (res_id) will be removed while module update }) - pin_journal = self.env['account.journal'].create({ + pin_journal = self.env['account.journal'].sudo().create({ 'name': vals['journal_name'], 'code': vals['code'], 'type': vals['type'], diff --git a/pos_journal_pin/static/src/js/main.js b/pos_journal_pin/static/src/js/main.js index edfb3eb84a..9b5dd41840 100644 --- a/pos_journal_pin/static/src/js/main.js +++ b/pos_journal_pin/static/src/js/main.js @@ -1,5 +1,5 @@ // Copyright 2019 Kolushov Alexandr -// Copyright 2019 Kildebekov Anvar +// Copyright 2019 Kildebekov Anvar // License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html). odoo.define('pos_journal_pin', function (require) { 'use_strict'; diff --git a/pos_journal_pin/tests/test_journal_pin.py b/pos_journal_pin/tests/test_journal_pin.py index 173273c7f7..d607e370bb 100644 --- a/pos_journal_pin/tests/test_journal_pin.py +++ b/pos_journal_pin/tests/test_journal_pin.py @@ -8,11 +8,17 @@ @odoo.tests.common.post_install(True) class TestUi(odoo.tests.HttpCase): - def test_01_pos_journal_pin(self): + def main(self, login): self.phantom_js( '/web', "odoo.__DEBUG__.services['web_tour.tour'].run('pos_journal_pin_tour')", "odoo.__DEBUG__.services['web_tour.tour'].tours.pos_journal_pin_tour.ready", - login="admin", + login=login, timeout=100, ) + + def test_01_pos_journal_pin(self): + self.main("admin") + + def test_02_pos_journal_pin(self): + self.main("demo")