From 4a8168a7dc7d0ae27bbf234a42a46b4bebcd05ad Mon Sep 17 00:00:00 2001 From: "Ravi Gohil (OpenERP)" Date: Tue, 15 Apr 2014 14:44:28 +0530 Subject: [PATCH 01/11] [FIX] account_anglo_saxon: Enabled the multi-currency support for price diff calculation. (Maintenance Case: 606408) bzr revid: rgo@tinyerp.com-20140415091428-az1rx5ngz79j4fh6 --- addons/account_anglo_saxon/invoice.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/addons/account_anglo_saxon/invoice.py b/addons/account_anglo_saxon/invoice.py index f27d9b3ae72..a08346a29ed 100644 --- a/addons/account_anglo_saxon/invoice.py +++ b/addons/account_anglo_saxon/invoice.py @@ -117,9 +117,14 @@ class account_invoice_line(osv.osv): for line in res: if a == line['account_id'] and i_line.product_id.id == line['product_id']: uom = i_line.product_id.uos_id or i_line.product_id.uom_id - standard_price = self.pool.get('product.uom')._compute_price(cr, uid, uom.id, i_line.product_id.standard_price, i_line.uos_id.id) - if standard_price != i_line.price_unit and line['price_unit'] == i_line.price_unit and acc: - price_diff = i_line.price_unit - standard_price + converted_standard_price = self.pool.get('product.uom')._compute_price(cr, uid, uom.id, i_line.product_id.standard_price, i_line.uos_id.id) + if inv.currency_id.id != company_currency: + standard_price = self.pool.get('res.currency').compute(cr, uid, company_currency, inv.currency_id.id, converted_standard_price, context={'date': inv.date_invoice}) + else: + standard_price = converted_standard_price + price_unit = self.pool.get('product.uom')._compute_price(cr, uid, uom.id, i_line.price_unit, i_line.uos_id.id) + if standard_price != price_unit and line['price_unit'] == i_line.price_unit and acc: + price_diff = price_unit - standard_price line.update({'price':standard_price * line['quantity']}) diff_res.append({ 'type':'src', From f658a55e4e66afeba98fdff37d30506ec38a2420 Mon Sep 17 00:00:00 2001 From: Denis Ledoux Date: Tue, 15 Apr 2014 18:03:31 +0200 Subject: [PATCH 02/11] [FIX] stock: before creating chained pickings, regroup moves by chained auto packing Before, all moves issued from a same purchase order were put in the same chained picking, and, therefore, the moves were all treated with the same behavior (manually, automaticaly, ...) bzr revid: dle@openerp.com-20140415160331-kzgib87qabvpc86p --- addons/stock/stock.py | 75 +++++++++++++++++++++++-------------------- 1 file changed, 40 insertions(+), 35 deletions(-) diff --git a/addons/stock/stock.py b/addons/stock/stock.py index eaacbcb06a1..715578541eb 100644 --- a/addons/stock/stock.py +++ b/addons/stock/stock.py @@ -2082,41 +2082,46 @@ class stock_move(osv.osv): if context is None: context = {} seq_obj = self.pool.get('ir.sequence') - for picking, todo in self._chain_compute(cr, uid, moves, context=context).items(): - ptype = todo[0][1][5] and todo[0][1][5] or location_obj.picking_type_get(cr, uid, todo[0][0].location_dest_id, todo[0][1][0]) - if picking: - # name of new picking according to its type - if ptype == 'internal': - new_pick_name = seq_obj.get(cr, uid,'stock.picking') - else : - new_pick_name = seq_obj.get(cr, uid, 'stock.picking.' + ptype) - pickid = self._create_chained_picking(cr, uid, new_pick_name, picking, ptype, todo, context=context) - # Need to check name of old picking because it always considers picking as "OUT" when created from Sales Order - old_ptype = location_obj.picking_type_get(cr, uid, picking.move_lines[0].location_id, picking.move_lines[0].location_dest_id) - if old_ptype != picking.type: - old_pick_name = seq_obj.get(cr, uid, 'stock.picking.' + old_ptype) - self.pool.get('stock.picking').write(cr, uid, [picking.id], {'name': old_pick_name, 'type': old_ptype}, context=context) - else: - pickid = False - for move, (loc, dummy, delay, dummy, company_id, ptype, invoice_state) in todo: - new_id = move_obj.copy(cr, uid, move.id, { - 'location_id': move.location_dest_id.id, - 'location_dest_id': loc.id, - 'date': time.strftime('%Y-%m-%d'), - 'picking_id': pickid, - 'state': 'waiting', - 'company_id': company_id or res_obj._company_default_get(cr, uid, 'stock.company', context=context) , - 'move_history_ids': [], - 'date_expected': (datetime.strptime(move.date, '%Y-%m-%d %H:%M:%S') + relativedelta(days=delay or 0)).strftime('%Y-%m-%d'), - 'move_history_ids2': []} - ) - move_obj.write(cr, uid, [move.id], { - 'move_dest_id': new_id, - 'move_history_ids': [(4, new_id)] - }) - new_moves.append(self.browse(cr, uid, [new_id])[0]) - if pickid: - wf_service.trg_validate(uid, 'stock.picking', pickid, 'button_confirm', cr) + for picking, chained_moves in self._chain_compute(cr, uid, moves, context=context).items(): + # We group the moves by automatic move type, so it creates different pickings for different types + moves_by_type = {} + for move in chained_moves: + moves_by_type.setdefault(move[1][1], []).append(move) + for todo in moves_by_type.values(): + ptype = todo[0][1][5] and todo[0][1][5] or location_obj.picking_type_get(cr, uid, todo[0][0].location_dest_id, todo[0][1][0]) + if picking: + # name of new picking according to its type + if ptype == 'internal': + new_pick_name = seq_obj.get(cr, uid,'stock.picking') + else : + new_pick_name = seq_obj.get(cr, uid, 'stock.picking.' + ptype) + pickid = self._create_chained_picking(cr, uid, new_pick_name, picking, ptype, todo, context=context) + # Need to check name of old picking because it always considers picking as "OUT" when created from Sales Order + old_ptype = location_obj.picking_type_get(cr, uid, picking.move_lines[0].location_id, picking.move_lines[0].location_dest_id) + if old_ptype != picking.type: + old_pick_name = seq_obj.get(cr, uid, 'stock.picking.' + old_ptype) + self.pool.get('stock.picking').write(cr, uid, [picking.id], {'name': old_pick_name, 'type': old_ptype}, context=context) + else: + pickid = False + for move, (loc, dummy, delay, dummy, company_id, ptype, invoice_state) in todo: + new_id = move_obj.copy(cr, uid, move.id, { + 'location_id': move.location_dest_id.id, + 'location_dest_id': loc.id, + 'date': time.strftime('%Y-%m-%d'), + 'picking_id': pickid, + 'state': 'waiting', + 'company_id': company_id or res_obj._company_default_get(cr, uid, 'stock.company', context=context) , + 'move_history_ids': [], + 'date_expected': (datetime.strptime(move.date, '%Y-%m-%d %H:%M:%S') + relativedelta(days=delay or 0)).strftime('%Y-%m-%d'), + 'move_history_ids2': []} + ) + move_obj.write(cr, uid, [move.id], { + 'move_dest_id': new_id, + 'move_history_ids': [(4, new_id)] + }) + new_moves.append(self.browse(cr, uid, [new_id])[0]) + if pickid: + wf_service.trg_validate(uid, 'stock.picking', pickid, 'button_confirm', cr) if new_moves: new_moves += self.create_chained_picking(cr, uid, new_moves, context) return new_moves From 1ab962d33829fd07d0cef84e3dbe4d913333aadb Mon Sep 17 00:00:00 2001 From: Martin Trigaux Date: Tue, 15 Apr 2014 18:14:41 +0200 Subject: [PATCH 03/11] [FIX] mail: convert attachments to binary as it is the expected format of message_post opw 604205 The double convertion (render_message and send_mail) is done to keep the API but should be changed in next version. bzr revid: mat@openerp.com-20140415161441-q6pfueetvv0namgw --- addons/email_template/email_template.py | 3 ++- addons/mail/wizard/mail_compose_message.py | 6 +++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/addons/email_template/email_template.py b/addons/email_template/email_template.py index 8890226f28b..30417acb70a 100644 --- a/addons/email_template/email_template.py +++ b/addons/email_template/email_template.py @@ -305,7 +305,7 @@ class email_template(osv.osv): is taken from template definition) :returns: a dict containing all relevant fields for creating a new mail.mail entry, with one extra key ``attachments``, in the - format expected by :py:meth:`mail_thread.message_post`. + format [(report_name, data)] where data is base64 encoded. """ if context is None: context = {} @@ -340,6 +340,7 @@ class email_template(osv.osv): ctx['lang'] = self.render_template(cr, uid, template.lang, template.model, res_id, context) service = netsvc.LocalService(report_service) (result, format) = service.create(cr, uid, [res_id], {'model': template.model}, ctx) + # TODO in trunk, change return format to binary to match message_post expected format result = base64.b64encode(result) if not report_name: report_name = report_service diff --git a/addons/mail/wizard/mail_compose_message.py b/addons/mail/wizard/mail_compose_message.py index 301dff515b3..7e269ab7379 100644 --- a/addons/mail/wizard/mail_compose_message.py +++ b/addons/mail/wizard/mail_compose_message.py @@ -19,6 +19,7 @@ # ############################################################################## +import base64 import re from openerp import tools from openerp import SUPERUSER_ID @@ -237,12 +238,15 @@ class mail_compose_message(osv.TransientModel): 'parent_id': wizard.parent_id and wizard.parent_id.id, 'partner_ids': [partner.id for partner in wizard.partner_ids], 'attachment_ids': [attach.id for attach in wizard.attachment_ids], + 'attachments': [], } # mass mailing: render and override default values if mass_mail_mode and wizard.model: email_dict = self.render_message(cr, uid, wizard, res_id, context=context) post_values['partner_ids'] += email_dict.pop('partner_ids', []) - post_values['attachments'] = email_dict.pop('attachments', []) + for filename, attachment_data in email_dict.pop('attachments', []): + # decode as render message return in base64 while message_post expect binary + post_values['attachments'].append((filename, base64.b64decode(attachment_data))) attachment_ids = [] for attach_id in post_values.pop('attachment_ids'): new_attach_id = ir_attachment_obj.copy(cr, uid, attach_id, {'res_model': self._name, 'res_id': wizard.id}, context=context) From 31a8dfaf4354b68ad750f5f1051ace73812027ef Mon Sep 17 00:00:00 2001 From: Launchpad Translations on behalf of openerp <> Date: Wed, 16 Apr 2014 07:06:27 +0000 Subject: [PATCH 04/11] Launchpad automatic translations update. bzr revid: launchpad_translations_on_behalf_of_openerp-20140416070627-eneildfcgmfpyjxy --- addons/auth_signup/i18n/zh_CN.po | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/addons/auth_signup/i18n/zh_CN.po b/addons/auth_signup/i18n/zh_CN.po index 31b1cff4192..a4d8533c0c1 100644 --- a/addons/auth_signup/i18n/zh_CN.po +++ b/addons/auth_signup/i18n/zh_CN.po @@ -8,14 +8,14 @@ msgstr "" "Project-Id-Version: openobject-addons\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2013-06-07 19:36+0000\n" -"PO-Revision-Date: 2014-02-17 02:37+0000\n" -"Last-Translator: jackjc \n" +"PO-Revision-Date: 2014-04-16 05:21+0000\n" +"Last-Translator: 盈通 ccdos \n" "Language-Team: Chinese (Simplified) \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2014-02-18 05:40+0000\n" -"X-Generator: Launchpad (build 16916)\n" +"X-Launchpad-Export-Date: 2014-04-16 07:06+0000\n" +"X-Generator: Launchpad (build 16976)\n" #. module: auth_signup #: view:res.users:0 @@ -32,14 +32,14 @@ msgstr "注册令牌(Token)类型" #. module: auth_signup #: field:base.config.settings,auth_signup_uninvited:0 msgid "Allow external users to sign up" -msgstr "允许外部用户登录" +msgstr "允许外部用户注册" #. module: auth_signup #. openerp-web #: code:addons/auth_signup/static/src/xml/auth_signup.xml:19 #, python-format msgid "Confirm Password" -msgstr "口令确认" +msgstr "确认密码" #. module: auth_signup #: help:base.config.settings,auth_signup_uninvited:0 From 3298051016f3e43799d27b7c4eb874a50c58fe66 Mon Sep 17 00:00:00 2001 From: Denis Ledoux Date: Wed, 16 Apr 2014 13:22:39 +0200 Subject: [PATCH 05/11] [FIX] base: search groups by full name not working with operators 'in' nor with operand boolean bzr revid: dle@openerp.com-20140416112239-vl20z3xzgp61vygu --- openerp/addons/base/res/res_users.py | 36 ++++++++++++++++++++------ openerp/addons/base/test/base_test.yml | 14 ++++++++++ 2 files changed, 42 insertions(+), 8 deletions(-) diff --git a/openerp/addons/base/res/res_users.py b/openerp/addons/base/res/res_users.py index 995d6a59cf9..69aa273c07e 100644 --- a/openerp/addons/base/res/res_users.py +++ b/openerp/addons/base/res/res_users.py @@ -28,7 +28,7 @@ import openerp from openerp import SUPERUSER_ID from openerp import pooler, tools import openerp.exceptions -from openerp.osv import fields,osv +from openerp.osv import fields,osv, expression from openerp.osv.orm import browse_record from openerp.tools.translate import _ @@ -51,13 +51,33 @@ class groups(osv.osv): def _search_group(self, cr, uid, obj, name, args, context=None): operand = args[0][2] operator = args[0][1] - values = operand.split('/') - group_name = values[0] - where = [('name', operator, group_name)] - if len(values) > 1: - application_name = values[0] - group_name = values[1] - where = ['|',('category_id.name', operator, application_name)] + where + lst = True + if isinstance(operand, bool): + domains = [[('name', operator, operand)], [('category_id.name', operator, operand)]] + if operator in expression.NEGATIVE_TERM_OPERATORS == (not operand): + return expression.AND(domains) + else: + return expression.OR(domains) + if isinstance(operand, basestring): + lst = False + operand = [operand] + where = [] + for group in operand: + values = filter(bool, group.split('/')) + group_name = values.pop().strip() + category_name = values and '/'.join(values).strip() or group_name + group_domain = [('name', operator, lst and [group_name] or group_name)] + category_domain = [('category_id.name', operator, lst and [category_name] or category_name)] + if operator in expression.NEGATIVE_TERM_OPERATORS and not values: + category_domain = expression.OR([category_domain, [('category_id', '=', False)]]) + if (operator in expression.NEGATIVE_TERM_OPERATORS) == (not values): + sub_where = expression.AND([group_domain, category_domain]) + else: + sub_where = expression.OR([group_domain, category_domain]) + if operator in expression.NEGATIVE_TERM_OPERATORS: + where = expression.AND([where, sub_where]) + else: + where = expression.OR([where, sub_where]) return where _columns = { diff --git a/openerp/addons/base/test/base_test.yml b/openerp/addons/base/test/base_test.yml index 1aea2363f84..11f243592fa 100644 --- a/openerp/addons/base/test/base_test.yml +++ b/openerp/addons/base/test/base_test.yml @@ -302,3 +302,17 @@ float_round(0.01, precision_digits=3, precision_rounding=0.01) except AssertionError: pass +- + Test res.groups name search +- + !python {model: res.groups}: | + all_groups = self.search(cr, uid, []) + full_names = [(group.id, group.full_name) for group in self.browse(cr, uid, all_groups)] + group_ids = self.search(cr, uid, [('full_name', 'like', '%Sale%')]) + assert set(group_ids) == set([id for (id, full_name) in full_names if 'Sale' in full_name]), "did not match search for 'Sale'" + group_ids = self.search(cr, uid, [('full_name', 'like', '%Technical%')]) + assert set(group_ids) == set([id for (id, full_name) in full_names if 'Technical' in full_name]), "did not match search for 'Technical'" + group_ids = self.search(cr, uid, [('full_name', 'like', '%Sales /%')]) + assert set(group_ids) == set([id for (id, full_name) in full_names if 'Sales /' in full_name]), "did not match search for 'Sales /'" + group_ids = self.search(cr, uid, [('full_name', 'in', ['Administration / Access Rights','Contact Creation'])]) + assert group_ids, "did not match search for 'Administration / Access Rights' and 'Contact Creation'" From fdb5200d807fda730e2758d64a4a8d1174ea51ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Wed, 16 Apr 2014 15:03:56 +0200 Subject: [PATCH 06/11] [FIX] crm_todo: usability fix: the lead was not present in the task form view, but in the tree view, it is now present in both view when coming from 'my tasks' in crm menu. lp bug: https://launchpad.net/bugs/1256392 fixed bzr revid: tde@openerp.com-20140416130356-i3a5pqcib8smdx47 --- addons/crm_todo/crm_todo_view.xml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/addons/crm_todo/crm_todo_view.xml b/addons/crm_todo/crm_todo_view.xml index 0b3de338808..0d1fd30fc5f 100644 --- a/addons/crm_todo/crm_todo_view.xml +++ b/addons/crm_todo/crm_todo_view.xml @@ -42,6 +42,17 @@ + + project.task.form.crm + project.task + 20 + + + + + + + My Tasks From d344f53a684dcd1702ee4ff85d201c4c953df395 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Wed, 16 Apr 2014 15:08:04 +0200 Subject: [PATCH 07/11] [FIX] crm_helpdesk: when creating a new helpdesk category it was not possible to re-use the category due to a missing object_id. lp bug: https://launchpad.net/bugs/1216484 fixed bzr revid: tde@openerp.com-20140416130804-xfgi8dr5703mr49o --- addons/crm_helpdesk/crm_helpdesk_view.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/crm_helpdesk/crm_helpdesk_view.xml b/addons/crm_helpdesk/crm_helpdesk_view.xml index d833e7bbcf6..404e84f4629 100644 --- a/addons/crm_helpdesk/crm_helpdesk_view.xml +++ b/addons/crm_helpdesk/crm_helpdesk_view.xml @@ -64,7 +64,7 @@ - + From 7b93809fb4c24c3dc358a0eebde2ec6506f01ab9 Mon Sep 17 00:00:00 2001 From: Launchpad Translations on behalf of openerp <> Date: Thu, 17 Apr 2014 06:53:16 +0000 Subject: [PATCH 08/11] Launchpad automatic translations update. bzr revid: launchpad_translations_on_behalf_of_openerp-20140417065316-5cle12k1npy96t4m --- addons/auth_signup/i18n/zh_CN.po | 4 +-- addons/hr_payroll/i18n/pl.po | 52 ++++++++++++++++---------------- addons/stock/i18n/zh_TW.po | 31 +++++++++++-------- 3 files changed, 47 insertions(+), 40 deletions(-) diff --git a/addons/auth_signup/i18n/zh_CN.po b/addons/auth_signup/i18n/zh_CN.po index a4d8533c0c1..2a618a249c3 100644 --- a/addons/auth_signup/i18n/zh_CN.po +++ b/addons/auth_signup/i18n/zh_CN.po @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2014-04-16 07:06+0000\n" -"X-Generator: Launchpad (build 16976)\n" +"X-Launchpad-Export-Date: 2014-04-17 06:53+0000\n" +"X-Generator: Launchpad (build 16985)\n" #. module: auth_signup #: view:res.users:0 diff --git a/addons/hr_payroll/i18n/pl.po b/addons/hr_payroll/i18n/pl.po index d0257e40ecc..1021e15c207 100644 --- a/addons/hr_payroll/i18n/pl.po +++ b/addons/hr_payroll/i18n/pl.po @@ -8,14 +8,14 @@ msgstr "" "Project-Id-Version: openobject-addons\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2013-06-07 19:36+0000\n" -"PO-Revision-Date: 2014-04-12 14:30+0000\n" -"Last-Translator: Grzegorz Grzelak (OpenGLOBE.pl) \n" +"PO-Revision-Date: 2014-04-16 13:43+0000\n" +"Last-Translator: Dariusz Żbikowski (Krokus) \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: 2014-04-13 06:20+0000\n" -"X-Generator: Launchpad (build 16976)\n" +"X-Launchpad-Export-Date: 2014-04-17 06:53+0000\n" +"X-Generator: Launchpad (build 16985)\n" #. module: hr_payroll #: field:hr.payslip.line,condition_select:0 @@ -429,7 +429,7 @@ msgstr "Szukaj list płac" #: field:hr.payslip.line,amount_percentage_base:0 #: field:hr.salary.rule,amount_percentage_base:0 msgid "Percentage based on" -msgstr "" +msgstr "Procentowo bazując na" #. module: hr_payroll #: code:addons/hr_payroll/hr_payroll.py:90 @@ -450,7 +450,7 @@ msgstr "Wykonano polecenie płatności ? " #. module: hr_payroll #: report:contribution.register.lines:0 msgid "PaySlip Lines by Contribution Register" -msgstr "" +msgstr "Pozycje paska wypłaty wg Rejestru Składek" #. module: hr_payroll #: view:hr.payslip:0 @@ -488,7 +488,7 @@ msgstr "Refundacja: " #. module: hr_payroll #: model:ir.model,name:hr_payroll.model_payslip_lines_contribution_register msgid "PaySlip Lines by Contribution Registers" -msgstr "" +msgstr "Pozycje paska wypłaty wg Rejestrów Składek" #. module: hr_payroll #: view:hr.payslip:0 @@ -539,7 +539,7 @@ msgstr "" #. module: hr_payroll #: field:hr.payslip,details_by_salary_rule_category:0 msgid "Details by Salary Rule Category" -msgstr "" +msgstr "Szczegóły wg kategorii Reguł wynagrodzenia" #. module: hr_payroll #: model:ir.actions.act_window,name:hr_payroll.action_payslip_lines_contribution_register @@ -594,7 +594,7 @@ msgstr "Zakres" #: model:ir.actions.act_window,name:hr_payroll.action_view_hr_payroll_structure_tree #: model:ir.ui.menu,name:hr_payroll.menu_hr_payroll_structure_tree msgid "Salary Structures Hierarchy" -msgstr "" +msgstr "Hierarchia Struktur wynagrodzeń" #. module: hr_payroll #: help:hr.employee,total_wage:0 @@ -616,7 +616,7 @@ msgstr "Korekta" #: view:hr.payslip:0 #: model:ir.actions.act_window,name:hr_payroll.act_payslip_lines msgid "Payslip Computation Details" -msgstr "" +msgstr "Wyliczenia Paska wypłaty szczegółowo" #. module: hr_payroll #: help:hr.payslip.line,appears_on_payslip:0 @@ -627,19 +627,19 @@ msgstr "" #. module: hr_payroll #: model:ir.model,name:hr_payroll.model_hr_payslip_input msgid "Payslip Input" -msgstr "" +msgstr "Wejścia Paska wypłaty" #. module: hr_payroll #: view:hr.salary.rule.category:0 #: model:ir.actions.act_window,name:hr_payroll.action_hr_salary_rule_category #: model:ir.ui.menu,name:hr_payroll.menu_hr_salary_rule_category msgid "Salary Rule Categories" -msgstr "" +msgstr "Kategorie Reguł wynagrodzenia" #. module: hr_payroll #: view:hr.payslip:0 msgid "Cancel Payslip" -msgstr "" +msgstr "Anuluj Pasek wypłaty" #. module: hr_payroll #: help:hr.payslip.input,contract_id:0 @@ -683,7 +683,7 @@ msgstr "Kategoria" #. module: hr_payroll #: view:hr.salary.rule:0 msgid "Company Contribution" -msgstr "" +msgstr "Składki firmowe" #. module: hr_payroll #: help:hr.payslip.run,credit_note:0 @@ -735,7 +735,7 @@ msgstr "Wykonane listy płac" #. module: hr_payroll #: report:paylip.details:0 msgid "Payslip Lines by Contribution Register:" -msgstr "" +msgstr "Pozycje paska wypłaty wg Rejestrów Składek:" #. module: hr_payroll #: view:hr.salary.rule:0 @@ -779,7 +779,7 @@ msgstr "Reguła" #. module: hr_payroll #: model:ir.actions.report.xml,name:hr_payroll.payslip_details_report msgid "PaySlip Details" -msgstr "" +msgstr "Pasek wypłaty szczegółowo" #. module: hr_payroll #: view:hr.payslip:0 @@ -795,7 +795,7 @@ msgstr "Aktywne" #. module: hr_payroll #: view:hr.salary.rule:0 msgid "Child Rules" -msgstr "" +msgstr "Reguły podrzędne" #. module: hr_payroll #: help:hr.payslip.line,condition_range_min:0 @@ -861,7 +861,7 @@ msgstr "Warunek Python" #. module: hr_payroll #: view:hr.contribution.register:0 msgid "Contribution" -msgstr "Dotacja" +msgstr "Składka" #. module: hr_payroll #: code:addons/hr_payroll/hr_payroll.py:351 @@ -873,7 +873,7 @@ msgstr "" #: field:hr.rule.input,input_id:0 #: model:ir.model,name:hr_payroll.model_hr_rule_input msgid "Salary Rule Input" -msgstr "" +msgstr "Wejście Reguły wynagrodzenia" #. module: hr_payroll #: field:hr.payslip.line,quantity:0 @@ -989,13 +989,13 @@ msgstr "Co 2 miesiące" #. module: hr_payroll #: report:paylip.details:0 msgid "Pay Slip Details" -msgstr "" +msgstr "Pasek wypłaty szczegółowo" #. module: hr_payroll #: model:ir.actions.act_window,name:hr_payroll.action_view_hr_payslip_form #: model:ir.ui.menu,name:hr_payroll.menu_department_tree msgid "Employee Payslips" -msgstr "" +msgstr "Paski wypłat" #. module: hr_payroll #: model:ir.model,name:hr_payroll.model_hr_config_settings @@ -1008,7 +1008,7 @@ msgstr "" #: field:hr.salary.rule,register_id:0 #: model:ir.model,name:hr_payroll.model_hr_contribution_register msgid "Contribution Register" -msgstr "" +msgstr "Rejestr składek" #. module: hr_payroll #: view:payslip.lines.contribution.register:0 @@ -1035,7 +1035,7 @@ msgstr "" #: model:ir.actions.act_window,name:hr_payroll.action_hr_payslip_run_tree #: model:ir.ui.menu,name:hr_payroll.menu_hr_payslip_run msgid "Payslips Batches" -msgstr "" +msgstr "Generowanie Listy płac" #. module: hr_payroll #: view:hr.contribution.register:0 @@ -1063,7 +1063,7 @@ msgstr "" #: model:ir.actions.act_window,name:hr_payroll.action_contribution_register_form #: model:ir.ui.menu,name:hr_payroll.menu_action_hr_contribution_register_form msgid "Contribution Registers" -msgstr "" +msgstr "Rejestry składek" #. module: hr_payroll #: model:ir.ui.menu,name:hr_payroll.menu_hr_payroll_reporting @@ -1182,7 +1182,7 @@ msgstr "" #: model:ir.actions.act_window,name:hr_payroll.action_hr_salary_rule_category_tree_view #: model:ir.ui.menu,name:hr_payroll.menu_hr_salary_rule_category_tree_view msgid "Salary Rule Categories Hierarchy" -msgstr "" +msgstr "Hierarchia kategorii Reguł wynagrodzenia" #. module: hr_payroll #: code:addons/hr_payroll/hr_payroll.py:882 @@ -1257,7 +1257,7 @@ msgstr "Księgowość" #: field:hr.payslip.line,condition_range:0 #: field:hr.salary.rule,condition_range:0 msgid "Range Based on" -msgstr "" +msgstr "Zakres bazujący na" #~ msgid "Cancel" #~ msgstr "Anuluj" diff --git a/addons/stock/i18n/zh_TW.po b/addons/stock/i18n/zh_TW.po index 055503a2c02..15c281d95fd 100644 --- a/addons/stock/i18n/zh_TW.po +++ b/addons/stock/i18n/zh_TW.po @@ -8,14 +8,14 @@ msgstr "" "Project-Id-Version: openobject-addons\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2014-02-06 15:56+0000\n" -"PO-Revision-Date: 2014-04-08 06:46+0000\n" +"PO-Revision-Date: 2014-04-17 04:26+0000\n" "Last-Translator: Andy Cheng \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: 2014-04-09 07:06+0000\n" -"X-Generator: Launchpad (build 16976)\n" +"X-Launchpad-Export-Date: 2014-04-17 06:53+0000\n" +"X-Generator: Launchpad (build 16985)\n" #. module: stock #: field:stock.inventory.line.split,line_exist_ids:0 @@ -400,7 +400,7 @@ msgstr "伙伴" #. module: stock #: field:stock.config.settings,module_claim_from_delivery:0 msgid "Allow claim on deliveries" -msgstr "" +msgstr "允許在出貨單上有索賠選項" #. module: stock #: selection:stock.return.picking,invoice_state:0 @@ -920,7 +920,7 @@ msgstr "編號必須在同一公司內唯一!" #: code:addons/stock/product.py:448 #, python-format msgid "Future Receptions" -msgstr "" +msgstr "日後收貨" #. module: stock #: selection:stock.move,priority:0 @@ -1209,7 +1209,7 @@ msgstr "檢視" #. module: stock #: field:stock.location,parent_left:0 msgid "Left Parent" -msgstr "" +msgstr "左父項" #. module: stock #: field:product.category,property_stock_valuation_account_id:0 @@ -2404,7 +2404,7 @@ msgstr "總值" msgid "" "Inventory Journal in which the chained move will be written, if the Chaining " "Type is not Transparent (no journal is used if left empty)" -msgstr "" +msgstr "如果連鎖類型並不是Transparent,連動調撥時會寫入庫存日記帳簿。 (如果保持空白,日記簿則不使用)" #. module: stock #: selection:report.stock.inventory,location_type:0 @@ -3560,7 +3560,7 @@ msgstr "消耗產品" #. module: stock #: field:stock.location,parent_right:0 msgid "Right Parent" -msgstr "" +msgstr "右父項" #. module: stock #: report:lot.stock.overview:0 @@ -4575,7 +4575,7 @@ msgstr "未計劃量" #. module: stock #: field:stock.location,chained_company_id:0 msgid "Chained Company" -msgstr "" +msgstr "連動公司" #. module: stock #: view:stock.picking:0 @@ -4599,7 +4599,7 @@ msgid "" "This allows you to manage products by using serial numbers. When you select " "a serial number on product moves, you can get the upstream or downstream " "traceability of that product." -msgstr "" +msgstr "這裡允許您透過使用序號管理存貨。當您在存貨調動選擇一個序號時,您將看到該產品的上下游回溯情形。" #. module: stock #: code:addons/stock/wizard/stock_fill_inventory.py:128 @@ -4658,6 +4658,13 @@ msgid "" "

\n" " " msgstr "" +"

\n" +" 點擊新增此產品的出貨單。\n" +"

\n" +" 您將在此找到所有此產品相關的送貨記錄,以及所有需出貨給\n" +" 客戶的產品。\n" +"

\n" +" " #. module: stock #: model:ir.actions.act_window,name:stock.action_location_form @@ -4726,13 +4733,13 @@ msgstr "目的地點" #. module: stock #: model:ir.actions.report.xml,name:stock.report_picking_list msgid "Picking Slip" -msgstr "" +msgstr "提貨單" #. module: stock #: help:stock.move,product_packaging:0 msgid "" "It specifies attributes of packaging like type, quantity of packaging,etc." -msgstr "" +msgstr "指定包裝的屬性,例如類型、產品數量等等。" #. module: stock #: view:product.product:0 From f928ba4f10207c39e02cbecfe8af81350445ad2d Mon Sep 17 00:00:00 2001 From: Denis Ledoux Date: Thu, 17 Apr 2014 12:10:00 +0200 Subject: [PATCH 09/11] [FIX] web: double click on save button was trying to save the data two times if there is some latency bzr revid: dle@openerp.com-20140417101000-6gtyxntkm5d7zcoy --- addons/web/static/src/js/view_form.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js index c5cc4989d4a..debda6348fa 100644 --- a/addons/web/static/src/js/view_form.js +++ b/addons/web/static/src/js/view_form.js @@ -719,8 +719,9 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM } } }, - on_button_save: function() { + on_button_save: function(e) { var self = this; + $(e.delegateTarget).attr("disabled", true); return this.save().done(function(result) { self.trigger("save", result); self.reload().then(function() { @@ -730,6 +731,8 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM parent.menu.do_reload_needaction(); } }); + }).always(function(){ + $(e.delegateTarget).attr("disabled", false); }); }, on_button_cancel: function(event) { From 7c668d8eac0f5c8ffddc7c6836e45ab821768d26 Mon Sep 17 00:00:00 2001 From: Denis Ledoux Date: Thu, 17 Apr 2014 12:12:17 +0200 Subject: [PATCH 10/11] [FIX] web: double click on save button was trying to save the data two times if there is some latency, event target should be used instead of delegate target bzr revid: dle@openerp.com-20140417101217-3fwnm76qne6f1vwk --- addons/web/static/src/js/view_form.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js index debda6348fa..d09cfb59ab0 100644 --- a/addons/web/static/src/js/view_form.js +++ b/addons/web/static/src/js/view_form.js @@ -721,7 +721,7 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM }, on_button_save: function(e) { var self = this; - $(e.delegateTarget).attr("disabled", true); + $(e.target).attr("disabled", true); return this.save().done(function(result) { self.trigger("save", result); self.reload().then(function() { @@ -732,7 +732,7 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM } }); }).always(function(){ - $(e.delegateTarget).attr("disabled", false); + $(e.target).attr("disabled", false); }); }, on_button_cancel: function(event) { From a103ff4ebc5d1da1337c76bf637f39a1c3733d39 Mon Sep 17 00:00:00 2001 From: Denis Ledoux Date: Thu, 17 Apr 2014 13:04:35 +0200 Subject: [PATCH 11/11] [FIX] note: folded by default was not considered bzr revid: dle@openerp.com-20140417110435-u8uwwcf5ji1b54ao --- addons/note/note.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/addons/note/note.py b/addons/note/note.py index 00c67c37191..3e419888c28 100644 --- a/addons/note/note.py +++ b/addons/note/note.py @@ -128,16 +128,15 @@ class note_note(osv.osv): current_stage_ids = self.pool.get('note.stage').search(cr,uid,[('user_id','=',uid)], context=context) if current_stage_ids: #if the user have some stages - - #dict of stages: map les ids sur les noms - stage_name = dict(self.pool.get('note.stage').name_get(cr, uid, current_stage_ids, context=context)) + stages = self.pool['note.stage'].browse(cr, uid, current_stage_ids, context=context) result = [{ #notes by stage for stages user '__context': {'group_by': groupby[1:]}, - '__domain': domain + [('stage_ids.id', '=', current_stage_id)], - 'stage_id': (current_stage_id, stage_name[current_stage_id]), - 'stage_id_count': self.search(cr,uid, domain+[('stage_ids', '=', current_stage_id)], context=context, count=True) - } for current_stage_id in current_stage_ids] + '__domain': domain + [('stage_ids.id', '=', stage.id)], + 'stage_id': (stage.id, stage.name), + 'stage_id_count': self.search(cr,uid, domain+[('stage_ids', '=', stage.id)], context=context, count=True), + '__fold': stage.fold, + } for stage in stages] #note without user's stage nb_notes_ws = self.search(cr,uid, domain+[('stage_ids', 'not in', current_stage_ids)], context=context, count=True) @@ -153,8 +152,9 @@ class note_note(osv.osv): result = [{ '__context': {'group_by': groupby[1:]}, '__domain': domain + [dom_not_in], - 'stage_id': (current_stage_ids[0], stage_name[current_stage_ids[0]]), - 'stage_id_count':nb_notes_ws + 'stage_id': (stages[0].id, stages[0].name), + 'stage_id_count':nb_notes_ws, + '__fold': stages[0].name, }] + result else: # if stage_ids is empty