diff --git a/addons/auth_signup/i18n/zh_TW.po b/addons/auth_signup/i18n/zh_TW.po new file mode 100644 index 00000000000..b16d2be5abf --- /dev/null +++ b/addons/auth_signup/i18n/zh_TW.po @@ -0,0 +1,279 @@ +# Chinese (Traditional) 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-09-19 09:40+0000\n" +"Last-Translator: FULL NAME \n" +"Language-Team: Chinese (Traditional) \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Launchpad-Export-Date: 2013-09-20 05:38+0000\n" +"X-Generator: Launchpad (build 16765)\n" + +#. module: auth_signup +#: field:res.partner,signup_type:0 +msgid "Signup Token Type" +msgstr "" + +#. module: auth_signup +#: field:base.config.settings,auth_signup_uninvited:0 +msgid "Allow external users to sign up" +msgstr "允許外部使用者註冊" + +#. module: auth_signup +#. openerp-web +#: code:addons/auth_signup/static/src/xml/auth_signup.xml:19 +#, python-format +msgid "Confirm Password" +msgstr "確認密碼" + +#. module: auth_signup +#: help:base.config.settings,auth_signup_uninvited:0 +msgid "If unchecked, only invited users may sign up." +msgstr "如果未勾選,只有被邀請的使用者可以註冊" + +#. module: auth_signup +#: model:ir.model,name:auth_signup.model_base_config_settings +msgid "base.config.settings" +msgstr "" + +#. module: auth_signup +#: code:addons/auth_signup/res_users.py:266 +#, python-format +msgid "Cannot send email: user has no email address." +msgstr "無法送出email:使用者沒有email 地址" + +#. module: auth_signup +#. openerp-web +#: code:addons/auth_signup/static/src/xml/auth_signup.xml:27 +#: code:addons/auth_signup/static/src/xml/auth_signup.xml:31 +#, python-format +msgid "Reset password" +msgstr "重設密碼" + +#. module: auth_signup +#: field:base.config.settings,auth_signup_template_user_id:0 +msgid "Template user for new users created through signup" +msgstr "" + +#. module: auth_signup +#: model:email.template,subject:auth_signup.reset_password_email +msgid "Password reset" +msgstr "" + +#. module: auth_signup +#. openerp-web +#: code:addons/auth_signup/static/src/js/auth_signup.js:120 +#, python-format +msgid "Please enter a password and confirm it." +msgstr "" + +#. module: auth_signup +#: view:res.users:0 +msgid "Send an email to the user to (re)set their password." +msgstr "" + +#. module: auth_signup +#. openerp-web +#: code:addons/auth_signup/static/src/xml/auth_signup.xml:26 +#: code:addons/auth_signup/static/src/xml/auth_signup.xml:29 +#, python-format +msgid "Sign Up" +msgstr "" + +#. module: auth_signup +#: selection:res.users,state:0 +msgid "New" +msgstr "" + +#. module: auth_signup +#: code:addons/auth_signup/res_users.py:258 +#, python-format +msgid "Mail sent to:" +msgstr "" + +#. module: auth_signup +#: field:res.users,state:0 +msgid "Status" +msgstr "" + +#. module: auth_signup +#: model:email.template,body_html:auth_signup.reset_password_email +msgid "" +"\n" +"

A password reset was requested for the OpenERP account linked to this " +"email.

\n" +"\n" +"

You may change your password by following this link.

\n" +"\n" +"

Note: If you do not expect this, you can safely ignore this email.

" +msgstr "" + +#. module: auth_signup +#. openerp-web +#: code:addons/auth_signup/static/src/js/auth_signup.js:114 +#, python-format +msgid "Please enter a name." +msgstr "" + +#. module: auth_signup +#: model:ir.model,name:auth_signup.model_res_users +msgid "Users" +msgstr "" + +#. module: auth_signup +#: field:res.partner,signup_url:0 +msgid "Signup URL" +msgstr "" + +#. module: auth_signup +#. openerp-web +#: code:addons/auth_signup/static/src/js/auth_signup.js:117 +#, python-format +msgid "Please enter a username." +msgstr "" + +#. module: auth_signup +#: selection:res.users,state:0 +msgid "Active" +msgstr "" + +#. module: auth_signup +#: code:addons/auth_signup/res_users.py:270 +#, python-format +msgid "" +"Cannot send email: no outgoing email server configured.\n" +"You can configure it under Settings/General Settings." +msgstr "" + +#. module: auth_signup +#. openerp-web +#: code:addons/auth_signup/static/src/xml/auth_signup.xml:12 +#, python-format +msgid "Username" +msgstr "" + +#. module: auth_signup +#. openerp-web +#: code:addons/auth_signup/static/src/xml/auth_signup.xml:8 +#, python-format +msgid "Name" +msgstr "" + +#. module: auth_signup +#. openerp-web +#: code:addons/auth_signup/static/src/js/auth_signup.js:173 +#, python-format +msgid "Please enter a username or email address." +msgstr "" + +#. module: auth_signup +#: selection:res.users,state:0 +msgid "Resetting Password" +msgstr "" + +#. module: auth_signup +#. openerp-web +#: code:addons/auth_signup/static/src/xml/auth_signup.xml:13 +#, python-format +msgid "Username (Email)" +msgstr "" + +#. module: auth_signup +#: field:res.partner,signup_expiration:0 +msgid "Signup Expiration" +msgstr "" + +#. module: auth_signup +#: help:base.config.settings,auth_signup_reset_password:0 +msgid "This allows users to trigger a password reset from the Login page." +msgstr "" + +#. module: auth_signup +#. openerp-web +#: code:addons/auth_signup/static/src/xml/auth_signup.xml:25 +#, python-format +msgid "Log in" +msgstr "" + +#. module: auth_signup +#: field:res.partner,signup_valid:0 +msgid "Signup Token is Valid" +msgstr "" + +#. module: auth_signup +#. openerp-web +#: code:addons/auth_signup/static/src/js/auth_signup.js:111 +#: code:addons/auth_signup/static/src/js/auth_signup.js:114 +#: code:addons/auth_signup/static/src/js/auth_signup.js:117 +#: code:addons/auth_signup/static/src/js/auth_signup.js:120 +#: code:addons/auth_signup/static/src/js/auth_signup.js:123 +#: code:addons/auth_signup/static/src/js/auth_signup.js:170 +#: code:addons/auth_signup/static/src/js/auth_signup.js:173 +#, python-format +msgid "Login" +msgstr "" + +#. module: auth_signup +#. openerp-web +#: code:addons/auth_signup/static/src/js/auth_signup.js:97 +#, python-format +msgid "Invalid signup token" +msgstr "" + +#. module: auth_signup +#. openerp-web +#: code:addons/auth_signup/static/src/js/auth_signup.js:123 +#, python-format +msgid "Passwords do not match; please retype them." +msgstr "" + +#. module: auth_signup +#. openerp-web +#: code:addons/auth_signup/static/src/js/auth_signup.js:111 +#: code:addons/auth_signup/static/src/js/auth_signup.js:170 +#, python-format +msgid "No database selected !" +msgstr "" + +#. module: auth_signup +#: view:res.users:0 +msgid "Reset Password" +msgstr "" + +#. module: auth_signup +#: field:base.config.settings,auth_signup_reset_password:0 +msgid "Enable password reset from Login page" +msgstr "" + +#. module: auth_signup +#. openerp-web +#: code:addons/auth_signup/static/src/xml/auth_signup.xml:30 +#, python-format +msgid "Back to Login" +msgstr "" + +#. module: auth_signup +#. openerp-web +#: code:addons/auth_signup/static/src/xml/auth_signup.xml:22 +#, python-format +msgid "Sign up" +msgstr "" + +#. module: auth_signup +#: model:ir.model,name:auth_signup.model_res_partner +msgid "Partner" +msgstr "" + +#. module: auth_signup +#: field:res.partner,signup_token:0 +msgid "Signup Token" +msgstr "" diff --git a/addons/crm/crm_lead.py b/addons/crm/crm_lead.py index 9d17526c19f..fcfec50d344 100644 --- a/addons/crm/crm_lead.py +++ b/addons/crm/crm_lead.py @@ -298,7 +298,7 @@ class crm_lead(format_address, osv.osv): 'company_id': lambda s, cr, uid, c: s.pool.get('res.company')._company_default_get(cr, uid, 'crm.lead', context=c), 'priority': lambda *a: crm.AVAILABLE_PRIORITIES[2][0], 'color': 0, - 'date_last_stage_update': fields.datetime.now(), + 'date_last_stage_update': fields.datetime.now, } _sql_constraints = [ diff --git a/addons/crm_claim/crm_claim.py b/addons/crm_claim/crm_claim.py index c655ce2c12b..a3b09c272f6 100644 --- a/addons/crm_claim/crm_claim.py +++ b/addons/crm_claim/crm_claim.py @@ -108,7 +108,7 @@ class crm_claim(osv.osv): _defaults = { 'user_id': lambda s, cr, uid, c: uid, 'section_id': lambda s, cr, uid, c: s._get_default_section_id(cr, uid, c), - 'date': fields.datetime.now(), + 'date': fields.datetime.now, 'company_id': lambda s, cr, uid, c: s.pool.get('res.company')._company_default_get(cr, uid, 'crm.case', context=c), 'priority': lambda *a: crm.AVAILABLE_PRIORITIES[2][0], 'active': lambda *a: 1, diff --git a/addons/crm_helpdesk/crm_helpdesk.py b/addons/crm_helpdesk/crm_helpdesk.py index 03e6a243851..80a86c87c7c 100644 --- a/addons/crm_helpdesk/crm_helpdesk.py +++ b/addons/crm_helpdesk/crm_helpdesk.py @@ -80,7 +80,7 @@ class crm_helpdesk(osv.osv): 'active': lambda *a: 1, 'user_id': lambda s, cr, uid, c: uid, 'state': lambda *a: 'draft', - 'date': lambda *a: fields.datetime.now(), + 'date': fields.datetime.now, 'company_id': lambda s, cr, uid, c: s.pool.get('res.company')._company_default_get(cr, uid, 'crm.helpdesk', context=c), 'priority': lambda *a: crm.AVAILABLE_PRIORITIES[2][0], } diff --git a/addons/hr_recruitment/hr_recruitment.py b/addons/hr_recruitment/hr_recruitment.py index 8664a2c1166..0f0f2785fc1 100644 --- a/addons/hr_recruitment/hr_recruitment.py +++ b/addons/hr_recruitment/hr_recruitment.py @@ -225,7 +225,7 @@ class hr_applicant(osv.Model): 'department_id': lambda s, cr, uid, c: s._get_default_department_id(cr, uid, c), 'company_id': lambda s, cr, uid, c: s.pool.get('res.company')._company_default_get(cr, uid, 'hr.applicant', context=c), 'color': 0, - 'date_last_stage_update': fields.datetime.now(), + 'date_last_stage_update': fields.datetime.now, } _group_by_full = { diff --git a/addons/mail/mail_message.py b/addons/mail/mail_message.py index 3719dbc1c63..72ccdc83bb6 100644 --- a/addons/mail/mail_message.py +++ b/addons/mail/mail_message.py @@ -212,7 +212,7 @@ class mail_message(osv.Model): _defaults = { 'type': 'email', - 'date': fields.datetime.now(), + 'date': fields.datetime.now, 'author_id': lambda self, cr, uid, ctx=None: self._get_default_author(cr, uid, ctx), 'body': '', 'email_from': lambda self, cr, uid, ctx=None: self._get_default_from(cr, uid, ctx), diff --git a/addons/mass_mailing/__openerp__.py b/addons/mass_mailing/__openerp__.py index db7ac54263a..b8ca21c60d7 100644 --- a/addons/mass_mailing/__openerp__.py +++ b/addons/mass_mailing/__openerp__.py @@ -21,7 +21,11 @@ { 'name': 'Mass Mailing Campaigns', - 'description': """TODO""", + 'description': """ +Easily send mass mailing to your leads, opportunities or customers. Track +marketing campaigns performance to improve conversion rates. Design +professional emails and reuse templates in a few clicks. + """, 'version': '1.0', 'author': 'OpenERP', 'website': 'http://www.openerp.com', diff --git a/addons/mass_mailing/mass_mailing.py b/addons/mass_mailing/mass_mailing.py index 49ee106bc69..ad59a918203 100644 --- a/addons/mass_mailing/mass_mailing.py +++ b/addons/mass_mailing/mass_mailing.py @@ -274,7 +274,7 @@ class MassMailing(osv.Model): } _defaults = { - 'date': fields.datetime.now(), + 'date': fields.datetime.now, } diff --git a/addons/mass_mailing/static/description/app_crm.png b/addons/mass_mailing/static/description/app_crm.png new file mode 100644 index 00000000000..e20c44836ba Binary files /dev/null and b/addons/mass_mailing/static/description/app_crm.png differ diff --git a/addons/mass_mailing/static/description/app_marketing_campaign.png b/addons/mass_mailing/static/description/app_marketing_campaign.png new file mode 100644 index 00000000000..f7662587969 Binary files /dev/null and b/addons/mass_mailing/static/description/app_marketing_campaign.png differ diff --git a/addons/mass_mailing/static/description/app_website_crm.png b/addons/mass_mailing/static/description/app_website_crm.png new file mode 100644 index 00000000000..7f19f68db61 Binary files /dev/null and b/addons/mass_mailing/static/description/app_website_crm.png differ diff --git a/addons/mass_mailing/static/description/icon.png b/addons/mass_mailing/static/description/icon.png new file mode 100644 index 00000000000..6ef68f30952 Binary files /dev/null and b/addons/mass_mailing/static/description/icon.png differ diff --git a/addons/mass_mailing/static/description/index.html b/addons/mass_mailing/static/description/index.html new file mode 100644 index 00000000000..49f4d99e80f --- /dev/null +++ b/addons/mass_mailing/static/description/index.html @@ -0,0 +1,227 @@ +
+
+

Mass Mailing Made Easy

+

Design, Send, Track Emails

+
+
+ +
+
+
+

+Easily send mass mailing to your leads, opportunities or customers. Track +marketing campaigns performance to improve conversion rates. Design +professional emails and reuse templates in a few clicks. +

+ +
+
+
+ +
+
+

Send Professional Emails

+
+

+Import database of prospects or filter on +existing leads, opportunities and customers in just a few clicks. +

+Define email templates to reuse content or specific design for your newsletter. +Setup several email servers with their own IP/domain to optimise opening rates. +

+
+
+
+ +
+
+
+
+ +
+
+

Organize Marketing Campaigns

+

Design, Send, Track by Campaigns

+
+
+ +
+
+
+

+ Get real time statistics on campaigns performance to improve your + conversion rate. Track mails sent, received, opened and + answered. +

+ Easily manage your marketing campaigns, discussion groups, + leads and opportunities in one simple and powerful platform. +

+
+
+
+ +
+
+

Integrated with OpenERP Apps

+

+
+

+Get access to mass mailing features from every OpenERP app to improve +the way your users communicate. +

+Send template of emails from CRM opportunities, select leads based on +marketing segments, send jobs offers and automate answers to applicants, reuse +email template in the lead automation marketing campaigns. +

+Answers to your emails appears automatically in the history of every document with the +social network module. +

+
+
+
+ +
+
+
+
+ +
+
+

Clean Your Lead Database

+

Handle bounce and conversion rates

+
+
+ +
+
+
+

+ Get a clean lead database that improves over the time using the + performance of your mails. OpenERP handle bounce mails + efficiently, flag erroneous leads accordingly and gives you + statistics on the quality of your leads. +

+
+
+
+ +
+
+

One click emails send

+

Select any documents, send emails

+
+

+The marketing department will love working on campaigns. But you can also +give a one click mass mailing facility to all others users on their own +prospects or documents. +

+Select a few documents (e.g. leads, support tickets, suppliers, applicants, +...) and send emails to their contacts in one click, reusing existing emails +templates. +

+
+
+
+ +
+
+ +
+
+ +
+
+

Follow-up On Answers

+

Communicate efficiently with prospects

+
+
+ +
+
+
+

+The chatter feature enables you to communicate faster and more efficiently with +your customer. Get documents created automatically (leads, opportunities, +tasks, ...) based on answers to your mass mailing campaigns Follow the +discussion directly on the business documents within OpenERP or via email. +

+Get all the negotiations and discussions attached to the right document +and relevent managers notified on specific events. +

+
+
+
+ +
+
+

Campaigns Dashboard

+

Analyse the performance of your campaigns

+
+

+Get the insights you need to make smarter marketing campaign. Track statistics +per campaign: bounce rates, sent mails, best content, etc. The clear dashboards +gives you a direct overview of your campaign performance. +

+
+
+
+ +
+
+
+
+ +
+
+

Fully Integrated With Others Apps

+

Efficient mailing for every users

+
+
+
+ +

Lead Automation

+
+ +
+
+

+ Define automated actions (e.g. ask a salesperson to call, send + an email, ...) based on triggers (no activity since 20 days, + answered a promotional email, etc.) +

+ Optimize campaigns from lead to close, on every channel. Make + smarter decisions about where to invest and show the impact of + your marketing activities on your company's bottom line. +

+
+
+ +

Website Forms

+
+ +
+
+

+ Integrate a contact form in your website easily. Forms + submissions create leads automatically in OpenERP CRM. Leads + can be used in marketing campaigns. +

+
+
+ +

CRM

+
+ +
+
+

+Manage your sales funnel with no effort. Attract leads, follow-up on phone +calls and meetings. Analyse the quality of your leads to make informed +decisions and save time by integrating emails directly into the application. +

+
+
+
+ diff --git a/addons/mass_mailing/static/description/mass_mailing_campaign.png b/addons/mass_mailing/static/description/mass_mailing_campaign.png new file mode 100644 index 00000000000..961e25a5f19 Binary files /dev/null and b/addons/mass_mailing/static/description/mass_mailing_campaign.png differ diff --git a/addons/mass_mailing/static/description/mass_mailing_composer.png b/addons/mass_mailing/static/description/mass_mailing_composer.png new file mode 100644 index 00000000000..64f8996ec63 Binary files /dev/null and b/addons/mass_mailing/static/description/mass_mailing_composer.png differ diff --git a/addons/mass_mailing/static/description/mass_mailing_dashboard.png b/addons/mass_mailing/static/description/mass_mailing_dashboard.png new file mode 100644 index 00000000000..8f1ff1e95fe Binary files /dev/null and b/addons/mass_mailing/static/description/mass_mailing_dashboard.png differ diff --git a/addons/mass_mailing/static/description/mass_mailing_history.png b/addons/mass_mailing/static/description/mass_mailing_history.png new file mode 100644 index 00000000000..483e5eec09b Binary files /dev/null and b/addons/mass_mailing/static/description/mass_mailing_history.png differ diff --git a/addons/mass_mailing/static/description/mass_mailing_mailing.png b/addons/mass_mailing/static/description/mass_mailing_mailing.png new file mode 100644 index 00000000000..1bed96aed81 Binary files /dev/null and b/addons/mass_mailing/static/description/mass_mailing_mailing.png differ diff --git a/addons/mass_mailing/static/description/mass_mailing_tasks.png b/addons/mass_mailing/static/description/mass_mailing_tasks.png new file mode 100644 index 00000000000..418eebe4ab8 Binary files /dev/null and b/addons/mass_mailing/static/description/mass_mailing_tasks.png differ diff --git a/addons/point_of_sale/static/src/js/devices.js b/addons/point_of_sale/static/src/js/devices.js index bc697e96aca..1d35a0cc08b 100644 --- a/addons/point_of_sale/static/src/js/devices.js +++ b/addons/point_of_sale/static/src/js/devices.js @@ -540,10 +540,9 @@ function openerp_pos_devices(instance,module){ //module is instance.point_of_sal // The barcode readers acts as a keyboard, we catch all keyup events and try to find a // barcode sequence in the typed keys, then act accordingly. - $('body').delegate('','keypress', function (e){ - //console.log('keyup:'+String.fromCharCode(e.keyCode)+' '+e.keyCode,e); + this.handler = function(e){ //We only care about numbers - if (e.keyCode >= 48 && e.keyCode < 58){ + if (e.which >= 48 && e.which < 58){ // The barcode reader sends keystrokes with a specific interval. // We look if the typed keys fit in the interval. @@ -556,7 +555,7 @@ function openerp_pos_devices(instance,module){ //module is instance.point_of_sal timeStamp = new Date().getTime(); } } - codeNumbers.push(e.keyCode - 48); + codeNumbers.push(e.which - 48); lastTimeStamp = new Date().getTime(); if (codeNumbers.length === 13) { //We have found what seems to be a valid codebar @@ -567,12 +566,13 @@ function openerp_pos_devices(instance,module){ //module is instance.point_of_sal // NaN codeNumbers = []; } - }); + }; + $('body').on('keypress', this.handler); }, // stops catching keyboard events disconnect: function(){ - $('body').undelegate('', 'keyup') + $('body').off('keypress', this.handler) }, }); diff --git a/addons/point_of_sale/static/src/js/models.js b/addons/point_of_sale/static/src/js/models.js index 6d5fd1fc422..f0200bf434c 100644 --- a/addons/point_of_sale/static/src/js/models.js +++ b/addons/point_of_sale/static/src/js/models.js @@ -52,6 +52,7 @@ function openerp_pos_models(instance, module){ //module is instance.point_of_sal 'pos_config': null, 'units': null, 'units_by_id': null, + 'pricelist': null, 'selectedOrder': null, }); @@ -113,10 +114,6 @@ 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','rounding','accuracy'],[['id','=',self.get('company').currency_id[0]]]); - }).then(function(currencies){ - self.set('currency',currencies[0]); - return self.fetch('product.uom', null, null); }).then(function(units){ self.set('units',units); @@ -172,6 +169,14 @@ function openerp_pos_models(instance, module){ //module is instance.point_of_sal }).then(function(shops){ self.set('shop',shops[0]); + return self.fetch('product.pricelist',['currency_id'],[['id','=',self.get('pos_config').pricelist_id[0]]]); + }).then(function(pricelists){ + self.set('pricelist',pricelists[0]); + + return self.fetch('res.currency',['symbol','position','rounding','accuracy'],[['id','=',self.get('pricelist').currency_id[0]]]); + }).then(function(currencies){ + self.set('currency',currencies[0]); + return self.fetch('product.packaging',['ean','product_id']); }).then(function(packagings){ self.db.add_packagings(packagings); @@ -185,7 +190,7 @@ function openerp_pos_models(instance, module){ //module is instance.point_of_sal ['name', 'list_price','price','pos_categ_id', 'taxes_id', 'ean13', 'default_code', 'to_weight', 'uom_id', 'uos_id', 'uos_coeff', 'mes_type', 'description_sale', 'description'], [['sale_ok','=',true],['available_in_pos','=',true]], - {pricelist: self.get('pos_config').pricelist_id[0]} // context for price + {pricelist: self.get('pricelist').id} // context for price ); }).then(function(products){ self.db.add_products(products); diff --git a/addons/point_of_sale/static/src/js/widget_keyboard.js b/addons/point_of_sale/static/src/js/widget_keyboard.js index 05ccdd78ca6..22245b31227 100644 --- a/addons/point_of_sale/static/src/js/widget_keyboard.js +++ b/addons/point_of_sale/static/src/js/widget_keyboard.js @@ -43,10 +43,15 @@ function openerp_pos_keyboard(instance, module){ //module is instance.point_of_s // Write a character to the input zone writeCharacter: function(character){ - var $input = this.$target - $input[0].value += character; - $input.keydown(); - $input.keyup(); + var $input = this.$target; + if(character === '\n'){ + $input.trigger($.Event('keydown',{which:13})); + $input.trigger($.Event('keyup',{which:13})); + }else{ + $input[0].value += character; + $input.keydown(); + $input.keyup(); + } }, // Sends a 'return' character to the input zone. TODO diff --git a/addons/point_of_sale/static/src/js/widgets.js b/addons/point_of_sale/static/src/js/widgets.js index 0768791651b..e36161e289f 100644 --- a/addons/point_of_sale/static/src/js/widgets.js +++ b/addons/point_of_sale/static/src/js/widgets.js @@ -516,7 +516,6 @@ function openerp_pos_widgets(instance, module){ //module is instance.point_of_sa var cat = self.pos.db.get_category_by_id(id); self.set_category(cat); self.renderElement(); - self.search_and_categories(cat); }); }); // breadcrumb click actions @@ -525,12 +524,13 @@ function openerp_pos_widgets(instance, module){ //module is instance.point_of_sa var category = self.pos.db.get_category_by_id(id); self.set_category(category); self.renderElement(); - self.search_and_categories(category); }); + + this.search_and_categories(); + if(this.pos.iface_vkeyboard && this.pos_widget.onscreen_keyboard){ this.pos_widget.onscreen_keyboard.connect(this.$('.searchbox input')); } - this.search_and_categories(); }, set_product_type: function(type){ // 'all' | 'weightable' @@ -542,7 +542,14 @@ function openerp_pos_widgets(instance, module){ //module is instance.point_of_sa reset_category: function(){ this.set_category(); this.renderElement(); - this.search_and_categories(); + }, + + // empties the content of the search box + clear_search: function(){ + var products = this.pos.db.get_product_by_category(this.category.id); + this.pos.get('products').reset(products); + this.$('.searchbox input').val('').focus(); + this.$('.search-clear').fadeOut(); }, // filters the products, and sets up the search callbacks @@ -554,12 +561,20 @@ function openerp_pos_widgets(instance, module){ //module is instance.point_of_sa self.pos.get('products').reset(products); // filter the products according to the search string - this.$('.searchbox input').keyup(function(){ + this.$('.searchbox input').keyup(function(event){ + console.log('event',event); query = $(this).val().toLowerCase(); if(query){ - var products = self.pos.db.search_product_in_category(self.category.id, query); - self.pos.get('products').reset(products); - self.$('.search-clear').fadeIn(); + if(event.which === 13){ + if( self.pos.get('products').size() === 1 ){ + self.pos.get('selectedOrder').addProduct(self.pos.get('products').at(0)); + self.clear_search(); + } + }else{ + var products = self.pos.db.search_product_in_category(self.category.id, query); + self.pos.get('products').reset(products); + self.$('.search-clear').fadeIn(); + } }else{ var products = self.pos.db.get_product_by_category(self.category.id); self.pos.get('products').reset(products); @@ -567,14 +582,9 @@ function openerp_pos_widgets(instance, module){ //module is instance.point_of_sa } }); - this.$('.searchbox input').click(function(){}); //Why ??? - //reset the search when clicking on reset this.$('.search-clear').click(function(){ - var products = self.pos.db.get_product_by_category(self.category.id); - self.pos.get('products').reset(products); - self.$('.searchbox input').val('').focus(); - self.$('.search-clear').fadeOut(); + self.clear_search(); }); }, }); diff --git a/addons/portal_anonymous/i18n/hr.po b/addons/portal_anonymous/i18n/hr.po new file mode 100644 index 00000000000..bc4e3b30eda --- /dev/null +++ b/addons/portal_anonymous/i18n/hr.po @@ -0,0 +1,25 @@ +# Croatian 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-09-19 13:17+0000\n" +"Last-Translator: FULL NAME \n" +"Language-Team: Croatian \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Launchpad-Export-Date: 2013-09-20 05:38+0000\n" +"X-Generator: Launchpad (build 16765)\n" + +#. module: portal_anonymous +#. openerp-web +#: code:addons/portal_anonymous/static/src/xml/portal_anonymous.xml:8 +#, python-format +msgid "Login" +msgstr "Prijava" diff --git a/addons/project/project.py b/addons/project/project.py index d153a849dc7..a8f198cac3d 100644 --- a/addons/project/project.py +++ b/addons/project/project.py @@ -804,7 +804,7 @@ class task(osv.osv): _defaults = { 'stage_id': _get_default_stage_id, 'project_id': _get_default_project_id, - 'date_last_stage_update': lambda *a: fields.datetime.now(), + 'date_last_stage_update': fields.datetime.now, 'kanban_state': 'normal', 'priority': '2', 'progress': 0, diff --git a/addons/project_issue/project_issue.py b/addons/project_issue/project_issue.py index f23f6b6a286..d90d7676ddb 100644 --- a/addons/project_issue/project_issue.py +++ b/addons/project_issue/project_issue.py @@ -297,7 +297,7 @@ class project_issue(osv.Model): 'company_id': lambda s, cr, uid, c: s.pool.get('res.company')._company_default_get(cr, uid, 'crm.helpdesk', context=c), 'priority': crm.AVAILABLE_PRIORITIES[2][0], 'kanban_state': 'normal', - 'date_last_stage_update': fields.datetime.now(), + 'date_last_stage_update': fields.datetime.now, 'user_id': lambda obj, cr, uid, context: uid, }