From 18841cf6eb8fe7d3eeec0468516513983fd11ec1 Mon Sep 17 00:00:00 2001 From: Niels Huylebroeck Date: Thu, 3 Jan 2013 14:04:48 +0100 Subject: [PATCH 01/26] [FIX] base: allow searching in multicompany environment on res_partner. lp bug: https://launchpad.net/bugs/1094212 fixed bzr revid: nh@agaplan.eu-20130103130448-zzh00ari2ijra28z --- openerp/addons/base/res/res_partner.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/openerp/addons/base/res/res_partner.py b/openerp/addons/base/res/res_partner.py index b35db73b1f4..4dce23b4d33 100644 --- a/openerp/addons/base/res/res_partner.py +++ b/openerp/addons/base/res/res_partner.py @@ -463,8 +463,7 @@ class res_partner(osv.osv, format_address): OR partner.name || ' (' || COALESCE(company.name,'') || ')' ''' + operator + ' %(name)s ' + limit_str, query_args) ids = map(lambda x: x[0], cr.fetchall()) - if args: - ids = self.search(cr, uid, [('id', 'in', ids)] + args, limit=limit, context=context) + ids = self.search(cr, uid, [('id', 'in', ids)] + args, limit=limit, context=context) if ids: return self.name_get(cr, uid, ids, context) return super(res_partner,self).name_search(cr, uid, name, args, operator=operator, context=context, limit=limit) From 89ba4995565dc6cf29139f6248c0c9cfce4996db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Wed, 9 Jan 2013 11:45:13 +0100 Subject: [PATCH 02/26] [IMP] Partners do not follow themselves by default now. bzr revid: tde@openerp.com-20130109104513-3vlyw4knqp4d6to2 --- addons/mail/res_users.py | 15 ++------------- addons/mail/tests/test_mail_message.py | 8 -------- 2 files changed, 2 insertions(+), 21 deletions(-) diff --git a/addons/mail/res_users.py b/addons/mail/res_users.py index 3f33f1dbca5..b98d12439b9 100644 --- a/addons/mail/res_users.py +++ b/addons/mail/res_users.py @@ -62,16 +62,6 @@ class res_users(osv.Model): # create aliases for all users and avoid constraint errors self.pool.get('mail.alias').migrate_to_alias(cr, self._name, self._table, super(res_users, self)._auto_init, self._columns['alias_id'], 'login', alias_force_key='id', context=context) - # make already existing users follow themselves, using SQL to avoid using the ORM during the auto_init - cr.execute(""" SELECT p.id FROM res_partner p - LEFT JOIN mail_followers n - ON (n.partner_id = p.id AND n.res_model = 'res.partner' AND n.res_id = p.id) - WHERE n.id IS NULL - """) - params = [(res[0], res[0]) for res in cr.fetchall()] - cr.executemany(""" INSERT INTO mail_followers (partner_id, res_model, res_id) - VALUES (%s, 'res.partner', %s) - """, params) def create(self, cr, uid, data, context=None): # create default alias same as the login @@ -81,12 +71,11 @@ class res_users(osv.Model): mail_alias = self.pool.get('mail.alias') alias_id = mail_alias.create_unique_alias(cr, uid, {'alias_name': data['login']}, model_name=self._name, context=context) data['alias_id'] = alias_id - data.pop('alias_name', None) # prevent errors during copy() + data.pop('alias_name', None) # prevent errors during copy() - # create user that follows its related partner + # create user user_id = super(res_users, self).create(cr, uid, data, context=context) user = self.browse(cr, uid, user_id, context=context) - self.pool.get('res.partner').message_subscribe(cr, uid, [user.partner_id.id], [user.partner_id.id], context=context) # alias mail_alias.write(cr, SUPERUSER_ID, [alias_id], {"alias_force_thread_id": user_id}, context) # create a welcome message diff --git a/addons/mail/tests/test_mail_message.py b/addons/mail/tests/test_mail_message.py index 39bb99007ee..07a87a16910 100644 --- a/addons/mail/tests/test_mail_message.py +++ b/addons/mail/tests/test_mail_message.py @@ -365,11 +365,3 @@ class test_mail_access_rights(TestMailBase): {'subject': 'Subject', 'body': 'Body text'}, {'default_composition_mode': 'reply', 'default_parent_id': pigs_msg_id}) mail_compose.send_mail(cr, user_raoul_id, [compose_id]) - - # Do: Raoul writes on its own profile, ok because follower of its partner - self.res_users.message_post(cr, user_raoul_id, user_raoul_id, body='I love Raoul') - self.res_partner.message_post(cr, user_raoul_id, partner_raoul_id, body='I love Raoul') - compose_id = mail_compose.create(cr, user_raoul_id, - {'subject': 'Subject', 'body': 'Body text', 'partner_ids': []}, - {'default_composition_mode': 'comment', 'default_model': 'res.users', 'default_res_id': self.user_raoul_id}) - mail_compose.send_mail(cr, user_raoul_id, [compose_id]) From df9ba1d0a4b69850df14364ecc033855342613ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20van=20der=20Essen?= Date: Mon, 14 Jan 2013 16:25:33 +0100 Subject: [PATCH 03/26] [FIX] point_of_sale: removed some memory leaks. bzr revid: fva@openerp.com-20130114152533-3s1ynd7q1927514a --- addons/point_of_sale/static/src/js/screens.js | 13 +++++++-- addons/point_of_sale/static/src/js/widgets.js | 28 +++++++++++++++++-- 2 files changed, 35 insertions(+), 6 deletions(-) diff --git a/addons/point_of_sale/static/src/js/screens.js b/addons/point_of_sale/static/src/js/screens.js index dd7f55efc37..f8e3382c242 100644 --- a/addons/point_of_sale/static/src/js/screens.js +++ b/addons/point_of_sale/static/src/js/screens.js @@ -864,6 +864,7 @@ function openerp_pos_screens(instance, module){ //module is instance.point_of_sa this.pos.bind('change:selectedOrder', this.change_selected_order, this); this.bindPaymentLineEvents(); this.bind_orderline_events(); + this.paymentlinewidgets = []; }, show: function(){ this._super(); @@ -932,18 +933,24 @@ function openerp_pos_screens(instance, module){ //module is instance.point_of_sa }, addPaymentLine: function(newPaymentLine) { var self = this; - var x = new module.PaymentlineWidget(null, { + var l = new module.PaymentlineWidget(null, { payment_line: newPaymentLine }); - x.on('delete_payment_line', self, function(r) { + l.on('delete_payment_line', self, function(r) { self.deleteLine(r); }); - x.appendTo(this.$('#paymentlines')); + l.appendTo(this.$('#paymentlines')); + this.paymentlinewidgets.push(l); this.$('.paymentline-amount input:last').focus(); }, renderElement: function() { this._super(); this.$('#paymentlines').empty(); + for(var i = 0, len = this.paymentlinewidgets.length; i < len; i++){ + this.paymentlinewidgets[i].destroy(); + } + this.paymentlinewidgets = []; + this.currentPaymentLines.each(_.bind( function(paymentLine) { this.addPaymentLine(paymentLine); }, this)); diff --git a/addons/point_of_sale/static/src/js/widgets.js b/addons/point_of_sale/static/src/js/widgets.js index 135c00f198d..39ac2529a76 100644 --- a/addons/point_of_sale/static/src/js/widgets.js +++ b/addons/point_of_sale/static/src/js/widgets.js @@ -165,6 +165,7 @@ function openerp_pos_widgets(instance, module){ //module is instance.point_of_sa this.set_numpad_state(options.numpadState); this.pos.bind('change:selectedOrder', this.change_selected_order, this); this.bind_orderline_events(); + this.orderlinewidgets = []; }, set_numpad_state: function(numpadState) { if (this.numpadState) { @@ -210,6 +211,16 @@ function openerp_pos_widgets(instance, module){ //module is instance.point_of_sa var self = this; this._super(); + // freeing subwidgets + + if(this.scrollbar){ + this.scrollbar.destroy(); + } + for(var i = 0, len = this.orderlinewidgets.length; i < len; i++){ + this.orderlinewidgets[i].destroy(); + } + this.orderlinewidgets = []; + if(this.display_mode === 'maximized'){ $('.point-of-sale .order-container').css({'bottom':'0px'}); }else if(this.display_mode === 'actionbar'){ @@ -227,6 +238,7 @@ function openerp_pos_widgets(instance, module){ //module is instance.point_of_sa line.on('order_line_selected', self, self.update_numpad); line.on('order_line_refreshed', self, self.update_summary); line.appendTo($content); + self.orderlinewidgets.push(line); }, this)); this.update_numpad(); this.update_summary(); @@ -571,7 +583,7 @@ function openerp_pos_widgets(instance, module){ //module is instance.point_of_sa var self = this; this._super(parent,options); this.model = options.model; - this.product_list = []; + this.productwidgets = []; this.weight = options.weight || 0; this.show_scale = options.show_scale || false; this.next_screen = options.next_screen || false; @@ -584,7 +596,17 @@ function openerp_pos_widgets(instance, module){ //module is instance.point_of_sa renderElement: function() { var self = this; this._super(); - this.product_list = []; + + // free subwidgets memory from previous renders + + for(var i = 0, len = this.productwidgets.length; i < len; i++){ + this.productwidgets[i].destroy(); + } + this.productwidgets = []; + if(this.scrollbar){ + this.scrollbar.destroy(); + } + this.pos.get('products') .chain() .map(function(product) { @@ -593,7 +615,7 @@ function openerp_pos_widgets(instance, module){ //module is instance.point_of_sa weight: self.weight, click_product_action: self.click_product_action, }) - self.product_list.push(product); + self.productwidgets.push(product); return product; }) .invoke('appendTo', this.$('.product-list')); From 984b904f2c2332f5354cc4fef5d7c802c68f2b43 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20van=20der=20Essen?= Date: Mon, 14 Jan 2013 17:42:16 +0100 Subject: [PATCH 04/26] [FIX] point_of_sale: the pos synchronisation indicator was changing the cursor indicating that an action was possible, but there's nothing to do when it's already synchronized. lp bug: https://launchpad.net/bugs/1099402 fixed bzr revid: fva@openerp.com-20130114164216-53yix6tmlix316zl --- addons/point_of_sale/static/src/css/pos.css | 4 +++- addons/point_of_sale/static/src/xml/pos.xml | 16 +++++++++++----- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/addons/point_of_sale/static/src/css/pos.css b/addons/point_of_sale/static/src/css/pos.css index 2c086032ec3..f79a1594178 100644 --- a/addons/point_of_sale/static/src/css/pos.css +++ b/addons/point_of_sale/static/src/css/pos.css @@ -233,7 +233,9 @@ font-style: italic; cursor:pointer; } - +.point-of-sale .oe_pos_synch-notification.oe_inactive{ + cursor: default; +} .point-of-sale .oe_pos_synch-notification .oe_status_red{ display:inline-block; cursor:pointer; diff --git a/addons/point_of_sale/static/src/xml/pos.xml b/addons/point_of_sale/static/src/xml/pos.xml index 41a061e78b4..f88b4bb6c27 100644 --- a/addons/point_of_sale/static/src/xml/pos.xml +++ b/addons/point_of_sale/static/src/xml/pos.xml @@ -48,11 +48,17 @@ -
- -
-
-
+ +
+ +
+
+
+ +
+
+
+
From a5c71fcb5f158f094078003c7172ba76bee3d303 Mon Sep 17 00:00:00 2001 From: Launchpad Translations on behalf of openerp <> Date: Tue, 15 Jan 2013 05:32:09 +0000 Subject: [PATCH 05/26] Launchpad automatic translations update. bzr revid: launchpad_translations_on_behalf_of_openerp-20130115053209-55l3assahuyxjm88 --- addons/account_test/i18n/ro.po | 287 +++++++++++++++++++ addons/account_voucher/i18n/ro.po | 92 ++++-- addons/auth_ldap/i18n/ro.po | 18 +- addons/auth_oauth/i18n/ro.po | 135 +++++++++ addons/auth_oauth/i18n/sl.po | 135 +++++++++ addons/auth_oauth_signup/i18n/ro.po | 23 ++ addons/base_setup/i18n/sl.po | 12 +- addons/document/i18n/zh_CN.po | 2 +- addons/procurement/i18n/sl.po | 84 +++--- addons/product/i18n/sl.po | 34 ++- addons/project_gtd/i18n/pl.po | 16 +- addons/purchase/i18n/sl.po | 58 ++-- addons/purchase_double_validation/i18n/sl.po | 49 ++++ 13 files changed, 819 insertions(+), 126 deletions(-) create mode 100644 addons/account_test/i18n/ro.po create mode 100644 addons/auth_oauth/i18n/ro.po create mode 100644 addons/auth_oauth/i18n/sl.po create mode 100644 addons/auth_oauth_signup/i18n/ro.po create mode 100644 addons/purchase_double_validation/i18n/sl.po diff --git a/addons/account_test/i18n/ro.po b/addons/account_test/i18n/ro.po new file mode 100644 index 00000000000..90a9fdb18d8 --- /dev/null +++ b/addons/account_test/i18n/ro.po @@ -0,0 +1,287 @@ +# Romanian 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-01-14 18:37+0000\n" +"Last-Translator: Fekete Mihai \n" +"Language-Team: Romanian \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Launchpad-Export-Date: 2013-01-15 05:31+0000\n" +"X-Generator: Launchpad (build 16420)\n" + +#. module: account_test +#: view:accounting.assert.test:0 +msgid "" +"Code should always set a variable named `result` with the result of your " +"test, that can be a list or\n" +"a dictionary. If `result` is an empty list, it means that the test was " +"succesful. Otherwise it will\n" +"try to translate and print what is inside `result`.\n" +"\n" +"If the result of your test is a dictionary, you can set a variable named " +"`column_order` to choose in\n" +"what order you want to print `result`'s content.\n" +"\n" +"Should you need them, you can also use the following variables into your " +"code:\n" +" * cr: cursor to the database\n" +" * uid: ID of the current user\n" +"\n" +"In any ways, the code must be legal python statements with correct " +"indentation (if needed).\n" +"\n" +"Example: \n" +" sql = '''SELECT id, name, ref, date\n" +" FROM account_move_line \n" +" WHERE account_id IN (SELECT id FROM account_account WHERE type " +"= 'view')\n" +" '''\n" +" cr.execute(sql)\n" +" result = cr.dictfetchall()" +msgstr "" +"Codul ar trebui sa configureze o variabila numita `rezultat` cu rezultatul " +"testului dumneavoastra, care poate fi o lista sau un dictionar. Daca " +"`rezultat` este o lista goala, inseamna ca testul a avut succes. In caz " +"contrar, va incerca sa traduca si sa tipareasca ceea ce se afla in " +"`rezultat`.\n" +"\n" +"Daca rezultatul testului dumneavoastra este un dictionar, puteti configura o " +"variabila numita`coloana_comanda` pentru a alege ordinea in care doriti " +"tiparirea continutul din `rezultat`.\n" +"\n" +"Daca o sa aveti nevoie de ele, puteti utiliza de asemenea urmatoarele " +"variabile in codul dumneavoastra:\n" +" * cr: cursorul in baza de date\n" +" * uid: ID-ul utilizatorului actual\n" +"\n" +"Oricum, codul trebuie sa fie declaratii python legale cu indentare corecta " +"(daca este necesara).\n" +"\n" +"Exemplu: \n" +" sql = '''SELECTEAZA id, nume, ref, data\n" +" DIN cont_miscare_linie \n" +" UNDE cont_id IN (SELECTEAZA id DIN cont_cont UNDE tip = " +"'vizualizare')\n" +" '''\n" +" cr.execute(sql)\n" +" rezultat = cr.dictfetchall()" + +#. module: account_test +#: model:accounting.assert.test,name:account_test.account_test_02 +msgid "Test 2: Opening a fiscal year" +msgstr "Testul 2: Deschiderea unui an fiscal" + +#. module: account_test +#: model:accounting.assert.test,desc:account_test.account_test_05 +msgid "" +"Check that reconciled invoice for Sales/Purchases has reconciled entries for " +"Payable and Receivable Accounts" +msgstr "" +"Verificati daca factura reconciliata pentru Vanzari/Achizitii a reconciliat " +"inregistrarile pentru Conturile de Plati si de Incasari" + +#. module: account_test +#: model:accounting.assert.test,desc:account_test.account_test_03 +msgid "" +"Check if movement lines are balanced and have the same date and period" +msgstr "" +"Verificati daca liniile miscarii sunt echilibrate si au aceeasi data si " +"perioada" + +#. module: account_test +#: field:accounting.assert.test,name:0 +msgid "Test Name" +msgstr "Numele Testului" + +#. module: account_test +#: report:account.test.assert.print:0 +msgid "Accouting tests on" +msgstr "Teste contabile in" + +#. module: account_test +#: model:accounting.assert.test,name:account_test.account_test_01 +msgid "Test 1: General balance" +msgstr "Testul 1: Soldul general" + +#. module: account_test +#: model:accounting.assert.test,desc:account_test.account_test_06 +msgid "Check that paid/reconciled invoices are not in 'Open' state" +msgstr "" +"Verificati ca facturile platite/reconciliate sa nu fie in starea 'Deschisa'" + +#. module: account_test +#: model:accounting.assert.test,desc:account_test.account_test_05_2 +msgid "" +"Check that reconciled account moves, that define Payable and Receivable " +"accounts, are belonging to reconciled invoices" +msgstr "" +"Verificati ca miscarile reconciliate ale contului, care definesc conturile " +"de Plati si de Incasari, sa apartina facturilor reconciliate" + +#. module: account_test +#: view:accounting.assert.test:0 +msgid "Tests" +msgstr "Teste" + +#. module: account_test +#: field:accounting.assert.test,desc:0 +msgid "Test Description" +msgstr "Descrierea Testului" + +#. module: account_test +#: view:accounting.assert.test:0 +msgid "Description" +msgstr "Descriere" + +#. module: account_test +#: model:accounting.assert.test,desc:account_test.account_test_06_1 +msgid "Check that there's no move for any account with « View » account type" +msgstr "" +"Verificati sa nu existe nicio miscare pentru niciun cont de tipul " +"« Vizualizare »" + +#. module: account_test +#: model:accounting.assert.test,name:account_test.account_test_08 +msgid "Test 9 : Accounts and partners on account moves" +msgstr "Testul 9: Conturile si partenerii din miscarile contului" + +#. module: account_test +#: model:ir.actions.act_window,name:account_test.action_accounting_assert +#: model:ir.actions.report.xml,name:account_test.account_assert_test_report +#: model:ir.ui.menu,name:account_test.menu_action_license +msgid "Accounting Tests" +msgstr "Teste Contabile" + +#. module: account_test +#: code:addons/account_test/report/account_test_report.py:74 +#, python-format +msgid "The test was passed successfully" +msgstr "Testul a fost trecut cu succes" + +#. module: account_test +#: field:accounting.assert.test,active:0 +msgid "Active" +msgstr "Activ(a)" + +#. module: account_test +#: model:accounting.assert.test,name:account_test.account_test_06 +msgid "Test 6 : Invoices status" +msgstr "Testul 6  : Starea facturilor" + +#. module: account_test +#: model:ir.model,name:account_test.model_accounting_assert_test +msgid "accounting.assert.test" +msgstr "contabilitate.impune.test" + +#. module: account_test +#: model:accounting.assert.test,name:account_test.account_test_05 +msgid "" +"Test 5.1 : Payable and Receivable accountant lines of reconciled invoices" +msgstr "" +"Test 5.1 : Liniile contabile de plati si incasari ale facturilor reconciliate" + +#. module: account_test +#: field:accounting.assert.test,code_exec:0 +msgid "Python code" +msgstr "Cod python" + +#. module: account_test +#: model:accounting.assert.test,desc:account_test.account_test_07 +msgid "" +"Check on bank statement that the Closing Balance = Starting Balance + sum of " +"statement lines" +msgstr "" +"Verificati pe extrasele de cont ca Soldul de inchidere = Soldul de inceput + " +"suma liniilor extrasului" + +#. module: account_test +#: model:accounting.assert.test,name:account_test.account_test_07 +msgid "Test 8 : Closing balance on bank statements" +msgstr "Test 8 : Soldul de inchidere in extrasele bancare" + +#. module: account_test +#: model:accounting.assert.test,name:account_test.account_test_03 +msgid "Test 3: Movement lines" +msgstr "Test 3: Liniile miscarii" + +#. module: account_test +#: model:accounting.assert.test,name:account_test.account_test_05_2 +msgid "Test 5.2 : Reconcilied invoices and Payable/Receivable accounts" +msgstr "Test 5.2 : Facturi reconciliate si conturi de Plati/Incasari" + +#. module: account_test +#: view:accounting.assert.test:0 +msgid "Expression" +msgstr "Expresie" + +#. module: account_test +#: model:accounting.assert.test,name:account_test.account_test_04 +msgid "Test 4: Totally reconciled mouvements" +msgstr "Test 4: Miscari reconciliate complet" + +#. module: account_test +#: model:accounting.assert.test,desc:account_test.account_test_04 +msgid "Check if the totally reconciled movements are balanced" +msgstr "Verificati daca miscarile reconciliate complet sunt echilibrate" + +#. module: account_test +#: field:accounting.assert.test,sequence:0 +msgid "Sequence" +msgstr "Secventa" + +#. module: account_test +#: model:accounting.assert.test,desc:account_test.account_test_02 +msgid "" +"Check if the balance of the new opened fiscal year matches with last year's " +"balance" +msgstr "" +"Verificati daca soldul noului an fiscal deschis se potriveste cu soldul " +"ultimului an" + +#. module: account_test +#: view:accounting.assert.test:0 +msgid "Python Code" +msgstr "Cod Python" + +#. module: account_test +#: model:ir.actions.act_window,help:account_test.action_accounting_assert +msgid "" +"

\n" +" Click to create Accounting Test.\n" +"

\n" +" " +msgstr "" +"\n" +" Faceti click pentru ca crea un Test Contabil.\n" +"

\n" +" " + +#. module: account_test +#: model:accounting.assert.test,desc:account_test.account_test_01 +msgid "Check the balance: Debit sum = Credit sum" +msgstr "Verificati soldul: Suma debit = Suma credit" + +#. module: account_test +#: model:accounting.assert.test,desc:account_test.account_test_08 +msgid "Check that general accounts and partners on account moves are active" +msgstr "" +"Verificati ca conturile generale si partenerii din miscarile conturilor sa " +"fie active" + +#. module: account_test +#: model:accounting.assert.test,name:account_test.account_test_06_1 +msgid "Test 7: « View  » account type" +msgstr "Test 7: « Vizualizare  » tipul de cont" + +#. module: account_test +#: view:accounting.assert.test:0 +msgid "Code Help" +msgstr "Ajutor Cod" diff --git a/addons/account_voucher/i18n/ro.po b/addons/account_voucher/i18n/ro.po index 09526c4b569..336b5f173fe 100644 --- a/addons/account_voucher/i18n/ro.po +++ b/addons/account_voucher/i18n/ro.po @@ -8,30 +8,30 @@ msgstr "" "Project-Id-Version: openobject-addons\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2012-12-21 17:04+0000\n" -"PO-Revision-Date: 2012-12-21 23:00+0000\n" -"Last-Translator: FULL NAME \n" +"PO-Revision-Date: 2013-01-14 19:06+0000\n" +"Last-Translator: Fekete Mihai \n" "Language-Team: Romanian \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2012-12-22 07:05+0000\n" -"X-Generator: Launchpad (build 16378)\n" +"X-Launchpad-Export-Date: 2013-01-15 05:31+0000\n" +"X-Generator: Launchpad (build 16420)\n" #. module: account_voucher #: field:account.bank.statement.line,voucher_id:0 msgid "Reconciliation" -msgstr "" +msgstr "Reconciliere" #. module: account_voucher #: model:ir.model,name:account_voucher.model_account_config_settings msgid "account.config.settings" -msgstr "" +msgstr "setari.config.cont" #. module: account_voucher #: code:addons/account_voucher/account_voucher.py:357 #, python-format msgid "Write-Off" -msgstr "Ajustare" +msgstr "Pierdere" #. module: account_voucher #: view:account.voucher:0 @@ -46,7 +46,7 @@ msgstr "Suma totala" #. module: account_voucher #: view:account.voucher:0 msgid "Open Customer Journal Entries" -msgstr "Deschideti Inregistrarile in Jurnal ale Clientului" +msgstr "Deschide Inregistrarile Clientului in Registru" #. module: account_voucher #: view:account.voucher:0 @@ -66,7 +66,7 @@ msgstr "" #. module: account_voucher #: view:account.voucher:0 msgid "(Update)" -msgstr "" +msgstr "(Actualizare)" #. module: account_voucher #: view:account.voucher:0 @@ -93,7 +93,7 @@ msgstr "Martie" #. module: account_voucher #: field:account.voucher,message_unread:0 msgid "Unread Messages" -msgstr "" +msgstr "Mesaje necitite" #. module: account_voucher #: view:account.voucher:0 @@ -103,7 +103,7 @@ msgstr "Platiti factura" #. module: account_voucher #: view:account.voucher:0 msgid "Are you sure you want to cancel this receipt?" -msgstr "" +msgstr "Sunteti sigur(a) ca doriti sa anulati aceasta chitanta?" #. module: account_voucher #: view:account.voucher:0 @@ -124,7 +124,7 @@ msgstr "Grupati dupa anul Datei Facturii" #: view:sale.receipt.report:0 #: field:sale.receipt.report,user_id:0 msgid "Salesperson" -msgstr "" +msgstr "Agent de vanzari" #. module: account_voucher #: view:account.voucher:0 @@ -138,17 +138,19 @@ msgid "" "You can not change the journal as you already reconciled some statement " "lines!" msgstr "" +"Nu puteti schimba registrul pentru ca deja ati reconciliat niste linii ale " +"extrasului!" #. module: account_voucher #: view:account.voucher:0 msgid "Validate" -msgstr "Validati" +msgstr "Valideaza" #. module: account_voucher #: model:ir.actions.act_window,name:account_voucher.action_vendor_payment #: model:ir.ui.menu,name:account_voucher.menu_action_vendor_payment msgid "Supplier Payments" -msgstr "" +msgstr "Plati Furnizori" #. module: account_voucher #: model:ir.actions.act_window,help:account_voucher.action_purchase_receipt @@ -161,6 +163,15 @@ msgid "" "

\n" " " msgstr "" +"\n" +" Faceti click pentru a inregistra o chitanta de cumparare. \n" +"

\n" +" Atunci cand este confirmata o chitanta de cumparare, puteti " +"inregistra\n" +" plata furnizorului asociata acestei chitante de " +"cumparaturi.\n" +"

\n" +" " #. module: account_voucher #: view:account.voucher:0 @@ -210,13 +221,13 @@ msgstr "Note" #. module: account_voucher #: field:account.voucher,message_ids:0 msgid "Messages" -msgstr "" +msgstr "Mesaje" #. module: account_voucher #: model:ir.actions.act_window,name:account_voucher.action_purchase_receipt #: model:ir.ui.menu,name:account_voucher.menu_action_purchase_receipt msgid "Purchase Receipts" -msgstr "" +msgstr "Chitante de Cumparaturi" #. module: account_voucher #: field:account.voucher.line,move_line_id:0 @@ -228,12 +239,12 @@ msgstr "Element Jurnal" #: code:addons/account_voucher/account_voucher.py:967 #, python-format msgid "Error!" -msgstr "" +msgstr "Eroare!" #. module: account_voucher #: field:account.voucher.line,amount:0 msgid "Amount" -msgstr "Suma" +msgstr "Valoare" #. module: account_voucher #: view:account.voucher:0 @@ -272,16 +283,24 @@ msgid "" "

\n" " " msgstr "" +"\n" +" Faceti click pentru a crea o chitanta de vanzari.\n" +"

\n" +" Atunci cand o chitanta de vanzari este confirmata, puteti " +"inregistra plata\n" +" clientului asociata acestei chitante de vanzari.\n" +"

\n" +" " #. module: account_voucher #: help:account.voucher,message_unread:0 msgid "If checked new messages require your attention." -msgstr "" +msgstr "Daca este selectat, mesajele noi necesita atentia dumneavoastra." #. module: account_voucher #: model:ir.model,name:account_voucher.model_account_bank_statement_line msgid "Bank Statement Line" -msgstr "Linie extras de cont" +msgstr "Linia Extrasului de Cont" #. module: account_voucher #: view:sale.receipt.report:0 @@ -298,7 +317,7 @@ msgstr "Taxa" #: code:addons/account_voucher/account_voucher.py:867 #, python-format msgid "Invalid Action!" -msgstr "" +msgstr "Actiune Nevalida!" #. module: account_voucher #: field:account.voucher,comment:0 @@ -316,6 +335,8 @@ msgid "" "Holds the Chatter summary (number of messages, ...). This summary is " "directly in html format in order to be inserted in kanban views." msgstr "" +"Contine rezumatul Chatter (numar de mesaje, ...). Acest rezumat este direct " +"in format HTML, icu scopul de a se introduce in vizualizari kanban." #. module: account_voucher #: view:account.voucher:0 @@ -330,7 +351,7 @@ msgstr "Informatii plata" #. module: account_voucher #: view:account.voucher:0 msgid "(update)" -msgstr "" +msgstr "(actualizare)" #. module: account_voucher #: view:account.voucher:0 @@ -349,7 +370,7 @@ msgstr "Importati Facturi" #: code:addons/account_voucher/account_voucher.py:1098 #, python-format msgid "Wrong voucher line" -msgstr "" +msgstr "Linie incorecta a voucher-ului" #. module: account_voucher #: selection:account.voucher,pay_now:0 @@ -372,6 +393,9 @@ msgid "" "settings, to manage automatically the booking of accounting entries related " "to differences between exchange rates." msgstr "" +"Ar trebui sa configurati 'Cont Casting Curs de Schimb Valutar' in setarile " +"contabile, pentru a gestiona automat inregistrarile contabile asociate " +"diferentelor dintre cursurile de schimb valutar." #. module: account_voucher #: view:account.voucher:0 @@ -399,7 +423,7 @@ msgstr "Voucher furnizor" #. module: account_voucher #: field:account.voucher,message_follower_ids:0 msgid "Followers" -msgstr "" +msgstr "Persoane interesate" #. module: account_voucher #: selection:account.voucher.line,type:0 @@ -410,7 +434,7 @@ msgstr "Debit" #: code:addons/account_voucher/account_voucher.py:1533 #, python-format msgid "Unable to change journal !" -msgstr "" +msgstr "Registrul nu a putut fi schimbat !" #. module: account_voucher #: view:sale.receipt.report:0 @@ -446,11 +470,19 @@ msgid "" "

\n" " " msgstr "" +"\n" +" Faceti click pentru a crea o noua plata a furnizorului.\n" +"

\n" +" OpenERP va ajuta sa urmariti cu usurinta platile pe care le " +"faceti si soldurile ramase pe care trebuie sa le platiti furnizorilor " +"umneavoastra.\n" +"

\n" +" " #. module: account_voucher #: view:account.voucher:0 msgid "Open Supplier Journal Entries" -msgstr "Deschideti Inregistrarile in jurnal ale Furnizorului" +msgstr "Deschide Inregistrarile Furnizorului in Registru" #. module: account_voucher #: model:ir.actions.act_window,name:account_voucher.action_review_voucher_list @@ -496,6 +528,14 @@ msgid "" "\n" "* The 'Cancelled' status is used when user cancel voucher." msgstr "" +" * Starea 'Ciorna' este utilizata atunci cand un utilizator inregistreaza un " +"Voucher nou si neconfirmat. \n" +"* 'Pro-forma' este atunci cand voucher-ul este in starea Pro-forma,iar " +"voucher-ul nu are numar. \n" +"* Starea 'Postat' este atunci cand utilizatorul creeaza voucher-ul, este " +"generat un numar pentru voucher si inregistrarile voucher-ului sunt create " +"in cont \n" +"* Starea 'Anulat' este atunci cand utilizatorul anuleaza voucher-ul." #. module: account_voucher #: field:account.voucher,writeoff_amount:0 diff --git a/addons/auth_ldap/i18n/ro.po b/addons/auth_ldap/i18n/ro.po index f94009017aa..91f11083eb1 100644 --- a/addons/auth_ldap/i18n/ro.po +++ b/addons/auth_ldap/i18n/ro.po @@ -8,19 +8,19 @@ 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: 2012-12-21 23:00+0000\n" -"Last-Translator: FULL NAME \n" +"PO-Revision-Date: 2013-01-14 19:18+0000\n" +"Last-Translator: Fekete Mihai \n" "Language-Team: Romanian \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2012-12-22 07:06+0000\n" -"X-Generator: Launchpad (build 16378)\n" +"X-Launchpad-Export-Date: 2013-01-15 05:31+0000\n" +"X-Generator: Launchpad (build 16420)\n" #. module: auth_ldap #: field:res.company.ldap,user:0 msgid "Template User" -msgstr "" +msgstr "Sablon Utilizator" #. module: auth_ldap #: help:res.company.ldap,ldap_tls:0 @@ -65,6 +65,8 @@ msgid "" "Automatically create local user accounts for new users authenticating via " "LDAP" msgstr "" +"Creeaza automat conturi de utilizatori locali pentru utilizatorii care se " +"autentifica prin intermediul LDAP" #. module: auth_ldap #: field:res.company.ldap,ldap_base:0 @@ -99,7 +101,7 @@ msgstr "res.ldap.companie" #. module: auth_ldap #: help:res.company.ldap,user:0 msgid "User to copy when creating new users" -msgstr "" +msgstr "Utilizator de copiat atunci cand creeaza utilizatori noi" #. module: auth_ldap #: field:res.company.ldap,ldap_tls:0 @@ -153,7 +155,7 @@ msgstr "" #. module: auth_ldap #: model:ir.model,name:auth_ldap.model_res_users msgid "Users" -msgstr "" +msgstr "Utilizatori" #. module: auth_ldap #: field:res.company.ldap,ldap_filter:0 @@ -163,4 +165,4 @@ msgstr "Filtru LDAP" #. module: auth_ldap #: field:res.company.ldap,create_user:0 msgid "Create user" -msgstr "Creare utilizator" +msgstr "Creeaza utilizator" diff --git a/addons/auth_oauth/i18n/ro.po b/addons/auth_oauth/i18n/ro.po new file mode 100644 index 00000000000..cb1c78ab02f --- /dev/null +++ b/addons/auth_oauth/i18n/ro.po @@ -0,0 +1,135 @@ +# Romanian 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-01-14 19:28+0000\n" +"Last-Translator: Fekete Mihai \n" +"Language-Team: Romanian \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Launchpad-Export-Date: 2013-01-15 05:31+0000\n" +"X-Generator: Launchpad (build 16420)\n" + +#. module: auth_oauth +#: field:auth.oauth.provider,validation_endpoint:0 +msgid "Validation URL" +msgstr "URL Validare" + +#. module: auth_oauth +#: field:auth.oauth.provider,auth_endpoint:0 +msgid "Authentication URL" +msgstr "URL Autentificare" + +#. module: auth_oauth +#: model:ir.model,name:auth_oauth.model_base_config_settings +msgid "base.config.settings" +msgstr "base.config.settings (setari.config.de_baza)" + +#. module: auth_oauth +#: field:auth.oauth.provider,name:0 +msgid "Provider name" +msgstr "Numele furnizorului" + +#. module: auth_oauth +#: field:auth.oauth.provider,scope:0 +msgid "Scope" +msgstr "Scope" + +#. module: auth_oauth +#: field:res.users,oauth_provider_id:0 +msgid "OAuth Provider" +msgstr "Furnizor OAuth" + +#. module: auth_oauth +#: field:auth.oauth.provider,css_class:0 +msgid "CSS class" +msgstr "clasa CSS" + +#. module: auth_oauth +#: field:auth.oauth.provider,body:0 +msgid "Body" +msgstr "Continut" + +#. module: auth_oauth +#: model:ir.model,name:auth_oauth.model_res_users +msgid "Users" +msgstr "Utilizatori" + +#. module: auth_oauth +#: field:auth.oauth.provider,sequence:0 +msgid "unknown" +msgstr "necunoscut(a)" + +#. module: auth_oauth +#: field:res.users,oauth_access_token:0 +msgid "OAuth Access Token" +msgstr "Simbol de Acces OAuth" + +#. 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 "ID Client" + +#. module: auth_oauth +#: model:ir.ui.menu,name:auth_oauth.menu_oauth_providers +msgid "OAuth Providers" +msgstr "Furnizori OAuth" + +#. module: auth_oauth +#: model:ir.model,name:auth_oauth.model_auth_oauth_provider +msgid "OAuth2 provider" +msgstr "Furnizor OAuth2" + +#. module: auth_oauth +#: field:res.users,oauth_uid:0 +msgid "OAuth User ID" +msgstr "ID Utilizator OAuth" + +#. module: auth_oauth +#: field:base.config.settings,auth_oauth_facebook_enabled:0 +msgid "Allow users to sign in with Facebook" +msgstr "Le permite utilizatorilor sa se conecteze cu Facebook" + +#. module: auth_oauth +#: sql_constraint:res.users:0 +msgid "OAuth UID must be unique per provider" +msgstr "UID OAth trebuie sa fie unic pentru fiecare furnizor" + +#. module: auth_oauth +#: help:res.users,oauth_uid:0 +msgid "Oauth Provider user_id" +msgstr "id_utilizator Furnizor Oauth" + +#. module: auth_oauth +#: field:auth.oauth.provider,data_endpoint:0 +msgid "Data URL" +msgstr "URL Date" + +#. module: auth_oauth +#: view:auth.oauth.provider:0 +msgid "arch" +msgstr "arc" + +#. module: auth_oauth +#: model:ir.actions.act_window,name:auth_oauth.action_oauth_provider +msgid "Providers" +msgstr "Furnizori" + +#. module: auth_oauth +#: field:base.config.settings,auth_oauth_google_enabled:0 +msgid "Allow users to sign in with Google" +msgstr "Le permite utilizatorilor sa se conecteze cu Google" + +#. module: auth_oauth +#: field:auth.oauth.provider,enabled:0 +msgid "Allowed" +msgstr "Permis" diff --git a/addons/auth_oauth/i18n/sl.po b/addons/auth_oauth/i18n/sl.po new file mode 100644 index 00000000000..984c0ebbfb3 --- /dev/null +++ b/addons/auth_oauth/i18n/sl.po @@ -0,0 +1,135 @@ +# Slovenian 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-01-14 17:09+0000\n" +"Last-Translator: Dušan Laznik (Mentis) \n" +"Language-Team: Slovenian \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Launchpad-Export-Date: 2013-01-15 05:31+0000\n" +"X-Generator: Launchpad (build 16420)\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 "Uporabniki" + +#. module: auth_oauth +#: field:auth.oauth.provider,sequence:0 +msgid "unknown" +msgstr "neznano" + +#. 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/auth_oauth_signup/i18n/ro.po b/addons/auth_oauth_signup/i18n/ro.po new file mode 100644 index 00000000000..defbde72b1a --- /dev/null +++ b/addons/auth_oauth_signup/i18n/ro.po @@ -0,0 +1,23 @@ +# Romanian 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-01-14 19:07+0000\n" +"Last-Translator: Fekete Mihai \n" +"Language-Team: Romanian \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Launchpad-Export-Date: 2013-01-15 05:31+0000\n" +"X-Generator: Launchpad (build 16420)\n" + +#. module: auth_oauth_signup +#: model:ir.model,name:auth_oauth_signup.model_res_users +msgid "Users" +msgstr "Utilizatori" diff --git a/addons/base_setup/i18n/sl.po b/addons/base_setup/i18n/sl.po index 0b1c199b3ff..664717b2294 100644 --- a/addons/base_setup/i18n/sl.po +++ b/addons/base_setup/i18n/sl.po @@ -8,14 +8,14 @@ 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: 2012-12-27 18:13+0000\n" -"Last-Translator: Dusan Laznik \n" +"PO-Revision-Date: 2013-01-14 17:25+0000\n" +"Last-Translator: Dušan Laznik (Mentis) \n" "Language-Team: Slovenian \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2012-12-28 05:36+0000\n" -"X-Generator: Launchpad (build 16378)\n" +"X-Launchpad-Export-Date: 2013-01-15 05:31+0000\n" +"X-Generator: Launchpad (build 16420)\n" #. module: base_setup #: view:sale.config.settings:0 @@ -101,7 +101,7 @@ msgstr "E-pošta" #. module: base_setup #: field:sale.config.settings,module_crm:0 msgid "CRM" -msgstr "" +msgstr "CRM" #. module: base_setup #: selection:base.setup.terminology,partner:0 @@ -116,7 +116,7 @@ msgstr "" #. module: base_setup #: field:base.config.settings,module_multi_company:0 msgid "Manage multiple companies" -msgstr "" +msgstr "Več podjetij" #. module: base_setup #: view:sale.config.settings:0 diff --git a/addons/document/i18n/zh_CN.po b/addons/document/i18n/zh_CN.po index f80cc890bf4..208e01ac881 100644 --- a/addons/document/i18n/zh_CN.po +++ b/addons/document/i18n/zh_CN.po @@ -14,7 +14,7 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-01-14 05:18+0000\n" +"X-Launchpad-Export-Date: 2013-01-15 05:31+0000\n" "X-Generator: Launchpad (build 16420)\n" #. module: document diff --git a/addons/procurement/i18n/sl.po b/addons/procurement/i18n/sl.po index 19aa893596a..93f4d1be789 100644 --- a/addons/procurement/i18n/sl.po +++ b/addons/procurement/i18n/sl.po @@ -8,14 +8,14 @@ msgstr "" "Project-Id-Version: openobject-addons\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2012-12-21 17:06+0000\n" -"PO-Revision-Date: 2013-01-01 21:33+0000\n" -"Last-Translator: Dusan Laznik (Mentis) \n" +"PO-Revision-Date: 2013-01-14 18:18+0000\n" +"Last-Translator: Dušan Laznik (Mentis) \n" "Language-Team: Slovenian \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-01-02 05:26+0000\n" -"X-Generator: Launchpad (build 16378)\n" +"X-Launchpad-Export-Date: 2013-01-15 05:32+0000\n" +"X-Generator: Launchpad (build 16420)\n" #. module: procurement #: model:ir.ui.menu,name:procurement.menu_stock_sched @@ -45,7 +45,7 @@ msgstr "Združeno po..." #. module: procurement #: help:stock.warehouse.orderpoint,procurement_draft_ids:0 msgid "Draft procurement of the product and location of that orderpoint" -msgstr "" +msgstr "Osnutek naloga za oskrbo in lokacija točke naročanja" #. module: procurement #: view:product.product:0 @@ -64,6 +64,8 @@ msgid "" "inventory, you should\n" " create others rules like orderpoints." msgstr "" +"Če ni dovolj razpoložljive zaloge , bo nalog za dostavo\n" +" čakal na razpoložljivost." #. module: procurement #: field:procurement.order,procure_method:0 @@ -188,7 +190,7 @@ msgstr "Premik zaloge" #. module: procurement #: view:product.product:0 msgid "Stockable products" -msgstr "" +msgstr "Skladiščni izdelki" #. module: procurement #: code:addons/procurement/procurement.py:137 @@ -230,6 +232,11 @@ msgid "" "

\n" " " msgstr "" +"

\n" +" Interni nalogi za oskrbo izražajo potrebo za oskrbo v točno " +"določenem času na določeni lokaciji.\n" +"

\n" +" " #. module: procurement #: selection:procurement.order,state:0 @@ -255,7 +262,7 @@ msgstr "Potrdi" #. module: procurement #: view:stock.warehouse.orderpoint:0 msgid "Quantity Multiple" -msgstr "" +msgstr "Količina za zaokroževanje" #. module: procurement #: help:procurement.order,origin:0 @@ -267,7 +274,7 @@ msgstr "Dokument , ki je osnova za to interno naročilo oskrbe." #. module: procurement #: view:stock.warehouse.orderpoint:0 msgid "Procurement Orders to Process" -msgstr "" +msgstr "Interni nalogi za oskrbo za procesiranje" #. module: procurement #: model:ir.model,name:procurement.model_stock_warehouse_orderpoint @@ -278,7 +285,7 @@ msgstr "Pravilo minimalne zaloge" #: code:addons/procurement/procurement.py:369 #, python-format msgid "Procurement '%s' is in exception: " -msgstr "" +msgstr "Interni nalog za oskrbo '%s' ima napako: " #. module: procurement #: field:procurement.order,priority:0 @@ -288,7 +295,7 @@ msgstr "Prioriteta" #. module: procurement #: view:stock.warehouse.orderpoint:0 msgid "Reordering Rules Search" -msgstr "" +msgstr "Iskanje pravil oskrbe" #. module: procurement #: selection:procurement.order,state:0 @@ -322,13 +329,13 @@ msgstr "Skladišče" #. module: procurement #: selection:stock.warehouse.orderpoint,logic:0 msgid "Best price (not yet active!)" -msgstr "" +msgstr "Najboljša cena (še ni aktivno!)" #. module: procurement #: code:addons/procurement/schedulers.py:110 #, python-format msgid "PROC %d: from stock - %3.2f %-5s - %s" -msgstr "" +msgstr "PROC %d: iz zaloge - %3.2f %-5s - %s" #. module: procurement #: model:ir.model,name:procurement.model_procurement_order_compute @@ -338,12 +345,12 @@ msgstr "Izračun oskrbe" #. module: procurement #: field:res.company,schedule_range:0 msgid "Scheduler Range Days" -msgstr "" +msgstr "Obdobje za načrtovanje oskrbe" #. module: procurement #: view:make.procurement:0 msgid "Ask New Products" -msgstr "" +msgstr "Zahtevajte nove izdelke" #. module: procurement #: field:make.procurement,date_planned:0 @@ -410,6 +417,8 @@ msgid "" "If you encode manually a Procurement, you probably want to use a make to " "order method." msgstr "" +"Če ročno vnašate naloge za oskrbo , boste verjetno uporabili metodo \"Po " +"naročilu\"." #. module: procurement #: model:ir.ui.menu,name:procurement.menu_stock_procurement @@ -422,6 +431,8 @@ msgid "" "use the available\n" " inventory" msgstr "" +"uporabi razpoložljivo\n" +" zalogo" #. module: procurement #: model:ir.model,name:procurement.model_procurement_order @@ -500,7 +511,7 @@ msgstr "" msgid "" "If the active field is set to False, it will allow you to hide the " "orderpoint without removing it." -msgstr "" +msgstr "Omogoča umik iz uporabe , brez brisanja." #. module: procurement #: view:product.product:0 @@ -510,6 +521,8 @@ msgid "" "procurement method as\n" " 'Make to Stock'." msgstr "" +"Ko boste prodali to uslugo se ne bo izvedla nobena akcija,\n" +" ker je metoda oskrbe \"Iz Zaloge\"." #. module: procurement #: help:procurement.orderpoint.compute,automatic:0 @@ -554,6 +567,8 @@ msgid "" "OpenERP generates a procurement to bring the forecasted quantity to the Max " "Quantity." msgstr "" +"Ko bo virtualna zaloga padla pod minimalno , bo OpenERP izdelal nalog za " +"oskrbo , ki bo dvignil načrtovano zalogo na maksimum." #. module: procurement #: selection:procurement.order,state:0 @@ -651,27 +666,29 @@ msgid "" "When you sell this product, a delivery order will be created.\n" " OpenERP will consider that the" msgstr "" +"Ko prodate ta izdelek , bo OpenERP izdelal nalog za dobavo.\n" +" OpenERP bo upošteval da" #. module: procurement #: code:addons/procurement/schedulers.py:133 #, python-format msgid "Automatic OP: %s" -msgstr "" +msgstr "Točka naročanja: %s" #. module: procurement #: model:ir.model,name:procurement.model_procurement_orderpoint_compute msgid "Automatic Order Point" -msgstr "" +msgstr "Točka naročanja" #. module: procurement #: field:stock.warehouse.orderpoint,qty_multiple:0 msgid "Qty Multiple" -msgstr "" +msgstr "Količina za zaokroževanje" #. module: procurement #: help:stock.warehouse.orderpoint,qty_multiple:0 msgid "The procurement quantity will be rounded up to this multiple." -msgstr "" +msgstr "Količina bo zaokrožena na vneseno količino" #. module: procurement #: model:ir.model,name:procurement.model_res_company @@ -691,12 +708,12 @@ msgstr "Povzetek" #. module: procurement #: sql_constraint:stock.warehouse.orderpoint:0 msgid "Qty Multiple must be greater than zero." -msgstr "" +msgstr "Količina za zaokroževanje mora biti večja od 0." #. module: procurement #: selection:stock.warehouse.orderpoint,logic:0 msgid "Order to Max" -msgstr "" +msgstr "Oskrba do Max" #. module: procurement #: field:procurement.order,date_close:0 @@ -768,7 +785,7 @@ msgstr "Prekliči" #. module: procurement #: field:stock.warehouse.orderpoint,logic:0 msgid "Reordering Mode" -msgstr "" +msgstr "Način naročanja" #. module: procurement #: field:procurement.order,origin:0 @@ -784,7 +801,7 @@ msgstr "Ni nujno" #: model:ir.actions.act_window,name:procurement.product_open_orderpoint #: view:product.product:0 msgid "Orderpoints" -msgstr "" +msgstr "Točke naročanja" #. module: procurement #: help:stock.warehouse.orderpoint,product_max_qty:0 @@ -797,7 +814,7 @@ msgstr "" #. module: procurement #: model:ir.model,name:procurement.model_procurement_order_compute_all msgid "Compute all schedulers" -msgstr "" +msgstr "Izvedi vse načrtovalce" #. module: procurement #: view:procurement.order:0 @@ -837,7 +854,7 @@ msgstr "" #. module: procurement #: field:procurement.order,close_move:0 msgid "Close Move at end" -msgstr "" +msgstr "Zapri premik ob zaključku" #. module: procurement #: view:procurement.order:0 @@ -900,7 +917,7 @@ msgstr "Oskrba je odvisna od vrste izdelka." #. module: procurement #: view:product.product:0 msgid "When you sell this product, OpenERP will" -msgstr "" +msgstr "Ko prodate ta izdelek, bo OpenERP" #. module: procurement #: view:procurement.order:0 @@ -925,13 +942,13 @@ msgstr "maks" #: model:ir.ui.menu,name:procurement.menu_stock_order_points #: view:stock.warehouse.orderpoint:0 msgid "Reordering Rules" -msgstr "" +msgstr "Pravila oskrbe" #. module: procurement #: code:addons/procurement/procurement.py:138 #, python-format msgid "Cannot delete Procurement Order(s) which are in %s state." -msgstr "" +msgstr "Ni možno brisati naloga za oskrbo , ki ima status %s." #. module: procurement #: field:procurement.order,product_uos:0 @@ -948,11 +965,12 @@ msgstr "Predloga izdelka" msgid "" "Wizard checks all the stock minimum rules and generate procurement order." msgstr "" +"Čarovnik bo preveril vsa pravila minimalne zaloge in izdelal naloge za oskrbo" #. module: procurement #: view:procurement.order:0 msgid "Search Procurement" -msgstr "" +msgstr "Iskanje internih oskrbnih nalogov" #. module: procurement #: help:res.company,schedule_range:0 @@ -970,7 +988,7 @@ msgstr "Zelo nujno" #. module: procurement #: field:procurement.orderpoint.compute,automatic:0 msgid "Automatic Orderpoint" -msgstr "" +msgstr "Točka naročanja" #. module: procurement #: help:procurement.order,message_ids:0 @@ -980,7 +998,7 @@ msgstr "Sporočila in zgodovina sporočil" #. module: procurement #: view:procurement.order:0 msgid "Procurement started late" -msgstr "" +msgstr "Zamuda pri oskrbi" #. module: procurement #: selection:mrp.property,composition:0 @@ -1004,13 +1022,13 @@ msgstr "NAČRTOVALEC" #. module: procurement #: view:product.product:0 msgid "Request Procurement" -msgstr "" +msgstr "Zahtevajte oskrbo" #. module: procurement #: code:addons/procurement/schedulers.py:87 #, python-format msgid "PROC %d: on order - %3.2f %-5s - %s" -msgstr "" +msgstr "PROC %d: na naročilu - %3.2f %-5s - %s" #. module: procurement #: code:addons/procurement/procurement.py:338 diff --git a/addons/product/i18n/sl.po b/addons/product/i18n/sl.po index 04c34c75e84..e5163a0bab0 100644 --- a/addons/product/i18n/sl.po +++ b/addons/product/i18n/sl.po @@ -8,14 +8,14 @@ msgstr "" "Project-Id-Version: openobject-addons\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2012-12-21 17:06+0000\n" -"PO-Revision-Date: 2013-01-05 17:38+0000\n" -"Last-Translator: Dusan Laznik (Mentis) \n" +"PO-Revision-Date: 2013-01-14 18:37+0000\n" +"Last-Translator: Dušan Laznik (Mentis) \n" "Language-Team: Slovenian \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-01-06 05:31+0000\n" -"X-Generator: Launchpad (build 16393)\n" +"X-Launchpad-Export-Date: 2013-01-15 05:32+0000\n" +"X-Generator: Launchpad (build 16420)\n" #. module: product #: field:product.packaging,rows:0 @@ -402,6 +402,7 @@ msgid "" "Specify a product if this rule only applies to one product. Keep empty " "otherwise." msgstr "" +"Določite izdelek če pravilo velja le za ta izdelek, drugače pustite prazno." #. module: product #: model:product.uom.categ,name:product.product_uom_categ_kgm @@ -421,6 +422,7 @@ msgid "" "Otherwise, this includes goods stored in any Stock Location with 'internal' " "type." msgstr "" +"Predvidena zaloga (trenutna zaloga+naročila dobaviteljem-naročila kupcev)" #. module: product #: field:product.packaging,height:0 @@ -603,7 +605,7 @@ msgstr "Levi panel" #. module: product #: help:product.pricelist.item,price_max_margin:0 msgid "Specify the maximum amount of margin over the base price." -msgstr "" +msgstr "Določite maksimalno razliko nad osnovno ceno." #. module: product #: constraint:product.pricelist.item:0 @@ -691,6 +693,8 @@ msgid "" "period (usually every year). \n" "Average Price: The cost price is recomputed at each incoming shipment." msgstr "" +"Planska cena : Določena za celotno obdobje (ponavadi leto)\n" +"Povprečna cena:Izračuna se ob vsaki nabavi" #. module: product #: field:product.product,qty_available:0 @@ -962,7 +966,7 @@ msgstr "Ne morete imeti 2 različic cenika , ki se prekrivata" msgid "" "Specify the minimum quantity that needs to be bought/sold for the rule to " "apply." -msgstr "" +msgstr "Določite minimalno količino , ki bo sprožila to pravilo." #. module: product #: help:product.pricelist.version,date_start:0 @@ -1495,7 +1499,7 @@ msgstr "" #. module: product #: view:product.pricelist:0 msgid "Products Price" -msgstr "" +msgstr "Cena izdelkov" #. module: product #: model:product.template,description:product.product_product_26_product_template @@ -1518,7 +1522,7 @@ msgstr "Natančnost zaokroževanja" #. module: product #: view:product.product:0 msgid "Consumable products" -msgstr "" +msgstr "Potrošni izdelki" #. module: product #: model:product.template,name:product.product_product_21_product_template @@ -1646,7 +1650,7 @@ msgstr "" #. module: product #: selection:product.uom,uom_type:0 msgid "Smaller than the reference Unit of Measure" -msgstr "" +msgstr "Manjše od referenčne enote mere" #. module: product #: model:product.pricelist,name:product.list0 @@ -1767,7 +1771,7 @@ msgstr "Switch, 24 ports" #. module: product #: selection:product.uom,uom_type:0 msgid "Bigger than the reference Unit of Measure" -msgstr "" +msgstr "Večje od referenčne enote mere" #. module: product #: model:product.template,name:product.product_product_consultant_product_template @@ -1778,7 +1782,7 @@ msgstr "Storitev" #. module: product #: view:product.template:0 msgid "Internal Description" -msgstr "" +msgstr "Interni opis" #. module: product #: model:product.template,name:product.product_product_48_product_template @@ -1899,7 +1903,7 @@ msgstr "Barvvni index" #. module: product #: help:product.template,sale_ok:0 msgid "Specify if the product can be selected in a sales order line." -msgstr "" +msgstr "Določite če se izdelek pojavlja na naročilu kupca" #. module: product #: view:product.product:0 @@ -2058,7 +2062,7 @@ msgid "" "Location of the Warehouse of this Shop, or any of its children.\n" "Otherwise, this includes goods stored in any Stock Location with 'internal' " "type." -msgstr "" +msgstr "Trenutna zaloga" #. module: product #: help:product.template,type:0 @@ -2153,7 +2157,7 @@ msgstr "Opisi" #. module: product #: model:res.groups,name:product.group_stock_packaging msgid "Manage Product Packaging" -msgstr "" +msgstr "Pakiranje izdelkov" #. module: product #: model:product.category,name:product.product_category_2 @@ -2379,7 +2383,7 @@ msgstr "" #. module: product #: field:product.supplierinfo,product_uom:0 msgid "Supplier Unit of Measure" -msgstr "" +msgstr "Dobaviteljeva enota mere" #. module: product #: view:product.product:0 diff --git a/addons/project_gtd/i18n/pl.po b/addons/project_gtd/i18n/pl.po index 2a030320e27..952bf802250 100644 --- a/addons/project_gtd/i18n/pl.po +++ b/addons/project_gtd/i18n/pl.po @@ -8,14 +8,14 @@ msgstr "" "Project-Id-Version: openobject-addons\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2012-12-21 17:06+0000\n" -"PO-Revision-Date: 2012-12-21 23:00+0000\n" -"Last-Translator: FULL NAME \n" +"PO-Revision-Date: 2013-01-14 14:46+0000\n" +"Last-Translator: Jarosław Ogrodnik \n" "Language-Team: Polish \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2012-12-22 07:29+0000\n" -"X-Generator: Launchpad (build 16378)\n" +"X-Launchpad-Export-Date: 2013-01-15 05:32+0000\n" +"X-Generator: Launchpad (build 16420)\n" #. module: project_gtd #: view:project.task:0 @@ -55,7 +55,7 @@ msgstr "Ramka pusta - Proces zakończony" #. module: project_gtd #: view:project.task:0 msgid "Pending Tasks" -msgstr "" +msgstr "Oczekujące zadania" #. module: project_gtd #: code:addons/project_gtd/wizard/project_gtd_empty.py:52 @@ -117,7 +117,7 @@ msgstr "Wstaw do ramki" #: model:ir.ui.menu,name:project_gtd.menu_open_gtd_timebox_tree #: view:project.task:0 msgid "My Tasks" -msgstr "" +msgstr "Moje zadania" #. module: project_gtd #: help:project.task,context_id:0 @@ -196,7 +196,7 @@ msgstr "" #: code:addons/project_gtd/wizard/project_gtd_empty.py:52 #, python-format msgid "Error!" -msgstr "" +msgstr "Błąd!" #. module: project_gtd #: model:ir.actions.act_window,name:project_gtd.open_gtd_timebox_tree @@ -299,4 +299,4 @@ msgstr "" #. module: project_gtd #: view:project.timebox.fill.plan:0 msgid "or" -msgstr "" +msgstr "lub" diff --git a/addons/purchase/i18n/sl.po b/addons/purchase/i18n/sl.po index 63adf2ad986..b02eb7e0da2 100644 --- a/addons/purchase/i18n/sl.po +++ b/addons/purchase/i18n/sl.po @@ -8,14 +8,14 @@ msgstr "" "Project-Id-Version: openobject-addons\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2012-12-21 17:04+0000\n" -"PO-Revision-Date: 2013-01-09 22:30+0000\n" -"Last-Translator: Dusan Laznik (Mentis) \n" +"PO-Revision-Date: 2013-01-14 15:55+0000\n" +"Last-Translator: Dušan Laznik (Mentis) \n" "Language-Team: Slovenian \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-01-10 05:36+0000\n" -"X-Generator: Launchpad (build 16412)\n" +"X-Launchpad-Export-Date: 2013-01-15 05:32+0000\n" +"X-Generator: Launchpad (build 16420)\n" #. module: purchase #: model:res.groups,name:purchase.group_analytic_accounting @@ -25,7 +25,7 @@ msgstr "Analitičen konto nabave" #. module: purchase #: model:ir.model,name:purchase.model_account_config_settings msgid "account.config.settings" -msgstr "" +msgstr "account.config.settings" #. module: purchase #: view:board.board:0 @@ -98,13 +98,13 @@ msgstr "Stroškovno mesto" msgid "" "Holds the Chatter summary (number of messages, ...). This summary is " "directly in html format in order to be inserted in kanban views." -msgstr "" +msgstr "Povzetek (število sporočil,..)" #. module: purchase #: code:addons/purchase/purchase.py:1024 #, python-format msgid "Configuration Error!" -msgstr "" +msgstr "Napaka v nastavitvah" #. module: purchase #: code:addons/purchase/purchase.py:587 @@ -127,7 +127,7 @@ msgstr "Standardna cena nabave" #: code:addons/purchase/purchase.py:1011 #, python-format msgid "No supplier defined for this product !" -msgstr "" +msgstr "Dobavitelj ni določen!" #. module: purchase #: model:ir.actions.act_window,help:purchase.action_picking_tree4_picking_to_invoice @@ -228,7 +228,7 @@ msgstr "Če želite izbrisati nabavni nalog, ga morate najprej preklicati." #. module: purchase #: view:product.product:0 msgid "When you sell this product, OpenERP will trigger" -msgstr "" +msgstr "Ko prodate ta izdelek bo OpenERP sprožil" #. module: purchase #: view:purchase.order:0 @@ -276,7 +276,7 @@ msgstr "Avgust" #. module: purchase #: view:product.product:0 msgid "to" -msgstr "" +msgstr "za" #. module: purchase #: selection:purchase.report,month:0 @@ -326,7 +326,7 @@ msgstr "" #. module: purchase #: view:product.product:0 msgid "When you sell this service to a customer," -msgstr "" +msgstr "Ko prodate to storitev kupcu," #. module: purchase #: model:process.transition,note:purchase.process_transition_createpackinglist0 @@ -435,12 +435,12 @@ msgstr "Predvideni datum" #. module: purchase #: field:purchase.order,currency_id:0 msgid "Currency" -msgstr "" +msgstr "Valuta" #. module: purchase #: field:purchase.order,journal_id:0 msgid "Journal" -msgstr "" +msgstr "Dnevnik" #. module: purchase #: view:board.board:0 @@ -462,7 +462,7 @@ msgstr "Nabavni nalogi z nefakturiranimi postavkami." #: view:product.product:0 #: field:product.template,purchase_ok:0 msgid "Can be Purchased" -msgstr "" +msgstr "Se lahko nabavi" #. module: purchase #: model:ir.ui.menu,name:purchase.menu_action_picking_tree_in_move @@ -472,7 +472,7 @@ msgstr "Naročeni produkti" #. module: purchase #: view:purchase.order:0 msgid "Request for Quotation " -msgstr "" +msgstr "Zahteva za ponudbo " #. module: purchase #: help:purchase.order,partner_ref:0 @@ -505,7 +505,7 @@ msgstr "" #. module: purchase #: model:mail.message.subtype,name:purchase.mt_rfq_approved msgid "RFQ Approved" -msgstr "" +msgstr "Zahteva za ponudbo odobrena" #. module: purchase #: view:purchase.config.settings:0 @@ -527,7 +527,7 @@ msgstr "" #. module: purchase #: model:mail.message.subtype,name:purchase.mt_rfq_confirmed msgid "RFQ Confirmed" -msgstr "" +msgstr "Zahteva za ponudbo potrjena" #. module: purchase #: view:purchase.order:0 @@ -594,7 +594,7 @@ msgstr "Dobavitelji" #. module: purchase #: view:product.product:0 msgid "To Purchase" -msgstr "" +msgstr "Za nabavo" #. module: purchase #: model:ir.actions.act_window,help:purchase.purchase_form_action @@ -718,7 +718,7 @@ msgstr "Cenik" #. module: purchase #: selection:purchase.order,state:0 msgid "Draft PO" -msgstr "Osnutek nabavnega naloga" +msgstr "Osnutek" #. module: purchase #: code:addons/purchase/purchase.py:941 @@ -747,7 +747,7 @@ msgstr "Datum Naročila" #. module: purchase #: field:purchase.config.settings,group_uom:0 msgid "Manage different units of measure for products" -msgstr "" +msgstr "Omogoči različne enote mere za izdelke" #. module: purchase #: model:process.node,name:purchase.process_node_invoiceafterpacking0 @@ -815,7 +815,7 @@ msgstr "To pomeni, da je bila faktura plačana" #. module: purchase #: field:purchase.order,notes:0 msgid "Terms and Conditions" -msgstr "" +msgstr "Pravila in pogoji" #. module: purchase #: help:purchase.order,date_order:0 @@ -1065,7 +1065,7 @@ msgstr "" #. module: purchase #: model:ir.model,name:purchase.model_mail_mail msgid "Outgoing Mails" -msgstr "" +msgstr "Odhajajoča sporočila" #. module: purchase #: code:addons/purchase/purchase.py:456 @@ -1202,7 +1202,7 @@ msgstr "Prenos zaloge" #: code:addons/purchase/purchase.py:260 #, python-format msgid "Invalid Action!" -msgstr "" +msgstr "Napačno dejanje!" #. module: purchase #: field:purchase.order,validator:0 @@ -1354,7 +1354,7 @@ msgstr "Za pregledat s strani računovodstva." #. module: purchase #: model:ir.model,name:purchase.model_purchase_config_settings msgid "purchase.config.settings" -msgstr "" +msgstr "purchase.config.settings" #. module: purchase #: model:process.node,note:purchase.process_node_approvepurchaseorder0 @@ -1433,7 +1433,7 @@ msgstr "Neobdavčeno" #. module: purchase #: model:process.transition,name:purchase.process_transition_createpackinglist0 msgid "Pick list generated" -msgstr "" +msgstr "Prevzemnica kreirana" #. module: purchase #: model:ir.actions.act_window,name:purchase.purchase_line_form_action2 @@ -1720,7 +1720,7 @@ msgstr "Faks :" #. module: purchase #: model:ir.model,name:purchase.model_stock_partial_picking msgid "Partial Picking Processing Wizard" -msgstr "" +msgstr "Čarovnik za delni prevzem" #. module: purchase #: model:product.pricelist.version,name:purchase.ver0 @@ -2053,7 +2053,7 @@ msgstr "" #. module: purchase #: model:ir.ui.menu,name:purchase.menu_partner_categories_in_form msgid "Partner Categories" -msgstr "" +msgstr "Skupine partnerjev" #. module: purchase #: field:purchase.report,state:0 @@ -2084,7 +2084,7 @@ msgstr "Na osnovi prihajajočih pošiljk" #: code:addons/purchase/purchase.py:1018 #, python-format msgid "No default supplier defined for this product" -msgstr "" +msgstr "Ni privzetega dobavitelja" #. module: purchase #: view:purchase.report:0 @@ -2189,7 +2189,7 @@ msgstr "Različice cenikov" #. module: purchase #: field:purchase.order,payment_term_id:0 msgid "Payment Term" -msgstr "" +msgstr "Plačilni pogoji" #. module: purchase #: view:purchase.order:0 diff --git a/addons/purchase_double_validation/i18n/sl.po b/addons/purchase_double_validation/i18n/sl.po new file mode 100644 index 00000000000..83aec6269b9 --- /dev/null +++ b/addons/purchase_double_validation/i18n/sl.po @@ -0,0 +1,49 @@ +# Slovenian 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:06+0000\n" +"PO-Revision-Date: 2013-01-14 17:24+0000\n" +"Last-Translator: Dušan Laznik (Mentis) \n" +"Language-Team: Slovenian \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Launchpad-Export-Date: 2013-01-15 05:32+0000\n" +"X-Generator: Launchpad (build 16420)\n" + +#. module: purchase_double_validation +#: model:ir.model,name:purchase_double_validation.model_purchase_config_settings +msgid "purchase.config.settings" +msgstr "purchase.config.settings" + +#. module: purchase_double_validation +#: view:purchase.order:0 +msgid "Purchase orders which are not approved yet." +msgstr "Nepotrjeni nabavni nalogi." + +#. module: purchase_double_validation +#: field:purchase.config.settings,limit_amount:0 +msgid "limit to require a second approval" +msgstr "limit za dodatno potrditev." + +#. module: purchase_double_validation +#: view:board.board:0 +#: model:ir.actions.act_window,name:purchase_double_validation.purchase_waiting +msgid "Purchase Orders Waiting Approval" +msgstr "Nepotrjeni nabavni nalogi." + +#. module: purchase_double_validation +#: view:purchase.order:0 +msgid "To Approve" +msgstr "Za Potrditev" + +#. module: purchase_double_validation +#: help:purchase.config.settings,limit_amount:0 +msgid "Amount after which validation of purchase is required." +msgstr "Znesek nad katerim je potrebna dodatna potrditev" From 7ec52bb84b8f461185cf8ccd5f5b9184f99f066e Mon Sep 17 00:00:00 2001 From: "Quentin (OpenERP)" Date: Tue, 15 Jan 2013 11:03:53 +0100 Subject: [PATCH 06/26] [FIX] crm: at lead creation, take into account the type given in vals to find the stage_id (if not provided) + refactoring of create() of tasks, project issues and leads bzr revid: qdp-launchpad@openerp.com-20130115100353-z35mqrwij936n54s --- addons/crm/crm_lead.py | 9 +++++---- addons/project/project.py | 7 +++---- addons/project_issue/project_issue.py | 7 +++---- 3 files changed, 11 insertions(+), 12 deletions(-) diff --git a/addons/crm/crm_lead.py b/addons/crm/crm_lead.py index ab6770aeeef..4455663ca9a 100644 --- a/addons/crm/crm_lead.py +++ b/addons/crm/crm_lead.py @@ -87,12 +87,13 @@ class crm_lead(base_stage, format_address, osv.osv): def create(self, cr, uid, vals, context=None): if context is None: context = {} - if not vals.get('stage_id') and vals.get('section_id'): + if not vals.get('stage_id'): ctx = context.copy() - ctx['default_section_id'] = vals['section_id'] + if vals.get('section_id'): + ctx['default_section_id'] = vals['section_id'] + if vals.get('type'): + ctx['default_type'] = vals['type'] vals['stage_id'] = self._get_default_stage_id(cr, uid, context=ctx) - elif not vals.get('stage_id') and context.get('default_section_id'): - vals['stage_id'] = self._get_default_stage_id(cr, uid, context=context) return super(crm_lead, self).create(cr, uid, vals, context=context) def _get_default_section_id(self, cr, uid, context=None): diff --git a/addons/project/project.py b/addons/project/project.py index 95f7771afce..f89ce8391fc 100644 --- a/addons/project/project.py +++ b/addons/project/project.py @@ -1091,12 +1091,11 @@ class task(base_stage, osv.osv): def create(self, cr, uid, vals, context=None): if context is None: context = {} - if not vals.get('stage_id') and vals.get('project_id'): + if not vals.get('stage_id'): ctx = context.copy() - ctx['default_project_id'] = vals['project_id'] + if vals.get('project_id'): + ctx['default_project_id'] = vals['project_id'] vals['stage_id'] = self._get_default_stage_id(cr, uid, context=ctx) - elif not vals.get('stage_id') and context.get('default_project_id'): - vals['stage_id'] = self._get_default_stage_id(cr, uid, context=context) task_id = super(task, self).create(cr, uid, vals, context=context) self._store_history(cr, uid, [task_id], context=context) return task_id diff --git a/addons/project_issue/project_issue.py b/addons/project_issue/project_issue.py index 7b7b6f8a3aa..b0b7193b7aa 100644 --- a/addons/project_issue/project_issue.py +++ b/addons/project_issue/project_issue.py @@ -67,12 +67,11 @@ class project_issue(base_stage, osv.osv): def create(self, cr, uid, vals, context=None): if context is None: context = {} - if not vals.get('stage_id') and vals.get('project_id'): + if not vals.get('stage_id'): ctx = context.copy() - ctx['default_project_id'] = vals['project_id'] + if vals.get('project_id'): + ctx['default_project_id'] = vals['project_id'] vals['stage_id'] = self._get_default_stage_id(cr, uid, context=ctx) - elif not vals.get('stage_id') and context.get('default_project_id'): - vals['stage_id'] = self._get_default_stage_id(cr, uid, context=context) return super(project_issue, self).create(cr, uid, vals, context=context) def _get_default_project_id(self, cr, uid, context=None): From 7b3cd577c2223756c5a49db1789b15196945d230 Mon Sep 17 00:00:00 2001 From: "vta vta@openerp.com" <> Date: Tue, 15 Jan 2013 11:54:23 +0100 Subject: [PATCH 07/26] [IMP] Added code to track new GA goals bzr revid: vta@openerp.com-20130115105423-icv69atfjpt9rqsi --- addons/web_analytics/static/src/js/web_analytics.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/addons/web_analytics/static/src/js/web_analytics.js b/addons/web_analytics/static/src/js/web_analytics.js index 1d3efbbe8d1..0ea76324cf6 100644 --- a/addons/web_analytics/static/src/js/web_analytics.js +++ b/addons/web_analytics/static/src/js/web_analytics.js @@ -84,6 +84,12 @@ openerp.web_analytics = function(instance) { }); }, /* + * Method called in order to send _trackPageview to GA + */ + _push_pageview: function(url) { + _gaq.push(['_trackPageview', url]); + }, + /* * Method called in order to send _trackEvent to GA */ _push_event: function(options) { From 9321e4cb67d796c525012020186ac0f052875365 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Tue, 15 Jan 2013 12:00:58 +0100 Subject: [PATCH 08/26] [FIX] Wall: fixed attribute error on res.users, due to a missing method called by the JS. bzr revid: tde@openerp.com-20130115110058-mmpcourm7i5p2hv2 --- addons/mail/res_users.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/addons/mail/res_users.py b/addons/mail/res_users.py index 3f33f1dbca5..b1f8f8b8734 100644 --- a/addons/mail/res_users.py +++ b/addons/mail/res_users.py @@ -150,6 +150,9 @@ class res_users(osv.Model): self.pool.get('res.partner').message_subscribe(cr, uid, [partner_id], partner_ids, subtype_ids=subtype_ids, context=context) return True + def message_create_partners_from_emails(self, cr, uid, emails, context=None): + return self.pool.get('res.partner').message_create_partners_from_emails(cr, uid, emails, context=context) + class res_users_mail_group(osv.Model): """ Update of res.users class From 4fd0d9cbf18971c7f0057b4989c7d1273f208261 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Tue, 15 Jan 2013 12:09:14 +0100 Subject: [PATCH 09/26] [IMP] Chatter: partner creation from emails: do it only when having a not empty list. bzr revid: tde@openerp.com-20130115110914-elx08yxuam28ubio --- addons/mail/static/src/js/mail.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/addons/mail/static/src/js/mail.js b/addons/mail/static/src/js/mail.js index e08afdad217..e3986a390d6 100644 --- a/addons/mail/static/src/js/mail.js +++ b/addons/mail/static/src/js/mail.js @@ -580,6 +580,9 @@ openerp.mail = function (session) { } }); var deferred_check = $.Deferred(); + if (emails.length == 0) { + return deferred_check.resolve(partners_from); + } self.parent_thread.ds_thread._model.call('message_create_partners_from_emails', [emails]).then(function (partners) { partners_from = _.clone(partners.partner_ids); var deferreds = []; From 26d161e0d1dab82026599cd2cd9d02698ca6fa27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Tue, 15 Jan 2013 12:39:20 +0100 Subject: [PATCH 10/26] [IMP] Notification emails: subject is not truncated anymore. bzr revid: tde@openerp.com-20130115113920-eem74uh5918lrofm --- addons/mail/mail_message.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/mail/mail_message.py b/addons/mail/mail_message.py index 600c3c6d832..16587ae24fd 100644 --- a/addons/mail/mail_message.py +++ b/addons/mail/mail_message.py @@ -78,7 +78,7 @@ class mail_message(osv.Model): for message in self.read(cr, uid, ids, ['model', 'res_id'], context=context): if not message.get('model') or not message.get('res_id') or not self.pool.get(message['model']): continue - result[message['id']] = self._shorten_name(self.pool.get(message['model']).name_get(cr, SUPERUSER_ID, [message['res_id']], context=context)[0][1]) + result[message['id']] = self.pool.get(message['model']).name_get(cr, SUPERUSER_ID, [message['res_id']], context=context)[0][1] return result def _get_to_read(self, cr, uid, ids, name, arg, context=None): From 4eac5104619bfbb68c95cd2e4399ebf3ec558256 Mon Sep 17 00:00:00 2001 From: Olivier Dony Date: Tue, 15 Jan 2013 13:40:58 +0100 Subject: [PATCH 11/26] [FIX] ir.mail_server: properly handle the --smtp-ssl command-line option + map it to STARTTLS as a safer default bzr revid: odo@openerp.com-20130115124058-81kgv0cy9jp96ln4 --- openerp/addons/base/ir/ir_mail_server.py | 9 +++++---- openerp/tools/config.py | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/openerp/addons/base/ir/ir_mail_server.py b/openerp/addons/base/ir/ir_mail_server.py index d21e53c216d..5a3c40552f0 100644 --- a/openerp/addons/base/ir/ir_mail_server.py +++ b/openerp/addons/base/ir/ir_mail_server.py @@ -370,7 +370,7 @@ class ir_mail_server(osv.osv): return msg def send_email(self, cr, uid, message, mail_server_id=None, smtp_server=None, smtp_port=None, - smtp_user=None, smtp_password=None, smtp_encryption='none', smtp_debug=False, + smtp_user=None, smtp_password=None, smtp_encryption=None, smtp_debug=False, context=None): """Sends an email directly (no queuing). @@ -388,7 +388,7 @@ class ir_mail_server(osv.osv): extracted from the combined list of ``To``, ``CC`` and ``BCC`` headers. :param mail_server_id: optional id of ir.mail_server to use for sending. overrides other smtp_* arguments. :param smtp_server: optional hostname of SMTP server to use - :param smtp_encryption: one of 'none', 'starttls' or 'ssl' (see ir.mail_server fields for explanation) + :param smtp_encryption: optional TLS mode, one of 'none', 'starttls' or 'ssl' (see ir.mail_server fields for explanation) :param smtp_port: optional SMTP port, if mail_server_id is not passed :param smtp_user: optional SMTP user, if mail_server_id is not passed :param smtp_password: optional SMTP password to use, if mail_server_id is not passed @@ -436,7 +436,8 @@ class ir_mail_server(osv.osv): smtp_port = tools.config.get('smtp_port', 25) if smtp_port is None else smtp_port smtp_user = smtp_user or tools.config.get('smtp_user') smtp_password = smtp_password or tools.config.get('smtp_password') - + if smtp_encryption is None and tools.config.get('smtp_ssl'): + smtp_encryption = 'starttls' # STARTTLS is the new meaning of the smtp_ssl flag as of v7.0 if not smtp_server: raise osv.except_osv( @@ -455,7 +456,7 @@ class ir_mail_server(osv.osv): return message_id try: - smtp = self.connect(smtp_server, smtp_port, smtp_user, smtp_password, smtp_encryption, smtp_debug) + smtp = self.connect(smtp_server, smtp_port, smtp_user, smtp_password, smtp_encryption or False, smtp_debug) smtp.sendmail(smtp_from, smtp_to_list, message.as_string()) finally: try: diff --git a/openerp/tools/config.py b/openerp/tools/config.py index ad8f5c73b4b..71d1d015d91 100644 --- a/openerp/tools/config.py +++ b/openerp/tools/config.py @@ -205,7 +205,7 @@ class configmanager(object): group.add_option('--smtp-port', dest='smtp_port', my_default=25, help='specify the SMTP port', type="int") group.add_option('--smtp-ssl', dest='smtp_ssl', action='store_true', my_default=False, - help='specify the SMTP server support SSL or not') + help='if passed, SMTP connections will be encrypted with SSL (STARTTLS)') group.add_option('--smtp-user', dest='smtp_user', my_default=False, help='specify the SMTP username for sending email') group.add_option('--smtp-password', dest='smtp_password', my_default=False, From 397e5d2df99eab6ee55ff0a955e451e2eb985a30 Mon Sep 17 00:00:00 2001 From: "vta vta@openerp.com" <> Date: Tue, 15 Jan 2013 13:46:04 +0100 Subject: [PATCH 12/26] [FIX] Don't alter bounce rate when tracking events bzr revid: vta@openerp.com-20130115124604-ttg5ct8x83iog6ee --- addons/web_analytics/static/src/js/web_analytics.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/addons/web_analytics/static/src/js/web_analytics.js b/addons/web_analytics/static/src/js/web_analytics.js index 0ea76324cf6..26171cb32aa 100644 --- a/addons/web_analytics/static/src/js/web_analytics.js +++ b/addons/web_analytics/static/src/js/web_analytics.js @@ -162,6 +162,7 @@ openerp.web_analytics = function(instance) { 'category': r.model, 'action': 'form', 'label': url, + 'noninteraction': true, }); }); this.on('record_saved', self, function(r) { @@ -170,6 +171,7 @@ openerp.web_analytics = function(instance) { 'category': r.model, 'action': 'form', 'label': url, + 'noninteraction': true, }); }); } @@ -204,6 +206,7 @@ openerp.web_analytics = function(instance) { 'category': category, 'action': action, 'label': url, + 'noninteraction': true, }); return this._super.apply(this, arguments); }, From a26b66dbf5420d14f9e5d90e2ff94ad0189acc26 Mon Sep 17 00:00:00 2001 From: Olivier Dony Date: Tue, 15 Jan 2013 14:43:59 +0100 Subject: [PATCH 13/26] [FIX] mail_thread subclasses: message_new() should copy the author_id if one was identified bzr revid: odo@openerp.com-20130115134359-mczjs42f4gchrk7d --- addons/crm/crm_lead.py | 1 + addons/crm_claim/crm_claim.py | 1 + addons/crm_helpdesk/crm_helpdesk.py | 1 + addons/hr_recruitment/hr_recruitment.py | 1 + addons/project_issue/project_issue.py | 1 + 5 files changed, 5 insertions(+) diff --git a/addons/crm/crm_lead.py b/addons/crm/crm_lead.py index 4455663ca9a..187dbe2523e 100644 --- a/addons/crm/crm_lead.py +++ b/addons/crm/crm_lead.py @@ -980,6 +980,7 @@ class crm_lead(base_stage, format_address, osv.osv): 'description': desc, 'email_from': msg.get('from'), 'email_cc': msg.get('cc'), + 'partner_id': msg.get('author_id', False), 'user_id': False, } if msg.get('priority') in dict(crm.AVAILABLE_PRIORITIES): diff --git a/addons/crm_claim/crm_claim.py b/addons/crm_claim/crm_claim.py index a724579f1e8..275d9edaab4 100644 --- a/addons/crm_claim/crm_claim.py +++ b/addons/crm_claim/crm_claim.py @@ -195,6 +195,7 @@ class crm_claim(base_stage, osv.osv): 'description': desc, 'email_from': msg.get('from'), 'email_cc': msg.get('cc'), + 'partner_id': msg.get('author_id', False), } if msg.get('priority'): defaults['priority'] = msg.get('priority') diff --git a/addons/crm_helpdesk/crm_helpdesk.py b/addons/crm_helpdesk/crm_helpdesk.py index 5ed1c040627..2d0383962b1 100644 --- a/addons/crm_helpdesk/crm_helpdesk.py +++ b/addons/crm_helpdesk/crm_helpdesk.py @@ -106,6 +106,7 @@ class crm_helpdesk(base_state, base_stage, osv.osv): 'email_from': msg.get('from'), 'email_cc': msg.get('cc'), 'user_id': False, + 'partner_id': msg.get('author_id', False), } defaults.update(custom_values) return super(crm_helpdesk,self).message_new(cr, uid, msg, custom_values=defaults, context=context) diff --git a/addons/hr_recruitment/hr_recruitment.py b/addons/hr_recruitment/hr_recruitment.py index 44d8912c5f1..92465c1b84e 100644 --- a/addons/hr_recruitment/hr_recruitment.py +++ b/addons/hr_recruitment/hr_recruitment.py @@ -353,6 +353,7 @@ class hr_applicant(base_stage, osv.Model): 'email_from': msg.get('from'), 'email_cc': msg.get('cc'), 'user_id': False, + 'partner_id': msg.get('author_id', False), } if msg.get('priority'): defaults['priority'] = msg.get('priority') diff --git a/addons/project_issue/project_issue.py b/addons/project_issue/project_issue.py index b0b7193b7aa..8eb7281cd24 100644 --- a/addons/project_issue/project_issue.py +++ b/addons/project_issue/project_issue.py @@ -501,6 +501,7 @@ class project_issue(base_stage, osv.osv): 'description': desc, 'email_from': msg.get('from'), 'email_cc': msg.get('cc'), + 'partner_id': msg.get('author_id', False), 'user_id': False, } if msg.get('priority'): From 1fc1174f23c1462f7dedd65fd700c8ab42126857 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20van=20der=20Essen?= Date: Tue, 15 Jan 2013 17:51:37 +0100 Subject: [PATCH 14/26] [IMP] point_of_sale: products and categories are no longer stored on disk, increasing performance bzr revid: fva@openerp.com-20130115165137-h07m9hrkhvs46e06 --- addons/point_of_sale/static/src/js/db.js | 42 +++++++++++++----------- 1 file changed, 22 insertions(+), 20 deletions(-) diff --git a/addons/point_of_sale/static/src/js/db.js b/addons/point_of_sale/static/src/js/db.js index 666c61919da..710468935a3 100644 --- a/addons/point_of_sale/static/src/js/db.js +++ b/addons/point_of_sale/static/src/js/db.js @@ -40,6 +40,10 @@ function openerp_pos_db(instance, module){ //cache the data in memory to avoid roundtrips to the localstorage this.cache = {}; + this.product_by_id = {}; + this.product_by_ean13 = {}; + this.product_by_category_id = {}; + this.category_by_id = {}; this.root_category_id = 0; this.category_products = {}; @@ -49,6 +53,8 @@ function openerp_pos_db(instance, module){ this.category_search_string = {}; this.packagings_by_id = {}; this.packagings_by_product_id = {}; + this.packagings_by_ean13 = {}; + console.log('coucou!'); }, /* returns the category object from its id. If you pass a list of id as parameters, you get * a list of category objects. @@ -153,8 +159,7 @@ function openerp_pos_db(instance, module){ return str + '\n'; }, add_products: function(products){ - var stored_products = this.load('products',{}); - var stored_categories = this.load('categories',{}); + var stored_categories = this.product_by_category_id; if(!products instanceof Array){ products = [products]; @@ -187,10 +192,11 @@ function openerp_pos_db(instance, module){ } this.category_search_string[ancestor] += search_string; } - stored_products[product.id] = product; + this.product_by_id[product.id] = product; + if(product.ean13){ + this.product_by_ean13[product.ean13] = product; + } } - this.save('products',stored_products); - this.save('categories',stored_categories); }, add_packagings: function(packagings){ for(var i = 0, len = packagings.length; i < len; i++){ @@ -200,6 +206,9 @@ function openerp_pos_db(instance, module){ this.packagings_by_product_id[pack.product_id[0]] = []; } this.packagings_by_product_id[pack.product_id[0]].push(pack); + if(pack.ean13){ + this.packagings_by_ean13[pack.ean13] = pack; + } } }, /* removes all the data from the database. TODO : being able to selectively remove data */ @@ -219,31 +228,24 @@ function openerp_pos_db(instance, module){ return count; }, get_product_by_id: function(id){ - return this.load('products',{})[id]; + return this.product_by_id[id]; }, get_product_by_ean13: function(ean13){ - var products = this.load('products',{}); - for(var i in products){ - if( products[i] && products[i].ean13 === ean13){ - return products[i]; - } + if(this.product_by_ean13[ean13]){ + return product_by_ean13[ean13]; } - for(var p in this.packagings_by_id){ - var pack = this.packagings_by_id[p]; - if( pack.ean === ean13){ - return products[pack.product_id[0]]; - } + var pack = this.packagings_by_ean13[ean13]; + if(pack){ + return this.product_by_id[pack.product_id[0]]; } return undefined; }, get_product_by_category: function(category_id){ - var stored_categories = this.load('categories',{}); - var stored_products = this.load('products',{}); - var product_ids = stored_categories[category_id]; + var product_ids = this.product_by_category_id[category_id]; var list = []; if (product_ids) { for (var i = 0, len = Math.min(product_ids.length, this.limit); i < len; i++) { - list.push(stored_products[product_ids[i]]); + list.push(this.product_by_id[product_ids[i]]); } } return list; From 483d57e8781be07d507780bb0d564d32e03012da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20van=20der=20Essen?= Date: Tue, 15 Jan 2013 18:14:53 +0100 Subject: [PATCH 15/26] [IMP] point_of_sale: faster product list redraw bzr revid: fva@openerp.com-20130115171453-ycech3edreltdq1u --- addons/point_of_sale/static/src/js/widgets.js | 23 ++++++++----------- 1 file changed, 9 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 39ac2529a76..324201a2f70 100644 --- a/addons/point_of_sale/static/src/js/widgets.js +++ b/addons/point_of_sale/static/src/js/widgets.js @@ -606,20 +606,15 @@ function openerp_pos_widgets(instance, module){ //module is instance.point_of_sa if(this.scrollbar){ this.scrollbar.destroy(); } - - this.pos.get('products') - .chain() - .map(function(product) { - var product = new module.ProductWidget(self, { - model: product, - weight: self.weight, - click_product_action: self.click_product_action, - }) - self.productwidgets.push(product); - return product; - }) - .invoke('appendTo', this.$('.product-list')); - + var products = this.pos.get('products').models || []; + for(var i = 0, len = products.length; i < len; i++){ + var product = new module.ProductWidget(self, { + model: products[i], + click_product_action: this.click_product_action, + }); + this.productwidgets.push(product); + product.appendTo(this.$('.product-list')); + } this.scrollbar = new module.ScrollbarWidget(this,{ target_widget: this, target_selector: '.product-list-scroller', From 70cdcc70cfbbf6f24c13580fc20cb5304676e390 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20van=20der=20Essen?= Date: Tue, 15 Jan 2013 18:25:25 +0100 Subject: [PATCH 16/26] [FIX] point_of_sale: missing 'this.' bzr revid: fva@openerp.com-20130115172525-jr5ruv0l2eiylkmh --- addons/point_of_sale/static/src/js/db.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/point_of_sale/static/src/js/db.js b/addons/point_of_sale/static/src/js/db.js index 710468935a3..933dbda4385 100644 --- a/addons/point_of_sale/static/src/js/db.js +++ b/addons/point_of_sale/static/src/js/db.js @@ -232,7 +232,7 @@ function openerp_pos_db(instance, module){ }, get_product_by_ean13: function(ean13){ if(this.product_by_ean13[ean13]){ - return product_by_ean13[ean13]; + return this.product_by_ean13[ean13]; } var pack = this.packagings_by_ean13[ean13]; if(pack){ From db4f0a54ded3766dfdcc65d393f3603746283fa2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20van=20der=20Essen?= Date: Tue, 15 Jan 2013 18:26:53 +0100 Subject: [PATCH 17/26] [FIX] point_of_sale: removed console.log bzr revid: fva@openerp.com-20130115172653-hxq1ce1w9owvor9i --- addons/point_of_sale/static/src/js/db.js | 1 - 1 file changed, 1 deletion(-) diff --git a/addons/point_of_sale/static/src/js/db.js b/addons/point_of_sale/static/src/js/db.js index 933dbda4385..93dc86ebd9f 100644 --- a/addons/point_of_sale/static/src/js/db.js +++ b/addons/point_of_sale/static/src/js/db.js @@ -54,7 +54,6 @@ function openerp_pos_db(instance, module){ this.packagings_by_id = {}; this.packagings_by_product_id = {}; this.packagings_by_ean13 = {}; - console.log('coucou!'); }, /* returns the category object from its id. If you pass a list of id as parameters, you get * a list of category objects. From 5883f327182d4ee991c4159f2bb56119ee7d7350 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20van=20der=20Essen?= Date: Tue, 22 Jan 2013 14:18:01 +0100 Subject: [PATCH 18/26] [WIP] point_of_sale: in progress of solving ]bugs in taxes and order editing bzr revid: fva@openerp.com-20130122131801-46dyysig5e2owifa --- addons/point_of_sale/static/src/js/models.js | 136 ++++++++++++++---- addons/point_of_sale/static/src/js/screens.js | 6 +- .../static/src/js/widget_base.js | 8 +- addons/point_of_sale/static/src/js/widgets.js | 25 +++- addons/point_of_sale/static/src/xml/pos.xml | 44 +++--- 5 files changed, 160 insertions(+), 59 deletions(-) diff --git a/addons/point_of_sale/static/src/js/models.js b/addons/point_of_sale/static/src/js/models.js index 556ea482aad..e0ec315836c 100644 --- a/addons/point_of_sale/static/src/js/models.js +++ b/addons/point_of_sale/static/src/js/models.js @@ -1,6 +1,11 @@ function openerp_pos_models(instance, module){ //module is instance.point_of_sale var QWeb = instance.web.qweb; + function round(value,decimals){ + var mult = Math.pow(10,decimals || 0); + return Math.round(value*mult)/mult; + } + // The PosModel contains the Point Of Sale's representation of the backend. // Since the PoS must work in standalone ( Without connection to the server ) @@ -24,8 +29,7 @@ function openerp_pos_models(instance, module){ //module is instance.point_of_sal this.proxy = new module.ProxyDevice(); // used to communicate to the hardware devices via a local proxy this.db = new module.PosLS(); // a database used to store the products and categories this.db.clear('products','categories'); - this.debug = jQuery.deparam(jQuery.param.querystring()).debug !== undefined; //debug mode - + this.debug = jQuery.deparam(jQuery.param.querystring()).debug !== undefined; //debug mode // default attributes values. If null, it will be loaded below. this.set({ @@ -338,20 +342,38 @@ function openerp_pos_models(instance, module){ //module is instance.point_of_sal this.order = options.order; this.product = options.product; this.price = options.product.get('price'); + this.priceStr = '' + this.price; this.quantity = 1; + this.quantityStr = '1'; this.discount = 0; + this.discountStr = '0'; this.type = 'unit'; this.selected = false; }, // sets a discount [0,100]% set_discount: function(discount){ - this.discount = Math.max(0,Math.min(100,discount)); + var disc = parseFloat(discount); + if(_.isNaN(disc)){ + return; + }else if(disc < 0){ + this.discount = 0; + this.discountStr = '0'; + }else if(disc > 100){ + this.discount = 100; + this.discountStr = '100'; + }else{ + this.discount = disc; + this.discountStr = discount; + } this.trigger('change'); }, // returns the discount [0,100]% get_discount: function(){ return this.discount; }, + get_discount_str: function(){ + return this.discountStr; + }, get_product_type: function(){ return this.type; }, @@ -359,13 +381,23 @@ function openerp_pos_models(instance, module){ //module is instance.point_of_sal // product's unity of measure properties. Quantities greater than zero will not get // rounded to zero set_quantity: function(quantity){ - if(_.isNaN(quantity)){ - this.order.removeOrderline(this); - }else if(quantity !== undefined){ - this.quantity = Math.max(0,quantity); + var quant = parseFloat(quantity); + if(_.isNaN(quant)){ + if(quantity === 'remove'){ + this.order.removeOrderline(this); + } + return; + }else{ + if(quant < 0){ + quant = 0; + } var unit = this.get_unit(); - if(unit && this.quantity > 0 ){ - this.quantity = Math.max(unit.rounding, Math.round(quantity / unit.rounding) * unit.rounding); + if(unit){ + this.quantity = Math.max(unit.rounding, Math.round(quant / unit.rounding) * unit.rounding); + this.quantityStr = this.quantity.toFixed(Math.ceil(Math.log(1.0 / unit.rounding) / Math.log(10))); + }else{ + this.quantity = quant; + this.quantityStr = '' + this.quantity; } } this.trigger('change'); @@ -374,6 +406,17 @@ function openerp_pos_models(instance, module){ //module is instance.point_of_sal get_quantity: function(){ return this.quantity; }, + get_quantity_str: function(){ + return this.quantityStr; + }, + get_quantity_str_with_unit: function(){ + var unit = this.get_unit(); + if(unit && unit.name !== 'Unit(s)'){ + return this.quantityStr + ' ' + unit.name; + }else{ + return this.quantityStr; + } + }, // return the unit of measure of the product get_unit: function(){ var unit_id = (this.product.get('uos_id') || this.product.get('uom_id')); @@ -390,15 +433,6 @@ function openerp_pos_models(instance, module){ //module is instance.point_of_sal get_product: function(){ return this.product; }, - // return the base price of this product (for this orderline) - get_price: function(){ - return this.price; - }, - // changes the base price of the product for this orderline - set_price: function(price){ - this.price = price; - this.trigger('change'); - }, // selects or deselects this orderline set_selected: function(selected){ this.selected = selected; @@ -429,7 +463,7 @@ function openerp_pos_models(instance, module){ //module is instance.point_of_sal export_as_JSON: function() { return { qty: this.get_quantity(), - price_unit: this.get_price(), + price_unit: this.get_unit_price(), discount: this.get_discount(), product_id: this.get_product().get('id'), }; @@ -439,9 +473,10 @@ function openerp_pos_models(instance, module){ //module is instance.point_of_sal return { quantity: this.get_quantity(), unit_name: this.get_unit().name, - price: this.get_price(), + price: this.get_unit_price(), discount: this.get_discount(), product_name: this.get_product().get('name'), + price_display : this.get_display_price(), price_with_tax : this.get_price_with_tax(), price_without_tax: this.get_price_without_tax(), tax: this.get_tax(), @@ -449,6 +484,21 @@ function openerp_pos_models(instance, module){ //module is instance.point_of_sal product_description_sale: this.get_product().get('description_sale'), }; }, + // changes the base price of the product for this orderline + set_unit_price: function(price){ + var pr = parseFloat(price); + if(_.isNaN(pr)){ + return; + } + this.price = round(pr,2); + this.trigger('change'); + }, + get_unit_price: function(){ + return this.price; + }, + get_display_price: function(){ + return round(round(this.price * this.get_quantity(),2) * (1- this.get_discount()/100.0),2); + }, get_price_without_tax: function(){ return this.get_all_prices().priceWithoutTax; }, @@ -460,7 +510,7 @@ function openerp_pos_models(instance, module){ //module is instance.point_of_sal }, get_all_prices: function() { var self = this; - var base = this.get_quantity() * this.price * (1 - (this.get_discount() / 100)); + var base = round(this.get_quantity() * this.price * (1 - (this.get_discount() / 100)),2); //FIXME en fonction de la currency var totalTax = base; var totalNoTax = base; @@ -474,12 +524,13 @@ function openerp_pos_models(instance, module){ //module is instance.point_of_sal if (tax.price_include) { var tmp; if (tax.type === "percent") { - tmp = base - (base / (1 + tax.amount)); + tmp = base - round(base / (1 + tax.amount),2); //FIXME en fonction de la currency } else if (tax.type === "fixed") { - tmp = tax.amount * self.get_quantity(); + tmp = round(tax.amount * self.get_quantity(),2); } else { throw "This type of tax is not supported by the point of sale: " + tax.type; } + tmp = round(tmp,2); taxtotal += tmp; totalNoTax -= tmp; } else { @@ -491,6 +542,7 @@ function openerp_pos_models(instance, module){ //module is instance.point_of_sal } else { throw "This type of tax is not supported by the point of sale: " + tax.type; } + tmp = round(tmp,2); taxtotal += tmp; totalTax += tmp; } @@ -515,8 +567,16 @@ function openerp_pos_models(instance, module){ //module is instance.point_of_sal }, //sets the amount of money on this payment line set_amount: function(value){ - this.amount = value; - this.trigger('change'); + if(typeof value === 'string'){ + var val = parseFloat(value); + if(!isNaN(val)){ + this.amount = val; + this.trigger('change'); + } + }else{ + this.amount = value; + this.trigger('change'); + } }, // returns the amount of money on this paymentline get_amount: function(){ @@ -584,7 +644,7 @@ function openerp_pos_models(instance, module){ //module is instance.point_of_sal line.set_quantity(options.quantity); } if(options.price !== undefined){ - line.set_price(options.price); + line.set_unit_price(options.price); } var last_orderline = this.getLastOrderline(); @@ -613,14 +673,19 @@ function openerp_pos_models(instance, module){ //module is instance.point_of_sal getName: function() { return this.get('name'); }, - getTotal: function() { + getSubtotal : function(){ + return (this.get('orderLines')).reduce((function(sum, orderLine){ + return sum + orderLine.get_display_price(); + }), 0); + }, + getTotalTaxIncluded: function() { return (this.get('orderLines')).reduce((function(sum, orderLine) { return sum + orderLine.get_price_with_tax(); }), 0); }, getDiscountTotal: function() { return (this.get('orderLines')).reduce((function(sum, orderLine) { - return sum + (orderLine.get_price() * (orderLine.get_discount()/100) * orderLine.get_quantity()); + return sum + (orderLine.get_unit_price() * (orderLine.get_discount()/100) * orderLine.get_quantity()); }), 0); }, getTotalTaxExcluded: function() { @@ -807,7 +872,11 @@ function openerp_pos_models(instance, module){ //module is instance.point_of_sal if(!tempNewBuffer){ this.set({ buffer: "0" }); - this.killTarget(); + if(this.get('mode') === 'quantity'){ + this.killTarget(); + }else{ + this.updateTarget(); + } }else{ if (isNaN(tempNewBuffer)) { tempNewBuffer = "0"; @@ -836,15 +905,20 @@ function openerp_pos_models(instance, module){ //module is instance.point_of_sal mode: "quantity" }); }, + resetValue: function(){ + this.set({buffer:'0'}); + }, updateTarget: function() { var bufferContent, params; bufferContent = this.get('buffer'); if (bufferContent && !isNaN(bufferContent)) { - this.trigger('set_value', parseFloat(bufferContent)); + console.log('set_value ',bufferContent); + this.trigger('set_value',bufferContent); } }, killTarget: function(){ - this.trigger('set_value',Number.NaN); + console.log('set_value ','remove'); + this.trigger('set_value','remove'); }, }); } diff --git a/addons/point_of_sale/static/src/js/screens.js b/addons/point_of_sale/static/src/js/screens.js index f8e3382c242..0ce4f0cd215 100644 --- a/addons/point_of_sale/static/src/js/screens.js +++ b/addons/point_of_sale/static/src/js/screens.js @@ -942,6 +942,9 @@ function openerp_pos_screens(instance, module){ //module is instance.point_of_sa l.appendTo(this.$('#paymentlines')); this.paymentlinewidgets.push(l); this.$('.paymentline-amount input:last').focus(); + if(this.numpadState){ + this.numpadState.resetValue(); + } }, renderElement: function() { this._super(); @@ -962,7 +965,7 @@ function openerp_pos_screens(instance, module){ //module is instance.point_of_sa updatePaymentSummary: function() { var currentOrder = this.pos.get('selectedOrder'); var paidTotal = currentOrder.getPaidTotal(); - var dueTotal = currentOrder.getTotal(); + var dueTotal = currentOrder.getTotalTaxIncluded(); var remaining = dueTotal > paidTotal ? dueTotal - paidTotal : 0; var change = paidTotal > dueTotal ? paidTotal - dueTotal : 0; @@ -998,5 +1001,4 @@ function openerp_pos_screens(instance, module){ //module is instance.point_of_sa this.currentPaymentLines.last().set_amount(val); }, }); - } diff --git a/addons/point_of_sale/static/src/js/widget_base.js b/addons/point_of_sale/static/src/js/widget_base.js index 0aa0a44e7e7..4cab7869a53 100644 --- a/addons/point_of_sale/static/src/js/widget_base.js +++ b/addons/point_of_sale/static/src/js/widget_base.js @@ -26,10 +26,14 @@ function openerp_pos_basewidget(instance, module){ //module is instance.point_of } this.format_currency = function(amount){ + if(typeof amount === 'number'){ + amount = Math.round(amount*100)/100; + amount = amount.toFixed(2); + } if(this.currency.position === 'after'){ - return Math.round(amount*100)/100 + ' ' + this.currency.symbol; + return amount + ' ' + this.currency.symbol; }else{ - return this.currency.symbol + ' ' + Math.round(amount*100)/100; + return this.currency.symbol + ' ' + amount; } } diff --git a/addons/point_of_sale/static/src/js/widgets.js b/addons/point_of_sale/static/src/js/widgets.js index 324201a2f70..643f7d64425 100644 --- a/addons/point_of_sale/static/src/js/widgets.js +++ b/addons/point_of_sale/static/src/js/widgets.js @@ -186,7 +186,7 @@ function openerp_pos_widgets(instance, module){ //module is instance.point_of_sa }else if( mode === 'discount'){ order.getSelectedLine().set_discount(val); }else if( mode === 'price'){ - order.getSelectedLine().set_price(val); + order.getSelectedLine().set_unit_price(val); } } else { this.pos.get('selectedOrder').destroy(); @@ -269,7 +269,11 @@ function openerp_pos_widgets(instance, module){ //module is instance.point_of_sa }, update_summary: function(){ var order = this.pos.get('selectedOrder'); - var total = order ? order.getTotal() : 0; + var subtotal = order ? order.getSubtotal() : 0; + var total = order ? order.getTotalTaxIncluded() : 0; + var taxes = order ? total - order.getTotalTaxExcluded() : 0; + this.$('.summary .value.subtotal').html(this.format_currency(subtotal)); + this.$('.summary .value.taxes').html(this.format_currency(taxes)); this.$('.summary .value.total').html(this.format_currency(total)); }, set_display_mode: function(mode){ @@ -311,14 +315,23 @@ function openerp_pos_widgets(instance, module){ //module is instance.point_of_sa }, changeAmount: function(event) { var newAmount = event.currentTarget.value; - if (newAmount && !isNaN(newAmount)) { - this.amount = parseFloat(newAmount); - this.payment_line.set_amount(this.amount); + console.log(event); + console.log('changeAmount:',newAmount); + if( typeof newAmmount === 'string'){ + var amount = parseFloat(newAmount); + if(!isNaN(amount)){ + this.amount = amount; + this.payment_line.set_amount(amount); + } + }else if(!isNaN(newAmount)){ + this.amount = newAmount; + this.payment_line.set_amount(newAmount); } }, changedAmount: function() { - if (this.amount !== this.payment_line.get_amount()) + if (this.amount !== this.payment_line.get_amount()){ this.renderElement(); + } }, renderElement: function() { var self = this; diff --git a/addons/point_of_sale/static/src/xml/pos.xml b/addons/point_of_sale/static/src/xml/pos.xml index f88b4bb6c27..8a175d24b39 100644 --- a/addons/point_of_sale/static/src/xml/pos.xml +++ b/addons/point_of_sale/static/src/xml/pos.xml @@ -438,7 +438,15 @@
- Total: 0.00 € + + Subtotal: 0.00 € + + + Taxes: 0.00€ + + + Total: 0.00 € +
@@ -506,26 +514,26 @@ - +
    - +
  • - + at - + /
  • - +
  • With a - % + % discount
  • @@ -577,33 +585,33 @@ Shop:

    - +
    - - + +
    - With a % discount + With a % discount
    - + - +

    Tax: - +
    Discount: - +
    Total: - +

    @@ -613,14 +621,14 @@ - +
    Change: - +
    From 2616386e3f568e59607f20fef6f496597a741c81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20van=20der=20Essen?= Date: Wed, 23 Jan 2013 19:32:05 +0100 Subject: [PATCH 19/26] [WIP] point_of_sale: in progress of solving bugs in taxes and order editing, part 2 bzr revid: fva@openerp.com-20130123183205-7krkee3ihqg1hhmo --- addons/point_of_sale/static/src/css/pos.css | 8 ++++++++ addons/point_of_sale/static/src/js/models.js | 8 ++++---- addons/point_of_sale/static/src/js/screens.js | 6 +++--- addons/point_of_sale/static/src/js/widgets.js | 6 ++---- addons/point_of_sale/static/src/xml/pos.xml | 18 +++++++----------- 5 files changed, 24 insertions(+), 22 deletions(-) diff --git a/addons/point_of_sale/static/src/css/pos.css b/addons/point_of_sale/static/src/css/pos.css index f79a1594178..9d7a7c013c5 100644 --- a/addons/point_of_sale/static/src/css/pos.css +++ b/addons/point_of_sale/static/src/css/pos.css @@ -993,12 +993,20 @@ margin-bottom:10px; } .point-of-sale .order .summary .line{ + float: right; margin-right:15px; + margin-left: 15px; padding-top:5px; border-top: solid 2px; border-color:#777; } +.point-of-sale .order .summary .line .subentry{ + font-size: 10px; + font-weight: normal; + text-align: center; +} .point-of-sale .order .summary .line.empty{ + text-align: right; border-color:#BBB; color:#999; } diff --git a/addons/point_of_sale/static/src/js/models.js b/addons/point_of_sale/static/src/js/models.js index e0ec315836c..d4b1df38d36 100644 --- a/addons/point_of_sale/static/src/js/models.js +++ b/addons/point_of_sale/static/src/js/models.js @@ -704,10 +704,10 @@ function openerp_pos_models(instance, module){ //module is instance.point_of_sal }), 0); }, getChange: function() { - return this.getPaidTotal() - this.getTotal(); + return this.getPaidTotal() - this.getTotalTaxIncluded(); }, getDueLeft: function() { - return this.getTotal() - this.getPaidTotal(); + return this.getTotalTaxIncluded() - this.getPaidTotal(); }, // sets the type of receipt 'receipt'(default) or 'invoice' set_receipt_type: function(type){ @@ -763,7 +763,7 @@ function openerp_pos_models(instance, module){ //module is instance.point_of_sal return { orderlines: orderlines, paymentlines: paymentlines, - total_with_tax: this.getTotal(), + total_with_tax: this.getTotalTaxIncluded(), total_without_tax: this.getTotalTaxExcluded(), total_tax: this.getTax(), total_paid: this.getPaidTotal(), @@ -808,7 +808,7 @@ function openerp_pos_models(instance, module){ //module is instance.point_of_sal return { name: this.getName(), amount_paid: this.getPaidTotal(), - amount_total: this.getTotal(), + amount_total: this.getTotalTaxIncluded(), amount_tax: this.getTax(), amount_return: this.getChange(), lines: orderLines, diff --git a/addons/point_of_sale/static/src/js/screens.js b/addons/point_of_sale/static/src/js/screens.js index 0ce4f0cd215..eb2250d7f9e 100644 --- a/addons/point_of_sale/static/src/js/screens.js +++ b/addons/point_of_sale/static/src/js/screens.js @@ -973,13 +973,13 @@ function openerp_pos_screens(instance, module){ //module is instance.point_of_sa this.$('#payment-paid-total').html(paidTotal.toFixed(2)); this.$('#payment-remaining').html(remaining.toFixed(2)); this.$('#payment-change').html(change.toFixed(2)); - if((currentOrder.selected_orderline == undefined)) - remaining = 1 + if(currentOrder.selected_orderline === undefined){ + remaining = 1; // What is this ? + } if(this.pos_widget.action_bar){ this.pos_widget.action_bar.set_button_disabled('validation', remaining > 0); } - this.$('.paymentline-amount input:last').focus(); }, set_numpad_state: function(numpadState) { if (this.numpadState) { diff --git a/addons/point_of_sale/static/src/js/widgets.js b/addons/point_of_sale/static/src/js/widgets.js index 643f7d64425..d9e57d08add 100644 --- a/addons/point_of_sale/static/src/js/widgets.js +++ b/addons/point_of_sale/static/src/js/widgets.js @@ -269,12 +269,10 @@ function openerp_pos_widgets(instance, module){ //module is instance.point_of_sa }, update_summary: function(){ var order = this.pos.get('selectedOrder'); - var subtotal = order ? order.getSubtotal() : 0; var total = order ? order.getTotalTaxIncluded() : 0; var taxes = order ? total - order.getTotalTaxExcluded() : 0; - this.$('.summary .value.subtotal').html(this.format_currency(subtotal)); - this.$('.summary .value.taxes').html(this.format_currency(taxes)); - this.$('.summary .value.total').html(this.format_currency(total)); + this.$('.summary .total > .value').html(this.format_currency(total)); + this.$('.summary .total .subentry .value').html(this.format_currency(taxes)); }, set_display_mode: function(mode){ if(this.display_mode !== mode){ diff --git a/addons/point_of_sale/static/src/xml/pos.xml b/addons/point_of_sale/static/src/xml/pos.xml index 8a175d24b39..db63030615f 100644 --- a/addons/point_of_sale/static/src/xml/pos.xml +++ b/addons/point_of_sale/static/src/xml/pos.xml @@ -437,17 +437,13 @@
- - - Subtotal: 0.00 € - - - Taxes: 0.00€ - - - Total: 0.00 € - - +
+
+ Total: 0.00 € +
Taxes: 0.00€
+
+
+
From 8ca77e464b9c32e3a1a4300ff2c57dbc32f29677 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20van=20der=20Essen?= Date: Thu, 24 Jan 2013 15:06:31 +0100 Subject: [PATCH 20/26] [FIX] point_of_sale: editing values with the numpad works as best as possible for now bzr revid: fva@openerp.com-20130124140631-oqii3gq402nx14xf --- addons/point_of_sale/static/src/js/db.js | 4 - addons/point_of_sale/static/src/js/models.js | 82 +++++-------------- addons/point_of_sale/static/src/js/screens.js | 9 -- addons/point_of_sale/static/src/js/widgets.js | 15 +--- 4 files changed, 24 insertions(+), 86 deletions(-) diff --git a/addons/point_of_sale/static/src/js/db.js b/addons/point_of_sale/static/src/js/db.js index 93dc86ebd9f..2be58d6ce97 100644 --- a/addons/point_of_sale/static/src/js/db.js +++ b/addons/point_of_sale/static/src/js/db.js @@ -142,7 +142,6 @@ function openerp_pos_db(instance, module){ /* saves a record store to the database */ save: function(store,data){ var str_data = JSON.stringify(data); - console.log('Storing '+ Math.round(str_data.length/1024.0)+' KB of data to store: '+store); localStorage[this.name + '_' + store] = JSON.stringify(data); this.cache[store] = data; }, @@ -276,12 +275,9 @@ function openerp_pos_db(instance, module){ }, remove_order: function(order_id){ var orders = this.load('orders',[]); - console.log('Remove order:',order_id); - console.log('Order count:',orders.length); orders = _.filter(orders, function(order){ return order.id !== order_id; }); - console.log('Order count:',orders.length); this.save('orders',orders); }, get_orders: function(){ diff --git a/addons/point_of_sale/static/src/js/models.js b/addons/point_of_sale/static/src/js/models.js index d4b1df38d36..fb5c9c6f417 100644 --- a/addons/point_of_sale/static/src/js/models.js +++ b/addons/point_of_sale/static/src/js/models.js @@ -342,7 +342,6 @@ function openerp_pos_models(instance, module){ //module is instance.point_of_sal this.order = options.order; this.product = options.product; this.price = options.product.get('price'); - this.priceStr = '' + this.price; this.quantity = 1; this.quantityStr = '1'; this.discount = 0; @@ -352,19 +351,10 @@ function openerp_pos_models(instance, module){ //module is instance.point_of_sal }, // sets a discount [0,100]% set_discount: function(discount){ - var disc = parseFloat(discount); - if(_.isNaN(disc)){ - return; - }else if(disc < 0){ - this.discount = 0; - this.discountStr = '0'; - }else if(disc > 100){ - this.discount = 100; - this.discountStr = '100'; - }else{ - this.discount = disc; - this.discountStr = discount; - } + console.log('set_discount: ',discount); + var disc = Math.min(Math.max(parseFloat(discount) || 0, 0),100); + this.discount = disc; + this.discountStr = '' + disc; this.trigger('change'); }, // returns the discount [0,100]% @@ -381,16 +371,12 @@ function openerp_pos_models(instance, module){ //module is instance.point_of_sal // product's unity of measure properties. Quantities greater than zero will not get // rounded to zero set_quantity: function(quantity){ - var quant = parseFloat(quantity); - if(_.isNaN(quant)){ - if(quantity === 'remove'){ - this.order.removeOrderline(this); - } + console.log('set_quantity: ',quantity); + if(quantity === 'remove'){ + this.order.removeOrderline(this); return; }else{ - if(quant < 0){ - quant = 0; - } + var quant = Math.max(parseFloat(quantity) || 0, 0); var unit = this.get_unit(); if(unit){ this.quantity = Math.max(unit.rounding, Math.round(quant / unit.rounding) * unit.rounding); @@ -486,11 +472,8 @@ function openerp_pos_models(instance, module){ //module is instance.point_of_sal }, // changes the base price of the product for this orderline set_unit_price: function(price){ - var pr = parseFloat(price); - if(_.isNaN(pr)){ - return; - } - this.price = round(pr,2); + console.log('set_price: ',price); + this.price = round(parseFloat(price) || 0, 2); this.trigger('change'); }, get_unit_price: function(){ @@ -567,16 +550,8 @@ function openerp_pos_models(instance, module){ //module is instance.point_of_sal }, //sets the amount of money on this payment line set_amount: function(value){ - if(typeof value === 'string'){ - var val = parseFloat(value); - if(!isNaN(val)){ - this.amount = val; - this.trigger('change'); - } - }else{ - this.amount = value; - this.trigger('change'); - } + this.amount = parseFloat(value) || 0; + this.trigger('change'); }, // returns the amount of money on this paymentline get_amount: function(){ @@ -865,24 +840,19 @@ function openerp_pos_models(instance, module){ //module is instance.point_of_sal buffer: (this.get('buffer')) + newChar }); } - this.updateTarget(); + this.trigger('set_value',this.get('buffer')); }, deleteLastChar: function() { - var tempNewBuffer = this.get('buffer').slice(0, -1); - - if(!tempNewBuffer){ - this.set({ buffer: "0" }); + if(this.get('buffer') === ""){ if(this.get('mode') === 'quantity'){ - this.killTarget(); + this.trigger('set_value','remove'); }else{ - this.updateTarget(); + this.trigger('set_value',this.get('buffer')); } }else{ - if (isNaN(tempNewBuffer)) { - tempNewBuffer = "0"; - } - this.set({ buffer: tempNewBuffer }); - this.updateTarget(); + var newBuffer = this.get('buffer').slice(0,-1) || ""; + this.set({ buffer: newBuffer }); + this.trigger('set_value',this.get('buffer')); } }, switchSign: function() { @@ -891,7 +861,7 @@ function openerp_pos_models(instance, module){ //module is instance.point_of_sal this.set({ buffer: oldBuffer[0] === '-' ? oldBuffer.substr(1) : "-" + oldBuffer }); - this.updateTarget(); + this.trigger('set_value',this.get('buffer')); }, changeMode: function(newMode) { this.set({ @@ -908,17 +878,5 @@ function openerp_pos_models(instance, module){ //module is instance.point_of_sal resetValue: function(){ this.set({buffer:'0'}); }, - updateTarget: function() { - var bufferContent, params; - bufferContent = this.get('buffer'); - if (bufferContent && !isNaN(bufferContent)) { - console.log('set_value ',bufferContent); - this.trigger('set_value',bufferContent); - } - }, - killTarget: function(){ - console.log('set_value ','remove'); - this.trigger('set_value','remove'); - }, }); } diff --git a/addons/point_of_sale/static/src/js/screens.js b/addons/point_of_sale/static/src/js/screens.js index eb2250d7f9e..2d522c0a1c0 100644 --- a/addons/point_of_sale/static/src/js/screens.js +++ b/addons/point_of_sale/static/src/js/screens.js @@ -368,7 +368,6 @@ function openerp_pos_screens(instance, module){ //module is instance.point_of_sa module.ChooseReceiptPopupWidget = module.PopUpWidget.extend({ template:'ChooseReceiptPopupWidget', show: function(){ - console.log('show'); this._super(); this.renderElement(); var self = this; @@ -603,7 +602,6 @@ function openerp_pos_screens(instance, module){ //module is instance.point_of_sa // initiates the connection to the payment terminal and starts the update requests this.start = function(){ var def = new $.Deferred(); - console.log("START"); self.pos.proxy.payment_request(self.pos.get('selectedOrder').getDueLeft()) .done(function(ack){ if(ack === 'ok'){ @@ -613,7 +611,6 @@ function openerp_pos_screens(instance, module){ //module is instance.point_of_sa }else{ console.error('unknown payment request return value:',ack); } - console.log("START_END"); def.resolve(); }); return def; @@ -621,10 +618,8 @@ function openerp_pos_screens(instance, module){ //module is instance.point_of_sa // gets updated status from the payment terminal and performs the appropriate consequences this.update = function(){ - console.log("UPDATE"); var def = new $.Deferred(); if(self.canceled){ - console.log("UPDATE_END"); return def.resolve(); } self.pos.proxy.payment_status() @@ -656,7 +651,6 @@ function openerp_pos_screens(instance, module){ //module is instance.point_of_sa }else{ console.error('unknown status value:',status.status); } - console.log("UPDATE_END"); def.resolve(); }); return def; @@ -664,14 +658,12 @@ function openerp_pos_screens(instance, module){ //module is instance.point_of_sa // cancels a payment. this.cancel = function(){ - console.log("CANCEL"); if(!self.paid && !self.canceled){ self.canceled = true; self.pos.proxy.payment_cancel(); self.pos_widget.screen_selector.set_current_screen(self.previous_screen); self.queue.clear(); } - console.log("CANCEL_END"); return (new $.Deferred()).resolve(); } @@ -941,7 +933,6 @@ function openerp_pos_screens(instance, module){ //module is instance.point_of_sa }); l.appendTo(this.$('#paymentlines')); this.paymentlinewidgets.push(l); - this.$('.paymentline-amount input:last').focus(); if(this.numpadState){ this.numpadState.resetValue(); } diff --git a/addons/point_of_sale/static/src/js/widgets.js b/addons/point_of_sale/static/src/js/widgets.js index d9e57d08add..ccad06e70fd 100644 --- a/addons/point_of_sale/static/src/js/widgets.js +++ b/addons/point_of_sale/static/src/js/widgets.js @@ -313,17 +313,10 @@ function openerp_pos_widgets(instance, module){ //module is instance.point_of_sa }, changeAmount: function(event) { var newAmount = event.currentTarget.value; - console.log(event); - console.log('changeAmount:',newAmount); - if( typeof newAmmount === 'string'){ - var amount = parseFloat(newAmount); - if(!isNaN(amount)){ - this.amount = amount; - this.payment_line.set_amount(amount); - } - }else if(!isNaN(newAmount)){ - this.amount = newAmount; - this.payment_line.set_amount(newAmount); + var amount = parseFloat(newAmount); + if(!isNaN(amount)){ + this.amount = amount; + this.payment_line.set_amount(amount); } }, changedAmount: function() { From 4c1016415c3522a23edbf85922ee670132654593 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20van=20der=20Essen?= Date: Thu, 24 Jan 2013 17:22:25 +0100 Subject: [PATCH 21/26] [FIX] point_of_sale: add subtotal to printed ticket bzr revid: fva@openerp.com-20130124162225-wv0vgody2xtx2hog --- addons/point_of_sale/static/src/js/models.js | 5 ++--- addons/point_of_sale/static/src/xml/pos.xml | 3 +++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/addons/point_of_sale/static/src/js/models.js b/addons/point_of_sale/static/src/js/models.js index fb5c9c6f417..bb5767bf537 100644 --- a/addons/point_of_sale/static/src/js/models.js +++ b/addons/point_of_sale/static/src/js/models.js @@ -351,7 +351,6 @@ function openerp_pos_models(instance, module){ //module is instance.point_of_sal }, // sets a discount [0,100]% set_discount: function(discount){ - console.log('set_discount: ',discount); var disc = Math.min(Math.max(parseFloat(discount) || 0, 0),100); this.discount = disc; this.discountStr = '' + disc; @@ -371,7 +370,6 @@ function openerp_pos_models(instance, module){ //module is instance.point_of_sal // product's unity of measure properties. Quantities greater than zero will not get // rounded to zero set_quantity: function(quantity){ - console.log('set_quantity: ',quantity); if(quantity === 'remove'){ this.order.removeOrderline(this); return; @@ -472,7 +470,6 @@ function openerp_pos_models(instance, module){ //module is instance.point_of_sal }, // changes the base price of the product for this orderline set_unit_price: function(price){ - console.log('set_price: ',price); this.price = round(parseFloat(price) || 0, 2); this.trigger('change'); }, @@ -738,10 +735,12 @@ function openerp_pos_models(instance, module){ //module is instance.point_of_sal return { orderlines: orderlines, paymentlines: paymentlines, + subtotal: this.getSubtotal(), total_with_tax: this.getTotalTaxIncluded(), total_without_tax: this.getTotalTaxExcluded(), total_tax: this.getTax(), total_paid: this.getPaidTotal(), + total_discount: this.getDiscountTotal(), change: this.getChange(), name : this.getName(), client: client ? client.name : null , diff --git a/addons/point_of_sale/static/src/xml/pos.xml b/addons/point_of_sale/static/src/xml/pos.xml index db63030615f..aca1c8e56df 100644 --- a/addons/point_of_sale/static/src/xml/pos.xml +++ b/addons/point_of_sale/static/src/xml/pos.xml @@ -600,6 +600,9 @@
+ From 86d8c56dcef817dea0aaa7adc98efbd07046a181 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20van=20der=20Essen?= Date: Fri, 25 Jan 2013 16:34:05 +0100 Subject: [PATCH 22/26] [FIX] point_of_sale: removed obsolete console.log bzr revid: fva@openerp.com-20130125153405-4n49h8nbmwx2ji3k --- addons/point_of_sale/static/src/js/models.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/addons/point_of_sale/static/src/js/models.js b/addons/point_of_sale/static/src/js/models.js index bb5767bf537..a6b9a02b7b3 100644 --- a/addons/point_of_sale/static/src/js/models.js +++ b/addons/point_of_sale/static/src/js/models.js @@ -121,7 +121,7 @@ function openerp_pos_models(instance, module){ //module is instance.point_of_sal return self.fetch('product.packaging', null, null); }).then(function(packagings){ self.set('product.packaging',packagings); - + return self.fetch('res.users', ['name','ean13'], [['ean13', '!=', false]]); }).then(function(users){ self.set('user_list',users); @@ -215,7 +215,6 @@ function openerp_pos_models(instance, module){ //module is instance.point_of_sal // logs the usefull posmodel data to the console for debug purposes log_loaded_data: function(){ console.log('PosModel data has been loaded:'); - console.log('PosModel: categories:',this.get('categories')); console.log('PosModel: units:',this.get('units')); console.log('PosModel: bank_statements:',this.get('bank_statements')); console.log('PosModel: journals:',this.get('journals')); From 2e3adb48c4d6f3fd96671f4b8369bc2ebbe285e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20van=20der=20Essen?= Date: Mon, 28 Jan 2013 15:36:41 +0100 Subject: [PATCH 23/26] [FIX] point_of_sale: taxes behaviour in invoice generation from pos orders matches the sale order behaviour bzr revid: fva@openerp.com-20130128143641-51vssmkvxbxcprvn --- addons/point_of_sale/point_of_sale.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/addons/point_of_sale/point_of_sale.py b/addons/point_of_sale/point_of_sale.py index 970eb1fbed7..8e47d83aa24 100644 --- a/addons/point_of_sale/point_of_sale.py +++ b/addons/point_of_sale/point_of_sale.py @@ -853,8 +853,7 @@ class pos_order(osv.osv): inv_line['price_unit'] = line.price_unit inv_line['discount'] = line.discount inv_line['name'] = inv_name - inv_line['invoice_line_tax_id'] = ('invoice_line_tax_id' in inv_line)\ - and [(6, 0, inv_line['invoice_line_tax_id'])] or [] + inv_line['invoice_line_tax_id'] = [(6, 0, [x.id for x in line.product_id.taxes_id] )] inv_line_ref.create(cr, uid, inv_line, context=context) inv_ref.button_reset_taxes(cr, uid, [inv_id], context=context) wf_service.trg_validate(uid, 'pos.order', order.id, 'invoice', cr) @@ -1156,7 +1155,6 @@ class pos_order_line(osv.osv): prod = self.pool.get('product.product').browse(cr, uid, product, context=context) - taxes = prod.taxes_id price = price_unit * (1 - (discount or 0.0) / 100.0) taxes = account_tax_obj.compute_all(cr, uid, prod.taxes_id, price, qty, product=prod, partner=False) From e9c6fd0deac53746487f431b1ea84b25db6af22a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20van=20der=20Essen?= Date: Mon, 28 Jan 2013 18:18:00 +0100 Subject: [PATCH 24/26] [FIX] point_of_sale: correct currency rounding bzr revid: fva@openerp.com-20130128171800-wobu3q7l5d16qhyq --- addons/point_of_sale/static/src/js/models.js | 37 ++++++++++++++----- addons/point_of_sale/static/src/js/screens.js | 8 ++-- .../static/src/js/widget_base.js | 6 ++- addons/point_of_sale/static/src/xml/pos.xml | 24 ++---------- 4 files changed, 39 insertions(+), 36 deletions(-) diff --git a/addons/point_of_sale/static/src/js/models.js b/addons/point_of_sale/static/src/js/models.js index a6b9a02b7b3..d2cf15b54f3 100644 --- a/addons/point_of_sale/static/src/js/models.js +++ b/addons/point_of_sale/static/src/js/models.js @@ -1,10 +1,23 @@ function openerp_pos_models(instance, module){ //module is instance.point_of_sale var QWeb = instance.web.qweb; + // rounds a value with a fixed number of decimals. + // round(3.141492,2) -> 3.14 function round(value,decimals){ var mult = Math.pow(10,decimals || 0); return Math.round(value*mult)/mult; } + window.round = round; + + // rounds a value with decimal form precision + // round(3.141592,0.025) ->3.125 + function round_pr(value,precision){ + if(!precision || precision < 0){ + throw new Error('round_pr(): needs a precision greater than zero, got '+precision+' instead'); + } + return Math.round(value / precision) * precision; + } + window.round_pr = round_pr; // The PosModel contains the Point Of Sale's representation of the backend. @@ -105,8 +118,9 @@ function openerp_pos_models(instance, module){ //module is instance.point_of_sal }).then(function(company_partners){ self.get('company').contact_address = company_partners[0].contact_address; - return self.fetch('res.currency',['symbol','position'],[['id','=',self.get('company').currency_id[0]]]); + return self.fetch('res.currency',['symbol','position','rounding','accuracy'],[['id','=',self.get('company').currency_id[0]]]); }).then(function(currencies){ + console.log('Currency:',currencies[0]); self.set('currency',currencies[0]); return self.fetch('product.uom', null, null); @@ -377,7 +391,7 @@ function openerp_pos_models(instance, module){ //module is instance.point_of_sal var unit = this.get_unit(); if(unit){ this.quantity = Math.max(unit.rounding, Math.round(quant / unit.rounding) * unit.rounding); - this.quantityStr = this.quantity.toFixed(Math.ceil(Math.log(1.0 / unit.rounding) / Math.log(10))); + this.quantityStr = this.quantity.toFixed(Math.max(0,Math.ceil(Math.log(1.0 / unit.rounding) / Math.log(10)))); }else{ this.quantity = quant; this.quantityStr = '' + this.quantity; @@ -473,10 +487,12 @@ function openerp_pos_models(instance, module){ //module is instance.point_of_sal this.trigger('change'); }, get_unit_price: function(){ - return this.price; + var rounding = this.pos.get('currency').rounding; + return round_pr(this.price,rounding); }, get_display_price: function(){ - return round(round(this.price * this.get_quantity(),2) * (1- this.get_discount()/100.0),2); + var rounding = this.pos.get('currency').rounding; + return round_pr(round_pr(this.get_unit_price() * this.get_quantity(),rounding) * (1- this.get_discount()/100.0),rounding); }, get_price_without_tax: function(){ return this.get_all_prices().priceWithoutTax; @@ -487,9 +503,10 @@ function openerp_pos_models(instance, module){ //module is instance.point_of_sal get_tax: function(){ return this.get_all_prices().tax; }, - get_all_prices: function() { + get_all_prices: function(){ var self = this; - var base = round(this.get_quantity() * this.price * (1 - (this.get_discount() / 100)),2); //FIXME en fonction de la currency + var currency_rounding = this.pos.get('currency').rounding; + var base = round_pr(this.get_quantity() * this.get_unit_price() * (1.0 - (this.get_discount() / 100.0)), currency_rounding); var totalTax = base; var totalNoTax = base; @@ -503,13 +520,13 @@ function openerp_pos_models(instance, module){ //module is instance.point_of_sal if (tax.price_include) { var tmp; if (tax.type === "percent") { - tmp = base - round(base / (1 + tax.amount),2); //FIXME en fonction de la currency + tmp = base - round_pr(base / (1 + tax.amount),currency_rounding); } else if (tax.type === "fixed") { - tmp = round(tax.amount * self.get_quantity(),2); + tmp = round_pr(tax.amount * self.get_quantity(),currency_rounding); } else { throw "This type of tax is not supported by the point of sale: " + tax.type; } - tmp = round(tmp,2); + tmp = round_pr(tmp,currency_rounding); taxtotal += tmp; totalNoTax -= tmp; } else { @@ -521,7 +538,7 @@ function openerp_pos_models(instance, module){ //module is instance.point_of_sal } else { throw "This type of tax is not supported by the point of sale: " + tax.type; } - tmp = round(tmp,2); + tmp = round_pr(tmp,currency_rounding); taxtotal += tmp; totalTax += tmp; } diff --git a/addons/point_of_sale/static/src/js/screens.js b/addons/point_of_sale/static/src/js/screens.js index 2d522c0a1c0..ab9982b4b1f 100644 --- a/addons/point_of_sale/static/src/js/screens.js +++ b/addons/point_of_sale/static/src/js/screens.js @@ -960,10 +960,10 @@ function openerp_pos_screens(instance, module){ //module is instance.point_of_sa var remaining = dueTotal > paidTotal ? dueTotal - paidTotal : 0; var change = paidTotal > dueTotal ? paidTotal - dueTotal : 0; - this.$('#payment-due-total').html(dueTotal.toFixed(2)); - this.$('#payment-paid-total').html(paidTotal.toFixed(2)); - this.$('#payment-remaining').html(remaining.toFixed(2)); - this.$('#payment-change').html(change.toFixed(2)); + this.$('#payment-due-total').html(this.format_currency(dueTotal)); + this.$('#payment-paid-total').html(this.format_currency(paidTotal)); + this.$('#payment-remaining').html(this.format_currency(remaining)); + this.$('#payment-change').html(this.format_currency(change)); if(currentOrder.selected_orderline === undefined){ remaining = 1; // What is this ? } diff --git a/addons/point_of_sale/static/src/js/widget_base.js b/addons/point_of_sale/static/src/js/widget_base.js index 4cab7869a53..124be4e9f82 100644 --- a/addons/point_of_sale/static/src/js/widget_base.js +++ b/addons/point_of_sale/static/src/js/widget_base.js @@ -22,13 +22,15 @@ function openerp_pos_basewidget(instance, module){ //module is instance.point_of if(this.pos && this.pos.get('currency')){ this.currency = this.pos.get('currency'); }else{ - this.currency = {symbol: '$', position: 'after'}; + this.currency = {symbol: '$', position: 'after', rounding: 0.01}; } + var decimals = Math.max(0,Math.ceil(Math.log(1.0 / this.currency.rounding) / Math.log(10))); + this.format_currency = function(amount){ if(typeof amount === 'number'){ amount = Math.round(amount*100)/100; - amount = amount.toFixed(2); + amount = amount.toFixed(decimals); } if(this.currency.position === 'after'){ return amount + ' ' + this.currency.symbol; diff --git a/addons/point_of_sale/static/src/xml/pos.xml b/addons/point_of_sale/static/src/xml/pos.xml index aca1c8e56df..3da76ec12d8 100644 --- a/addons/point_of_sale/static/src/xml/pos.xml +++ b/addons/point_of_sale/static/src/xml/pos.xml @@ -220,11 +220,7 @@ Total: - - - - - +
Subtotal: + +
Tax:
@@ -233,31 +229,19 @@ Paid: - - - - - +
Remaining: - - - - - +
Change: - - - - - +
From a06e93e2180d420c0e0a615cc51f90d3c45d6ed3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20van=20der=20Essen?= Date: Tue, 29 Jan 2013 15:01:46 +0100 Subject: [PATCH 25/26] [FIX] point_of_sale: keyboard focus for payment widget bzr revid: fva@openerp.com-20130129140146-uz1jpmv4u3dmulus --- addons/point_of_sale/static/src/js/screens.js | 18 ++++++++++++++++-- addons/point_of_sale/static/src/js/widgets.js | 10 +++++++++- 2 files changed, 25 insertions(+), 3 deletions(-) diff --git a/addons/point_of_sale/static/src/js/screens.js b/addons/point_of_sale/static/src/js/screens.js index ab9982b4b1f..eca4a3c5915 100644 --- a/addons/point_of_sale/static/src/js/screens.js +++ b/addons/point_of_sale/static/src/js/screens.js @@ -857,6 +857,7 @@ function openerp_pos_screens(instance, module){ //module is instance.point_of_sa this.bindPaymentLineEvents(); this.bind_orderline_events(); this.paymentlinewidgets = []; + this.focusedLine = null; }, show: function(){ this._super(); @@ -886,6 +887,7 @@ function openerp_pos_screens(instance, module){ //module is instance.point_of_sa }); this.updatePaymentSummary(); + this.line_refocus(); }, close: function(){ this._super(); @@ -923,10 +925,20 @@ function openerp_pos_screens(instance, module){ //module is instance.point_of_sa this.bind_orderline_events(); this.renderElement(); }, + line_refocus: function(lineWidget){ + if(lineWidget){ + if(this.focusedLine !== lineWidget){ + this.focusedLine = lineWidget; + } + } + if(this.focusedLine){ + this.focusedLine.focus(); + } + }, addPaymentLine: function(newPaymentLine) { var self = this; - var l = new module.PaymentlineWidget(null, { - payment_line: newPaymentLine + var l = new module.PaymentlineWidget(this, { + payment_line: newPaymentLine, }); l.on('delete_payment_line', self, function(r) { self.deleteLine(r); @@ -936,6 +948,7 @@ function openerp_pos_screens(instance, module){ //module is instance.point_of_sa if(this.numpadState){ this.numpadState.resetValue(); } + this.line_refocus(l); }, renderElement: function() { this._super(); @@ -952,6 +965,7 @@ function openerp_pos_screens(instance, module){ //module is instance.point_of_sa }, deleteLine: function(lineWidget) { this.currentPaymentLines.remove([lineWidget.payment_line]); + lineWidget.destroy(); }, updatePaymentSummary: function() { var currentOrder = this.pos.get('selectedOrder'); diff --git a/addons/point_of_sale/static/src/js/widgets.js b/addons/point_of_sale/static/src/js/widgets.js index ccad06e70fd..874c387ea23 100644 --- a/addons/point_of_sale/static/src/js/widgets.js +++ b/addons/point_of_sale/static/src/js/widgets.js @@ -328,11 +328,19 @@ function openerp_pos_widgets(instance, module){ //module is instance.point_of_sa var self = this; this.name = this.payment_line.get_cashregister().get('journal_id')[1]; this._super(); - this.$('input').keyup(_.bind(this.changeAmount, this)); + this.$('input').keyup(function(event){ + self.changeAmount(event); + }); this.$('.delete-payment-line').click(function() { self.trigger('delete_payment_line', self); }); }, + focus: function(){ + var val = this.$('input')[0].value; + this.$('input')[0].focus(); + this.$('input')[0].value = val; + this.$('input')[0].select(); + }, }); module.OrderButtonWidget = module.PosBaseWidget.extend({ From b5a47b24fc81f359c297c88405e549b65d32c54c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20van=20der=20Essen?= Date: Tue, 29 Jan 2013 16:24:21 +0100 Subject: [PATCH 26/26] [FIX] point_of_sale: css gradient fix bzr revid: fva@openerp.com-20130129152421-sgke1e3ckh9ohppi --- addons/point_of_sale/static/src/css/pos.css | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/addons/point_of_sale/static/src/css/pos.css b/addons/point_of_sale/static/src/css/pos.css index 9d7a7c013c5..d9a4d6d00a9 100644 --- a/addons/point_of_sale/static/src/css/pos.css +++ b/addons/point_of_sale/static/src/css/pos.css @@ -544,7 +544,9 @@ background: -webkit-linear-gradient(-90deg,rgba(255,255,255,0),rgba(255,255,255,1), rgba(255,255,255,1)); background: -moz-linear-gradient(-90deg,rgba(255,255,255,0),rgba(255,255,255,1), rgba(255,255,255,1)); background: -ms-linear-gradient(-90deg,rgba(255,255,255,0),rgba(255,255,255,1), rgba(255,255,255,1)); - background: linear-gradient(-90deg,rgba(255,255,255,0),rgba(255,255,255,1), rgba(255,255,255,1)); + /* for some reason the -90deg orientation doesn't match the -webkit-linear-gradient. It should be 180deg here. + * webkit also insists on rendering *both* gradients instead of only the native one. So it doesn't looks right. ugh. + background: linear-gradient(-90deg,rgba(255,255,255,0),rgba(255,255,255,1), rgba(255,255,255,1)); */ /*background:#FFF;*/ padding: 3px; padding-top: 15px; @@ -609,7 +611,9 @@ background: -webkit-linear-gradient(-90deg,rgba(255,255,255,0),rgba(255,255,255,1), rgba(255,255,255,1)); background: -moz-linear-gradient(-90deg,rgba(255,255,255,0),rgba(255,255,255,1), rgba(255,255,255,1)); background: -ms-linear-gradient(-90deg,rgba(255,255,255,0),rgba(255,255,255,1), rgba(255,255,255,1)); + /* troublesome in latest webkit background: linear-gradient(-90deg,rgba(255,255,255,0),rgba(255,255,255,1), rgba(255,255,255,1)); + */ /*background:#FFF;*/ padding: 3px; padding-top:15px;