diff --git a/pos_debt_notebook/data/demo.xml b/pos_debt_notebook/data/demo.xml index 8c60ac7fc5..5196f6ae11 100644 --- a/pos_debt_notebook/data/demo.xml +++ b/pos_debt_notebook/data/demo.xml @@ -10,7 +10,7 @@ Credits top-up - POS-DEBT + POS-DEBT-CREDIT 1 diff --git a/pos_debt_notebook/models.py b/pos_debt_notebook/models.py index 489ff14049..767b762c8c 100644 --- a/pos_debt_notebook/models.py +++ b/pos_debt_notebook/models.py @@ -237,6 +237,7 @@ def init_debt_journal(self): 'code': 'XDEBT', 'user_type_id': self.env.ref('account.data_account_type_current_assets').id, 'company_id': user.company_id.id, + 'reconcile': True, }) self.env['ir.model.data'].create({ 'name': 'debt_account_for_company' + str(user.company_id.id), diff --git a/pos_debt_notebook/static/src/js/pos.js b/pos_debt_notebook/static/src/js/pos.js index 03e660ab10..f917971aee 100644 --- a/pos_debt_notebook/static/src/js/pos.js +++ b/pos_debt_notebook/static/src/js/pos.js @@ -1051,7 +1051,7 @@ odoo.define('pos_debt_notebook.pos', function (require) { var order = self.pos.get_order(); if (order) { var lastorderline = order.get_last_orderline(); - if (lastorderline === null && self.pos.config.debt_dummy_product_id){ + if (lastorderline === undefined && self.pos.config.debt_dummy_product_id){ var dummy_product = self.pos.db.get_product_by_id( self.pos.config.debt_dummy_product_id[0]); order.add_product(dummy_product, {'price': 0});