[MERGE] forward port branch 10.0 up to a4bcb66bfc
This commit is contained in:
@@ -453,7 +453,7 @@ class Import(models.TransientModel):
|
||||
:rtype: (None, None) | (list(str), dict(int: list(str)))
|
||||
"""
|
||||
if not options.get('headers'):
|
||||
return None, None
|
||||
return [], {}
|
||||
|
||||
headers = next(rows)
|
||||
return headers, {
|
||||
|
||||
@@ -152,7 +152,7 @@ class TestMatchHeadersMultiple(TransactionCase):
|
||||
|
||||
def test_noheaders(self):
|
||||
self.assertEqual(
|
||||
self.env['base_import.import']._match_headers([], [], {}), (None, None)
|
||||
self.env['base_import.import']._match_headers([], [], {}), ([], {})
|
||||
)
|
||||
|
||||
def test_nomatch(self):
|
||||
|
||||
@@ -477,6 +477,13 @@ var PosDB = core.Class.extend({
|
||||
}
|
||||
return orders;
|
||||
},
|
||||
set_cashier: function(cashier) {
|
||||
// Always update if the user is the same as before
|
||||
this.save('cashier', cashier);
|
||||
},
|
||||
get_cashier: function() {
|
||||
return this.load('cashier');
|
||||
}
|
||||
});
|
||||
|
||||
return PosDB;
|
||||
|
||||
@@ -240,6 +240,7 @@ exports.PosModel = Backbone.Model.extend({
|
||||
}
|
||||
|
||||
self.db.set_uuid(self.config.uuid);
|
||||
self.cashier = self.get_cashier();
|
||||
|
||||
var orders = self.db.get_orders();
|
||||
for (var i = 0; i < orders.length; i++) {
|
||||
@@ -572,11 +573,12 @@ exports.PosModel = Backbone.Model.extend({
|
||||
|
||||
// returns the user who is currently the cashier for this point of sale
|
||||
get_cashier: function(){
|
||||
return this.cashier || this.user;
|
||||
return this.db.get_cashier() || this.cashier || this.user;
|
||||
},
|
||||
// changes the current cashier
|
||||
set_cashier: function(user){
|
||||
this.cashier = user;
|
||||
this.db.set_cashier(this.cashier);
|
||||
},
|
||||
//creates a new empty order and sets it as the current order
|
||||
add_new_order: function(){
|
||||
|
||||
@@ -213,6 +213,10 @@ Instead you must have a proxy redirecting requests whose URL starts with
|
||||
``/longpolling/`` to the longpolling port. Other request should be proxied to
|
||||
the :option:`normal HTTP port <odoo-bin --xmlrpc-port>`
|
||||
|
||||
.. warning:: The livechat worker requires the ``psycogreen`` Python module,
|
||||
which is not always included with all installation packages.
|
||||
It can be manually installed with ``pip install psycogreen``.
|
||||
|
||||
Configuration sample
|
||||
--------------------
|
||||
|
||||
|
||||
@@ -94,7 +94,7 @@ CREATE TABLE ir_module_module (
|
||||
website character varying(256),
|
||||
summary character varying(256),
|
||||
name character varying(128) NOT NULL,
|
||||
author character varying(128),
|
||||
author character varying,
|
||||
icon varchar,
|
||||
state character varying(16),
|
||||
latest_version character varying(64),
|
||||
|
||||
Reference in New Issue
Block a user