-
From 2c5632271f41045462cd3d2e39956c747162e3c4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20van=20der=20Essen?=
Date: Tue, 12 Nov 2013 16:10:41 +0100
Subject: [PATCH 3/8] [IMP] point_of_sale: only open cashbox when paying with
cash + add manual override
bzr revid: fva@openerp.com-20131112151041-3betwjahh9ph9vx5
---
.../static/src/img/open-cashbox.png | Bin 0 -> 1468 bytes
addons/point_of_sale/static/src/js/screens.js | 15 +++++++++++++--
2 files changed, 13 insertions(+), 2 deletions(-)
create mode 100644 addons/point_of_sale/static/src/img/open-cashbox.png
diff --git a/addons/point_of_sale/static/src/img/open-cashbox.png b/addons/point_of_sale/static/src/img/open-cashbox.png
new file mode 100644
index 0000000000000000000000000000000000000000..1e07b0a92825aa18f14f899b0e28b586a1ba7ef3
GIT binary patch
literal 1468
zcmV;t1w;CYP)jP3kV`wqKgm*Eq#x#l&9*yx4{|)&Yd^7rF
z3i<-ICPG3)tiB>N5hQ8igON>3ckk_;nR9%Yxp(iDrQO2T7x!dOX6D}AyWcn8IcH`r
zFtC9QY+wT$*uVz%|247OA1p0hJ;Rb00Yp#x4l_T|?|uyc7($4aCG*zY+w(W~l)%!`
z)iWv#ug%V!s#VHW2mwF{2nhI3;js*lFYhxmz=b{-%nY5TxV`*yb5qA>cS}M%3-~Y$
zVT^&4(z%d%U-&T*IcLiIocC?V^>V2UX2$L1Tg^1yJUchnI|;EH@G~c8YJm!n8tp*~
z2;l$=*;XP~fZa?p6POvq1SSG8Zy`jeR4O21{IYzj8E?jC=jYD#L?Y63sbt5Rv6IPO2{03^
zwH?=^D0;40KYH|No6y*3_Gh~y5cE!fVXf&3J`98BBC)cvg3+-t7^8hf>azmG3?^4O
zhKGlrd*-{57#gZUYvUKcJy0O4*`Hm!i1X(^gf_bG8?(mRKbV*}ymuiqJUoi2V<#|m
z>_p$ew^~j7@Z+Liq4$IU;r@d^@cQ&g5D|mrF)}g&Fn4SZlvI#PLP-T?pwVbR)$2|H
zsbGzT)+vlNh?B&v#C=pi0?0RGNgTWVOBNo5@OkjyK5ksUj){p0jK6RQmMo-H2&96P
z6057LSY2JkG06zKnQ*3S~T_3u!@i?#ZZss-8)F}`KA>ueGZXSmKv;d^rkqCAI
z4`76uA*DbP$KXN|XNhX9MJsON`=x96{q7wkNp}Ka7~uHSap+Wc%)U-jD5a3Zago4C
z;ipd}5p1JO1;Bm)Bdc1fJoGGndf%ik`DI8MOKh^jSMvhBk<03`*a
zQ2tOaprpzV_)7ecYCPM;=kh0r3U~U
zD3{Ae-hJ<#FZTLH)s=ZEe+qO}rAOkPAJ%R*_rC^t|=%lTo3i?aF8`?}h$L;7=nmuz?M1U;`UiSNj*f
W^YttEX?`OB0000=
literal 0
HcmV?d00001
diff --git a/addons/point_of_sale/static/src/js/screens.js b/addons/point_of_sale/static/src/js/screens.js
index 77a542ff93c..01ccd538d8c 100644
--- a/addons/point_of_sale/static/src/js/screens.js
+++ b/addons/point_of_sale/static/src/js/screens.js
@@ -873,8 +873,8 @@ function openerp_pos_screens(instance, module){ //module is instance.point_of_sa
this._super();
var self = this;
- if(this.pos.iface_cashdrawer){
- this.pos.proxy.open_cashbox();
+ if( this.pos.iface_cashdrawer && this.pos.get('selectedOrder').get('paymentLines').find( function(pl){ return pl.cashregister.get('journal').type === 'cash'; })){
+ this.pos.proxy.open_cashbox();
}
this.set_numpad_state(this.pos_widget.numpad.state);
@@ -912,6 +912,17 @@ function openerp_pos_screens(instance, module){ //module is instance.point_of_sa
});
}
+ if( this.pos.iface_cashdrawer ){
+ this.add_action_button({
+ label: _t('Cash'),
+ name: 'cashbox',
+ icon: '/point_of_sale/static/src/img/open-cashbox.png',
+ click: function(){
+ self.pos.proxy.open_cashbox();
+ },
+ });
+ }
+
this.updatePaymentSummary();
this.line_refocus();
},
From ddf6ec224fed7c305b99fa04ff75ad70343a746d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20van=20der=20Essen?=
Date: Tue, 12 Nov 2013 17:05:34 +0100
Subject: [PATCH 4/8] [IMP] point_of_sale: improve the reactivity of the
searchbox by timeouting on the search instead on searching after each
character change
bzr revid: fva@openerp.com-20131112160534-004d8df6ede1b4yt
---
addons/point_of_sale/static/src/js/widgets.js | 34 +++++++++++--------
1 file changed, 20 insertions(+), 14 deletions(-)
diff --git a/addons/point_of_sale/static/src/js/widgets.js b/addons/point_of_sale/static/src/js/widgets.js
index 447094e0c4e..866e3c7ba72 100644
--- a/addons/point_of_sale/static/src/js/widgets.js
+++ b/addons/point_of_sale/static/src/js/widgets.js
@@ -560,26 +560,32 @@ function openerp_pos_widgets(instance, module){ //module is instance.point_of_sa
var products = this.pos.db.get_product_by_category(this.category.id);
self.pos.get('products').reset(products);
+
+ var searchtimeout = null;
// filter the products according to the search string
this.$('.searchbox input').keyup(function(event){
- console.log('event',event);
- query = $(this).val().toLowerCase();
- if(query){
- if(event.which === 13){
- if( self.pos.get('products').size() === 1 ){
- self.pos.get('selectedOrder').addProduct(self.pos.get('products').at(0));
- self.clear_search();
+ clearTimeout(searchtimeout);
+
+ var query = $(this).val().toLowerCase();
+
+ searchtimeout = setTimeout(function(){
+ if(query){
+ if(event.which === 13){
+ if( self.pos.get('products').size() === 1 ){
+ self.pos.get('selectedOrder').addProduct(self.pos.get('products').at(0));
+ self.clear_search();
+ }
+ }else{
+ var products = self.pos.db.search_product_in_category(self.category.id, query);
+ self.pos.get('products').reset(products);
+ self.$('.search-clear').fadeIn();
}
}else{
- var products = self.pos.db.search_product_in_category(self.category.id, query);
+ var products = self.pos.db.get_product_by_category(self.category.id);
self.pos.get('products').reset(products);
- self.$('.search-clear').fadeIn();
+ self.$('.search-clear').fadeOut();
}
- }else{
- var products = self.pos.db.get_product_by_category(self.category.id);
- self.pos.get('products').reset(products);
- self.$('.search-clear').fadeOut();
- }
+ },200);
});
//reset the search when clicking on reset
From 4476cd670112e2aff612e945d626ce03f28f3a6e Mon Sep 17 00:00:00 2001
From: niv-openerp
Date: Wed, 13 Nov 2013 16:21:07 +0100
Subject: [PATCH 5/8] [FIX] problem when clicking too fast on pagers in the
form view
lp bug: https://launchpad.net/bugs/1238569 fixed
bzr revid: nicolas.vanhoren@openerp.com-20131113152107-5zwsbntil4wihoh4
---
addons/web/static/src/js/view_form.js | 15 ++++++++++++---
1 file changed, 12 insertions(+), 3 deletions(-)
diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js
index 2cb318dcb17..94fc38faa23 100644
--- a/addons/web/static/src/js/view_form.js
+++ b/addons/web/static/src/js/view_form.js
@@ -399,9 +399,11 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM
this.dataset.index = this.dataset.ids.length - 1;
break;
}
- this.reload();
+ var def = this.reload();
this.trigger('pager_action_executed');
+ return def;
}
+ return $.when();
},
init_pager: function() {
var self = this;
@@ -416,8 +418,15 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM
this.$el.find('.oe_form_pager').replaceWith(this.$pager);
}
this.$pager.on('click','a[data-pager-action]',function() {
- var action = $(this).data('pager-action');
- self.execute_pager_action(action);
+ var $el = $(this);
+ if ($el.attr("disabled"))
+ return;
+ var action = $el.data('pager-action');
+ var def = $.when(self.execute_pager_action(action));
+ $el.attr("disabled");
+ def.always(function() {
+ $el.removeAttr("disabled");
+ });
});
this.do_update_pager();
},
From c28186260473e0b9706e64ace92c9ae6125e6bd8 Mon Sep 17 00:00:00 2001
From: niv-openerp
Date: Wed, 13 Nov 2013 16:53:40 +0100
Subject: [PATCH 6/8] [FIX] Attempt to resolve the bug that makes the runbot
crash
bzr revid: nicolas.vanhoren@openerp.com-20131113155340-srjkfv372jsyg5vl
---
addons/web/controllers/main.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/addons/web/controllers/main.py b/addons/web/controllers/main.py
index 81990f633ad..58abda3fc30 100644
--- a/addons/web/controllers/main.py
+++ b/addons/web/controllers/main.py
@@ -553,7 +553,7 @@ class Home(http.Controller):
if db is None and guessed_db is not None:
return redirect(guessed_db)
- if db is not None and db != request.session.db:
+ if db is not None and db != guessed_db:
request.session.logout()
request.session.db = db
guessed_db = db
From 2a6e668f7400b883826e6fb95236347c1a9e9986 Mon Sep 17 00:00:00 2001
From: Launchpad Translations on behalf of openerp <>
Date: Thu, 14 Nov 2013 05:23:03 +0000
Subject: [PATCH 7/8] Launchpad automatic translations update.
bzr revid: launchpad_translations_on_behalf_of_openerp-20131113052604-53vea9wu1njlqbsg
bzr revid: launchpad_translations_on_behalf_of_openerp-20131114052303-klxv7xa52p3ejjud
---
addons/auth_oauth/i18n/ru.po | 135 ++++++++++++++++++++++++
addons/event_moodle/i18n/ru.po | 185 +++++++++++++++++++++++++++++++++
2 files changed, 320 insertions(+)
create mode 100644 addons/auth_oauth/i18n/ru.po
create mode 100644 addons/event_moodle/i18n/ru.po
diff --git a/addons/auth_oauth/i18n/ru.po b/addons/auth_oauth/i18n/ru.po
new file mode 100644
index 00000000000..d5c1c90b95e
--- /dev/null
+++ b/addons/auth_oauth/i18n/ru.po
@@ -0,0 +1,135 @@
+# Russian translation for openobject-addons
+# Copyright (c) 2013 Rosetta Contributors and Canonical Ltd 2013
+# This file is distributed under the same license as the openobject-addons package.
+# FIRST AUTHOR , 2013.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: openobject-addons\n"
+"Report-Msgid-Bugs-To: FULL NAME \n"
+"POT-Creation-Date: 2012-12-21 17:05+0000\n"
+"PO-Revision-Date: 2013-11-13 06:38+0000\n"
+"Last-Translator: FULL NAME \n"
+"Language-Team: Russian \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Launchpad-Export-Date: 2013-11-14 05:23+0000\n"
+"X-Generator: Launchpad (build 16820)\n"
+
+#. module: auth_oauth
+#: field:auth.oauth.provider,validation_endpoint:0
+msgid "Validation URL"
+msgstr ""
+
+#. module: auth_oauth
+#: field:auth.oauth.provider,auth_endpoint:0
+msgid "Authentication URL"
+msgstr ""
+
+#. module: auth_oauth
+#: model:ir.model,name:auth_oauth.model_base_config_settings
+msgid "base.config.settings"
+msgstr ""
+
+#. module: auth_oauth
+#: field:auth.oauth.provider,name:0
+msgid "Provider name"
+msgstr ""
+
+#. module: auth_oauth
+#: field:auth.oauth.provider,scope:0
+msgid "Scope"
+msgstr ""
+
+#. module: auth_oauth
+#: field:res.users,oauth_provider_id:0
+msgid "OAuth Provider"
+msgstr ""
+
+#. module: auth_oauth
+#: field:auth.oauth.provider,css_class:0
+msgid "CSS class"
+msgstr ""
+
+#. module: auth_oauth
+#: field:auth.oauth.provider,body:0
+msgid "Body"
+msgstr ""
+
+#. module: auth_oauth
+#: model:ir.model,name:auth_oauth.model_res_users
+msgid "Users"
+msgstr ""
+
+#. module: auth_oauth
+#: field:auth.oauth.provider,sequence:0
+msgid "unknown"
+msgstr ""
+
+#. module: auth_oauth
+#: field:res.users,oauth_access_token:0
+msgid "OAuth Access Token"
+msgstr ""
+
+#. module: auth_oauth
+#: field:auth.oauth.provider,client_id:0
+#: field:base.config.settings,auth_oauth_facebook_client_id:0
+#: field:base.config.settings,auth_oauth_google_client_id:0
+msgid "Client ID"
+msgstr ""
+
+#. module: auth_oauth
+#: model:ir.ui.menu,name:auth_oauth.menu_oauth_providers
+msgid "OAuth Providers"
+msgstr ""
+
+#. module: auth_oauth
+#: model:ir.model,name:auth_oauth.model_auth_oauth_provider
+msgid "OAuth2 provider"
+msgstr ""
+
+#. module: auth_oauth
+#: field:res.users,oauth_uid:0
+msgid "OAuth User ID"
+msgstr ""
+
+#. module: auth_oauth
+#: field:base.config.settings,auth_oauth_facebook_enabled:0
+msgid "Allow users to sign in with Facebook"
+msgstr ""
+
+#. module: auth_oauth
+#: sql_constraint:res.users:0
+msgid "OAuth UID must be unique per provider"
+msgstr ""
+
+#. module: auth_oauth
+#: help:res.users,oauth_uid:0
+msgid "Oauth Provider user_id"
+msgstr ""
+
+#. module: auth_oauth
+#: field:auth.oauth.provider,data_endpoint:0
+msgid "Data URL"
+msgstr ""
+
+#. module: auth_oauth
+#: view:auth.oauth.provider:0
+msgid "arch"
+msgstr ""
+
+#. module: auth_oauth
+#: model:ir.actions.act_window,name:auth_oauth.action_oauth_provider
+msgid "Providers"
+msgstr ""
+
+#. module: auth_oauth
+#: field:base.config.settings,auth_oauth_google_enabled:0
+msgid "Allow users to sign in with Google"
+msgstr ""
+
+#. module: auth_oauth
+#: field:auth.oauth.provider,enabled:0
+msgid "Allowed"
+msgstr ""
diff --git a/addons/event_moodle/i18n/ru.po b/addons/event_moodle/i18n/ru.po
new file mode 100644
index 00000000000..b42a84a023b
--- /dev/null
+++ b/addons/event_moodle/i18n/ru.po
@@ -0,0 +1,185 @@
+# Russian translation for openobject-addons
+# Copyright (c) 2013 Rosetta Contributors and Canonical Ltd 2013
+# This file is distributed under the same license as the openobject-addons package.
+# FIRST AUTHOR , 2013.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: openobject-addons\n"
+"Report-Msgid-Bugs-To: FULL NAME \n"
+"POT-Creation-Date: 2012-12-21 17:05+0000\n"
+"PO-Revision-Date: 2013-11-13 05:19+0000\n"
+"Last-Translator: FULL NAME \n"
+"Language-Team: Russian \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Launchpad-Export-Date: 2013-11-14 05:23+0000\n"
+"X-Generator: Launchpad (build 16820)\n"
+
+#. module: event_moodle
+#: view:event.moodle.config.wiz:0
+msgid "Connection with username and password"
+msgstr ""
+
+#. module: event_moodle
+#: model:ir.model,name:event_moodle.model_event_moodle_config_wiz
+msgid "event.moodle.config.wiz"
+msgstr ""
+
+#. module: event_moodle
+#: help:event.moodle.config.wiz,server_moodle:0
+msgid ""
+"URL where you have your moodle server. For exemple: 'http://127.0.0.1' or "
+"'http://localhost'"
+msgstr ""
+
+#. module: event_moodle
+#: field:event.registration,moodle_user_password:0
+msgid "Password for Moodle User"
+msgstr ""
+
+#. module: event_moodle
+#: field:event.moodle.config.wiz,moodle_password:0
+msgid "Moodle Password"
+msgstr ""
+
+#. module: event_moodle
+#: code:addons/event_moodle/event_moodle.py:137
+#, python-format
+msgid "Your email '%s' is wrong."
+msgstr ""
+
+#. module: event_moodle
+#: view:event.moodle.config.wiz:0
+msgid "Connection with a Token"
+msgstr ""
+
+#. module: event_moodle
+#: view:event.moodle.config.wiz:0
+msgid ""
+"The easiest way to connect OpenERP with a moodle server is to create a "
+"'token' in Moodle. It will be used to authenticate OpenERP as a trustable "
+"application."
+msgstr ""
+
+#. module: event_moodle
+#: field:event.moodle.config.wiz,url:0
+msgid "URL to Moodle Server"
+msgstr ""
+
+#. module: event_moodle
+#: help:event.moodle.config.wiz,url:0
+msgid "The url that will be used for the connection with moodle in xml-rpc"
+msgstr ""
+
+#. module: event_moodle
+#: model:ir.model,name:event_moodle.model_event_registration
+msgid "Event Registration"
+msgstr ""
+
+#. module: event_moodle
+#: view:event.moodle.config.wiz:0
+msgid ""
+"Another approach is to create a user for OpenERP in Moodle. If you do so, "
+"make sure that this user has appropriate access rights."
+msgstr ""
+
+#. module: event_moodle
+#: field:event.registration,moodle_uid:0
+msgid "Moodle User ID"
+msgstr ""
+
+#. module: event_moodle
+#: field:event.moodle.config.wiz,server_moodle:0
+msgid "Moodle Server"
+msgstr ""
+
+#. module: event_moodle
+#: field:event.event,moodle_id:0
+msgid "Moodle ID"
+msgstr ""
+
+#. module: event_moodle
+#: view:event.moodle.config.wiz:0
+msgid "Server"
+msgstr ""
+
+#. module: event_moodle
+#: code:addons/event_moodle/event_moodle.py:57
+#: code:addons/event_moodle/event_moodle.py:105
+#: code:addons/event_moodle/event_moodle.py:137
+#, python-format
+msgid "Error!"
+msgstr ""
+
+#. module: event_moodle
+#: code:addons/event_moodle/event_moodle.py:105
+#, python-format
+msgid "You must configure your moodle connection."
+msgstr ""
+
+#. module: event_moodle
+#: field:event.moodle.config.wiz,moodle_username:0
+#: field:event.registration,moodle_username:0
+msgid "Moodle Username"
+msgstr ""
+
+#. module: event_moodle
+#: view:event.moodle.config.wiz:0
+#: model:ir.actions.act_window,name:event_moodle.configure_moodle
+msgid "Configure Moodle"
+msgstr ""
+
+#. module: event_moodle
+#: field:event.moodle.config.wiz,moodle_token:0
+msgid "Moodle Token"
+msgstr ""
+
+#. module: event_moodle
+#: help:event.moodle.config.wiz,moodle_username:0
+msgid ""
+"You can also connect with your username that you define when you create a "
+"token"
+msgstr ""
+
+#. module: event_moodle
+#: help:event.event,moodle_id:0
+msgid "The identifier of this event in Moodle"
+msgstr ""
+
+#. module: event_moodle
+#: help:event.moodle.config.wiz,moodle_token:0
+msgid "Put your token that you created in your moodle server"
+msgstr ""
+
+#. module: event_moodle
+#: model:ir.ui.menu,name:event_moodle.wizard_moodle
+msgid "Moodle Configuration"
+msgstr ""
+
+#. module: event_moodle
+#: view:event.moodle.config.wiz:0
+msgid "or"
+msgstr ""
+
+#. module: event_moodle
+#: code:addons/event_moodle/event_moodle.py:57
+#, python-format
+msgid "First configure your moodle connection."
+msgstr ""
+
+#. module: event_moodle
+#: view:event.moodle.config.wiz:0
+msgid "Apply"
+msgstr ""
+
+#. module: event_moodle
+#: view:event.moodle.config.wiz:0
+msgid "Cancel"
+msgstr ""
+
+#. module: event_moodle
+#: model:ir.model,name:event_moodle.model_event_event
+msgid "Event"
+msgstr ""
From 700d456cbb301c02d981a7bdb8b3e8325bed9a27 Mon Sep 17 00:00:00 2001
From: "Quentin (OpenERP)"
Date: Wed, 13 Nov 2013 11:07:13 +0100
Subject: [PATCH 8/8] [FIX] account_payment: amount_residual doesn't have a
fct_search so it should be replaced by something else
bzr revid: qdp-launchpad@openerp.com-20131113100713-tvl30z5oqym22jqj
---
addons/account_payment/wizard/account_payment_order.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/addons/account_payment/wizard/account_payment_order.py b/addons/account_payment/wizard/account_payment_order.py
index de9c47ec005..8d5df048fe0 100644
--- a/addons/account_payment/wizard/account_payment_order.py
+++ b/addons/account_payment/wizard/account_payment_order.py
@@ -104,7 +104,7 @@ class payment_order_create(osv.osv_memory):
# payment = self.pool.get('payment.order').browse(cr, uid, context['active_id'], context=context)
# Search for move line to pay:
- domain = [('reconcile_id', '=', False), ('account_id.type', '=', 'payable'), ('amount_residual', '>', 0)]
+ domain = [('reconcile_id', '=', False), ('account_id.type', '=', 'payable'), ('credit', '>', 0), ('account_id.reconcile', '=', True)]
domain = domain + ['|', ('date_maturity', '<=', search_due_date), ('date_maturity', '=', False)]
line_ids = line_obj.search(cr, uid, domain, context=context)
context.update({'line_ids': line_ids})