Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

11.0 pos addons merge from 10.0 #1173

Open
wants to merge 6 commits into
base: 11.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pos_debt_notebook/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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: `<doc/index.rst>`__

Expand Down
2 changes: 1 addition & 1 deletion pos_debt_notebook/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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": "[email protected]",
'website': 'https://it-projects.info',
Expand Down
12 changes: 12 additions & 0 deletions pos_debt_notebook/doc/changelog.rst
Original file line number Diff line number Diff line change
@@ -1,14 +1,22 @@
`5.3.1`
-------

- **FIX:** with installed pos_journal_pin, pos_invoice_postponed demo-user can't create pos-session

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😍

`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`
Expand All @@ -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
Expand All @@ -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
Expand Down
10 changes: 5 additions & 5 deletions pos_debt_notebook/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand Down Expand Up @@ -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
})

Expand All @@ -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),
Expand All @@ -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'],
Expand Down
2 changes: 1 addition & 1 deletion pos_debt_notebook/tests/test_pos_debt.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
4 changes: 2 additions & 2 deletions pos_invoice_postponed/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
5 changes: 5 additions & 0 deletions pos_invoice_postponed/doc/changelog.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
`1.0.1`
-------

- **Fix:** Creating of session by non-administrators

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😍

`1.0.0`
-------

Expand Down
4 changes: 2 additions & 2 deletions pos_invoice_postponed/models/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand All @@ -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'],
Expand Down
11 changes: 8 additions & 3 deletions pos_invoice_postponed/tests/test_default.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand All @@ -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")
1 change: 0 additions & 1 deletion pos_journal_pin/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ Credits
Contributors
------------
* `Kolushov Alexandr <https://it-projects.info/team/KolushovAlexandr>`__
* `Kildebekov Anvar <https://it-projects.info/team/kildebekov>`__

Sponsors
--------
Expand Down
4 changes: 2 additions & 2 deletions pos_journal_pin/__manifest__.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# Copyright 2019 Kolushov Alexandr <https://it-projects.info/team/KolushovAlexandr>
# Copyright 2019 Kildebekov Anvar <https://it-projects.info/team/kildebekov>
# Copyright 2019 Kildebekov Anvar <https://it-projects.info/team/kildebekov>
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html).
{
"name": """POS Payments by Manager's PIN""",
"summary": """Ask for manager permission before use the journal""",
"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",
Expand Down
6 changes: 6 additions & 0 deletions pos_journal_pin/doc/changelog.rst
Original file line number Diff line number Diff line change
@@ -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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was already fixed in 11.0 during merging
it-projects-llc/pos-addons@dcae4c3

- **Fix:** Creating sessions by non-administrators

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😍

`1.0.0`
-------

Expand Down
4 changes: 2 additions & 2 deletions pos_journal_pin/models/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand All @@ -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'],
Expand Down
2 changes: 1 addition & 1 deletion pos_journal_pin/static/src/js/main.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copyright 2019 Kolushov Alexandr <https://it-projects.info/team/KolushovAlexandr>
// Copyright 2019 Kildebekov Anvar <https://it-projects.info/team/kildebekov>
// Copyright 2019 Kildebekov Anvar <https://it-projects.info/team/kildebekov>
// License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html).
odoo.define('pos_journal_pin', function (require) {
'use_strict';
Expand Down
10 changes: 8 additions & 2 deletions pos_journal_pin/tests/test_journal_pin.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")