Skip to content
Permalink
Browse files

:arrow_ip:1️⃣1️⃣,

In models.py added variable 'invoice_flag';
Deleted unused variables;
Edited commentaries in files (i.e. changed version from 10 to 11, added contributors etc.);
  • Loading branch information...
fedoranvar committed Jul 22, 2019
1 parent 9e12d72 commit 0711ff6002f9fbadb938af3e22b8e79750966fa7
@@ -16,6 +16,7 @@ Credits
Contributors
------------
* `Kolushov Alexandr <https://it-projects.info/team/KolushovAlexandr>`__
* `Kildebekov Anvar <https://it-projects.info/team/kildebekov>`__

Sponsors
--------
@@ -27,7 +28,7 @@ Maintainers

To get a guaranteed support
you are kindly requested to purchase the module
at `odoo apps store <https://apps.odoo.com/apps/modules/10.0//>`__.
at `odoo apps store <https://apps.odoo.com/apps/modules/11.0//>`__.

Thank you for understanding!

@@ -36,14 +37,14 @@ Maintainers
Further information
===================

Demo: http://runbot.it-projects.info/demo/pos-addons/10.0
Demo: http://runbot.it-projects.info/demo/pos-addons/11.0

HTML Description: https://apps.odoo.com/apps/modules/10.0/pos_invoice_postponed/
HTML Description: https://apps.odoo.com/apps/modules/11.0/pos_invoice_postponed/

Usage instructions: `<doc/index.rst>`_

Changelog: `<doc/changelog.rst>`_

Notifications on updates: `via Atom <https://github.com/it-projects-llc/pos-addons/commits/10.0/.atom>`_, `by Email <https://blogtrottr.com/?subscribe=https://github.com/it-projects-llc/pos-addons/commits/10.0/.atom>`_
Notifications on updates: `via Atom <https://github.com/it-projects-llc/pos-addons/commits/11.0/.atom>`_, `by Email <https://blogtrottr.com/?subscribe=https://github.com/it-projects-llc/pos-addons/commits/11.0/.atom>`_

Tested on Odoo 10.0 49ca43d75cb9a97642c820c2466d454f1ce604cb
Tested on Odoo 11.0 06569efca35ef1eee119a1f9c3f73cf79fb70718
@@ -1,13 +1,13 @@
# -*- coding: utf-8 -*-
# Copyright 2019 Kolushov Alexandr <https://it-projects.info/team/KolushovAlexandr>
# Copyright 2019 Kildebekov Anvar <https://it-projects.info/team/kildebekov>
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html).
{
"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",
"images": ['images/postponed2.jpg'],
"version": "10.0.1.0.0",
"version": "11.0.1.0.0",
"application": False,

"author": "IT-Projects LLC, Kolushov Alexandr",
@@ -36,7 +36,7 @@
"uninstall_hook": None,

"auto_install": False,
"installable": False,
"installable": True,

# "demo_title": "Creation of Postponed invoices in POS",
# "demo_addons": [
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
# Copyright 2019 Kolushov Alexandr <https://it-projects.info/team/KolushovAlexandr>
# Copyright 2019 Kildebekov Anvar <https://it-projects.info/team/kildebekov>
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html).

import copy
@@ -26,7 +26,9 @@ def _process_order(self, order):
acc_journal = self.env['account.journal']
payments = order.get('statement_ids')
postponed_payments = filter(lambda x: acc_journal.browse(x[2]['journal_id']).postponed_invoice, payments)
if postponed_payments:
invoice_flag = acc_journal.browse(payments[0][2]['journal_id']).postponed_invoice

if invoice_flag:
user_id = self.env['res.users'].browse(order['user_id'])
partner_id = self.env['res.partner'].browse(order['partner_id'])
session_id = self.env['pos.session'].browse(order['pos_session_id'])
@@ -52,7 +54,7 @@ def _process_order(self, order):

res = super(PosOrder, self)._process_order(order)

if postponed_payments:
if invoice_flag:
res.sudo().write({
'state': 'invoiced',
'invoice_id': invoice.id,
@@ -1,4 +1,5 @@
/* Copyright 2018 Kolushov Alexandr <https://it-projects.info/team/KolushovAlexandr>
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_invoice_postponed.pos', function (require) {
"use strict";
@@ -8,10 +9,7 @@ odoo.define('pos_invoice_postponed.pos', function (require) {
var core = require('web.core');
var gui = require('point_of_sale.gui');
var utils = require('web.utils');
var Model = require('web.DataModel');
var PopupWidget = require('point_of_sale.popups');

var QWeb = core.qweb;

var _t = core._t;
var round_pr = utils.round_precision;

@@ -1,4 +1,5 @@
/* Copyright 2019 Kolushov Alexandr <https://it-projects.info/team/KolushovAlexandr>
Copyright 2019 Kildebekov Anvar <https://it-projects.info/team/kildebekov>
License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html).*/
odoo.define('pos_invoice_postponed.tour', function (require) {
"use strict";
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
# Copyright 2019 Kolushov Alexandr <https://it-projects.info/team/KolushovAlexandr>
# Copyright 2019 Kildebekov Anvar <https://it-projects.info/team/kildebekov>
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html).

import odoo.tests
@@ -1,5 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<!--Copyright 2019 Kolushov Alexandr <https://it-projects.info/team/KolushovAlexandr>
Copyright 2019 Kildebekov Anvar <https://it-projects.info/team/kildebekov>
License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html).-->
<odoo>
<template id="assets" inherit_id="point_of_sale.assets">
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!--Copyright 2019 Kolushov Alexandr <https://it-projects.info/team/KolushovAlexandr>
Copyright 2019 Kildebekov Anvar <https://it-projects.info/team/kildebekov>
License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html).-->
<odoo>
<record model="ir.ui.view" id="view_account_journal_pos_user_form">

0 comments on commit 0711ff6

Please sign in to comment.
You can’t perform that action at this time.