From 1daeaed37646208f5f1f94afe900c6f78edd621d Mon Sep 17 00:00:00 2001 From: Guewen Baconnier Date: Tue, 18 Feb 2014 13:32:11 +0100 Subject: [PATCH 01/44] [FIX] use copy_data rather than doing a write after that the moves are created lp bug: https://launchpad.net/bugs/1281558 fixed bzr revid: guewen.baconnier@camptocamp.com-20140218123211-3l3bvi3at1s91lfi --- addons/stock/stock.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/addons/stock/stock.py b/addons/stock/stock.py index 02fd28611e6..53f43f73083 100644 --- a/addons/stock/stock.py +++ b/addons/stock/stock.py @@ -727,10 +727,6 @@ class stock_picking(osv.osv): if 'invoice_state' not in default and picking_obj.invoice_state == 'invoiced': default['invoice_state'] = '2binvoiced' res = super(stock_picking, self).copy(cr, uid, id, default, context) - if res: - picking_obj = self.browse(cr, uid, res, context=context) - for move in picking_obj.move_lines: - move_obj.write(cr, uid, [move.id], {'tracking_id': False, 'prodlot_id': False, 'move_history_ids2': [(6, 0, [])], 'move_history_ids': [(6, 0, [])]}) return res def fields_view_get(self, cr, uid, view_id=None, view_type=False, context=None, toolbar=False, submenu=False): @@ -1806,12 +1802,17 @@ class stock_move(osv.osv): _('Quantities, Units of Measure, Products and Locations cannot be modified on stock moves that have already been processed (except by the Administrator).')) return super(stock_move, self).write(cr, uid, ids, vals, context=context) - def copy(self, cr, uid, id, default=None, context=None): + def copy_data(self, cr, uid, id, default=None, context=None): if default is None: default = {} default = default.copy() - default.update({'move_history_ids2': [], 'move_history_ids': []}) - return super(stock_move, self).copy(cr, uid, id, default, context=context) + default.update({ + 'tracking_id': False, + 'prodlot_id': False, + 'move_history_ids2': [], + 'move_history_ids': [] + }) + return super(stock_move, self).copy_data(cr, uid, id, default, context=context) def _auto_init(self, cursor, context=None): res = super(stock_move, self)._auto_init(cursor, context=context) From 0ff86218f617f210495832b5145c40009f8fc3f0 Mon Sep 17 00:00:00 2001 From: Guewen Baconnier Date: Mon, 24 Feb 2014 10:03:54 +0100 Subject: [PATCH 02/44] Use setdefault to allow a copy with one of this field with a value bzr revid: guewen.baconnier@camptocamp.com-20140224090354-wcsnd4wzs91w553e --- addons/stock/stock.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/addons/stock/stock.py b/addons/stock/stock.py index 53f43f73083..1e6291b739c 100644 --- a/addons/stock/stock.py +++ b/addons/stock/stock.py @@ -1806,12 +1806,10 @@ class stock_move(osv.osv): if default is None: default = {} default = default.copy() - default.update({ - 'tracking_id': False, - 'prodlot_id': False, - 'move_history_ids2': [], - 'move_history_ids': [] - }) + default.setdefault('tracking_id', False) + default.setdefault('prodlot_id', False) + default.setdefault('move_history_ids', []) + default.setdefault('move_history_ids2', []) return super(stock_move, self).copy_data(cr, uid, id, default, context=context) def _auto_init(self, cursor, context=None): From 26f807fa025ca99a9d0cf4e0212d395bb726d570 Mon Sep 17 00:00:00 2001 From: Amit Dodiya Date: Tue, 25 Mar 2014 11:17:43 +0530 Subject: [PATCH 03/44] [FIX] account_voucher: forward port of 6.0 revision: 5094, for issue cancel_voucher method is unlinking the whole account_move_reconciliation record bzr revid: ado@tinyerp.com-20140325054743-opywyna9w1toyjp8 --- addons/account_voucher/account_voucher.py | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/addons/account_voucher/account_voucher.py b/addons/account_voucher/account_voucher.py index f58c640b11c..86755ce17b6 100644 --- a/addons/account_voucher/account_voucher.py +++ b/addons/account_voucher/account_voucher.py @@ -947,19 +947,15 @@ class account_voucher(osv.osv): def cancel_voucher(self, cr, uid, ids, context=None): reconcile_pool = self.pool.get('account.move.reconcile') move_pool = self.pool.get('account.move') - + move_line_pool = self.pool.get('account.move.line') for voucher in self.browse(cr, uid, ids, context=context): - # refresh to make sure you don't unlink an already removed move - voucher.refresh() - recs = [] for line in voucher.move_ids: if line.reconcile_id: - recs += [line.reconcile_id.id] - if line.reconcile_partial_id: - recs += [line.reconcile_partial_id.id] - - reconcile_pool.unlink(cr, uid, recs) - + move_lines = [move_line.id for move_line in line.reconcile_id.line_id] + move_lines.remove(line.id) + reconcile_pool.unlink(cr, uid, [line.reconcile_id.id]) + if len(move_lines) >= 2: + move_line_pool.reconcile_partial(cr, uid, move_lines, 'auto',context=context) if voucher.move_id: move_pool.button_cancel(cr, uid, [voucher.move_id.id]) move_pool.unlink(cr, uid, [voucher.move_id.id]) From 4a8168a7dc7d0ae27bbf234a42a46b4bebcd05ad Mon Sep 17 00:00:00 2001 From: "Ravi Gohil (OpenERP)" Date: Tue, 15 Apr 2014 14:44:28 +0530 Subject: [PATCH 04/44] [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 05/44] [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 06/44] [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 07/44] 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 40d3ae1e0f6efd644f05f151635a428a28c44caf Mon Sep 17 00:00:00 2001 From: Kersten Jeremy Date: Wed, 16 Apr 2014 10:29:24 +0200 Subject: [PATCH 08/44] [FIX] Record id are not always an integer. It could be a virtual id (str) as in calendar. bzr revid: jke@openerp.com-20140416082924-t52pvja4617zpkce --- addons/web/controllers/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/web/controllers/main.py b/addons/web/controllers/main.py index 3015bb9c2e5..5030a977f18 100644 --- a/addons/web/controllers/main.py +++ b/addons/web/controllers/main.py @@ -1216,7 +1216,7 @@ class DataSet(http.Controller): records = getattr(request.session.model(model), method)(*args, **kwargs) for record in records: record['display_name'] = \ - names.get(record['id']) or "%s#%d" % (model, (record['id'])) + names.get(record['id']) or "{0}#{1}".format(model, (record['id'])) return records if method.startswith('_'): From c4164204b5496d0ed77f7049b09dc4596d84d5b8 Mon Sep 17 00:00:00 2001 From: Kersten Jeremy Date: Wed, 16 Apr 2014 10:34:11 +0200 Subject: [PATCH 09/44] [FIX] Website - fix path of script watch.js bzr revid: jke@openerp.com-20140416083411-a06k9sbiyda7zmrd --- addons/website/views/website_templates.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/website/views/website_templates.xml b/addons/website/views/website_templates.xml index e7f76e7e4aa..1640c9f51e2 100644 --- a/addons/website/views/website_templates.xml +++ b/addons/website/views/website_templates.xml @@ -43,7 +43,7 @@ t-att-data-view-xmlid="xmlid if editable else None" t-att-data-main-object="repr(main_object) if editable else None"> - + From 91930b470d000b863511b841b40d42c9ce1b0c98 Mon Sep 17 00:00:00 2001 From: Mohammed Shekha Date: Wed, 16 Apr 2014 14:08:57 +0530 Subject: [PATCH 10/44] [FIX]Fixed the issue of reference field throws traceback that view is undefined, the reason is that reference field passing DefaultFieldManager while creating instance of many2one widget and DefaultFieldManager is eventually extending instance.web.widget not instance.web.form.FormWidget and hence DefaultFieldmanager will nto having view attribute, instead of calling self.view.do_onchange, trigger changed_value which is going to do the same job. bzr revid: msh@tinyerp.com-20140416083857-sug0k4a28nkvgg27 --- addons/web/static/src/js/view_form.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js index edb44e7ea06..11e2c4e6b7c 100644 --- a/addons/web/static/src/js/view_form.js +++ b/addons/web/static/src/js/view_form.js @@ -3148,7 +3148,7 @@ instance.web.form.FieldMany2One = instance.web.form.AbstractField.extend(instanc self.display_value = {}; self.render_value(); self.focus(); - self.view.do_onchange(self); + self.trigger('changed_value'); }); }); From 3298051016f3e43799d27b7c4eb874a50c58fe66 Mon Sep 17 00:00:00 2001 From: Denis Ledoux Date: Wed, 16 Apr 2014 13:22:39 +0200 Subject: [PATCH 11/44] [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 12/44] [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 13/44] [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 f6a75093b9b072f362967874fb6fb3001f4bc653 Mon Sep 17 00:00:00 2001 From: Martin Trigaux Date: Wed, 16 Apr 2014 15:09:24 +0200 Subject: [PATCH 14/44] [FIX] gamification: add security rule for multicompany (avoid getting error messages on home page when displaying top 3 goals) bzr revid: mat@openerp.com-20140416130924-8pyuejefcu7hnzmf --- addons/gamification/security/gamification_security.xml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/addons/gamification/security/gamification_security.xml b/addons/gamification/security/gamification_security.xml index 904ba50721e..5339b400061 100644 --- a/addons/gamification/security/gamification_security.xml +++ b/addons/gamification/security/gamification_security.xml @@ -39,5 +39,12 @@ [(1, '=', 1)] + + User can only see his/her goals or goal from the same challenge in board visibility + + [('user_id.company_id', 'child_of', [user.company_id.id])] + + + 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 15/44] 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 16/44] [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 17/44] [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 18/44] [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 From 7b413e4aff5f4ca97c6507370fc98811164f9d19 Mon Sep 17 00:00:00 2001 From: Kersten Jeremy Date: Thu, 17 Apr 2014 13:56:21 +0200 Subject: [PATCH 19/44] [FIX] Mail snippet - Set generic URL bzr revid: jke@openerp.com-20140417115621-c0j2nj4srlshougy --- addons/website_mail/views/snippets.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/addons/website_mail/views/snippets.xml b/addons/website_mail/views/snippets.xml index 0ec93296ddd..110646ce92c 100644 --- a/addons/website_mail/views/snippets.xml +++ b/addons/website_mail/views/snippets.xml @@ -390,7 +390,7 @@ - + View Product @@ -407,7 +407,7 @@ - + View Product @@ -424,7 +424,7 @@ - + View Product From 5e7b8518d50330927257a4794ed31db4c18e699d Mon Sep 17 00:00:00 2001 From: Martin Trigaux Date: Thu, 17 Apr 2014 14:54:12 +0200 Subject: [PATCH 20/44] [FIX] gamification: this noupdate block should be in noupdate (no kidding) bzr revid: mat@openerp.com-20140417125412-4w5wp0ubsendx7nr --- addons/gamification/data/goal_base.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/gamification/data/goal_base.xml b/addons/gamification/data/goal_base.xml index 66dd7be7431..c8c18564772 100644 --- a/addons/gamification/data/goal_base.xml +++ b/addons/gamification/data/goal_base.xml @@ -2,7 +2,7 @@ - + From 64ce8f977dafa124f71fdc928046b4ca1e173991 Mon Sep 17 00:00:00 2001 From: Denis Ledoux Date: Thu, 17 Apr 2014 15:26:16 +0200 Subject: [PATCH 21/44] [FIX] account_analytics_plan: for bank statement move, the analytic distribution must not be written on the counterpart move line bzr revid: dle@openerp.com-20140417132616-w71ctwn0w653yn0v --- .../account_analytic_plans.py | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/addons/account_analytic_plans/account_analytic_plans.py b/addons/account_analytic_plans/account_analytic_plans.py index 40484298f1b..2948ac1c19c 100644 --- a/addons/account_analytic_plans/account_analytic_plans.py +++ b/addons/account_analytic_plans/account_analytic_plans.py @@ -466,15 +466,10 @@ class account_bank_statement(osv.osv): _inherit = "account.bank.statement" _name = "account.bank.statement" - def create_move_from_st_line(self, cr, uid, st_line_id, company_currency_id, st_line_number, context=None): - account_move_line_pool = self.pool.get('account.move.line') - account_bank_statement_line_pool = self.pool.get('account.bank.statement.line') - st_line = account_bank_statement_line_pool.browse(cr, uid, st_line_id, context=context) - result = super(account_bank_statement,self).create_move_from_st_line(cr, uid, st_line_id, company_currency_id, st_line_number, context=context) - move = st_line.move_ids and st_line.move_ids[0] or False - if move: - for line in move.line_id: - account_move_line_pool.write(cr, uid, [line.id], {'analytics_id':st_line.analytics_id.id}, context=context) + def _prepare_bank_move_line(self, cr, uid, st_line, move_id, amount, company_currency_id, context=None): + result = super(account_bank_statement,self)._prepare_bank_move_line(cr, uid, st_line, + move_id, amount, company_currency_id, context=context) + result['analytics_id'] = st_line.analytics_id.id return result def button_confirm_bank(self, cr, uid, ids, context=None): From e2b8593f9157e141e991933eb470999f049e214a Mon Sep 17 00:00:00 2001 From: Denis Ledoux Date: Thu, 17 Apr 2014 18:09:19 +0200 Subject: [PATCH 22/44] [REVERT] web: 4174 revid:dle@openerp.com-20140415130732-bud8xb3pzgxw2imr, break the kanban drag and drop, which is far more important than the show more button wrongly displayed in ie. bzr revid: dle@openerp.com-20140417160919-ftwk0jtci9dwuu7h --- addons/web_kanban/static/src/css/kanban.css | 5 ++++- addons/web_kanban/static/src/css/kanban.sass | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/addons/web_kanban/static/src/css/kanban.css b/addons/web_kanban/static/src/css/kanban.css index 1a0c3f1d9eb..2c2a19724cf 100644 --- a/addons/web_kanban/static/src/css/kanban.css +++ b/addons/web_kanban/static/src/css/kanban.css @@ -140,7 +140,10 @@ padding: 0px; background: white; } -.openerp .oe_kanban_view .oe_kanban_column { +.openerp .oe_kanban_view .oe_kanban_column, .openerp .oe_kanban_view .oe_kanban_column_cards { + height: 100%; +} +.openerp .oe_kanban_view .oe_kanban_column, .openerp .oe_kanban_view .oe_kanban_column_cards { height: 100%; } .openerp .oe_kanban_view .oe_kanban_aggregates { diff --git a/addons/web_kanban/static/src/css/kanban.sass b/addons/web_kanban/static/src/css/kanban.sass index 48457789dd2..cac86ac327b 100644 --- a/addons/web_kanban/static/src/css/kanban.sass +++ b/addons/web_kanban/static/src/css/kanban.sass @@ -161,7 +161,7 @@ padding: 0px background: #ffffff - .oe_kanban_column + .oe_kanban_column, .oe_kanban_column_cards height: 100% .oe_kanban_aggregates padding: 0 From 8364a0faaba81bdf0ef9e96414b06a2c15dcd6f6 Mon Sep 17 00:00:00 2001 From: Launchpad Translations on behalf of openerp <> Date: Fri, 18 Apr 2014 07:21:54 +0000 Subject: [PATCH 23/44] Launchpad automatic translations update. bzr revid: launchpad_translations_on_behalf_of_openerp-20140418072154-969nr7hzpppvd0mw --- addons/hr/i18n/ja.po | 16 ++++++++-------- addons/stock/i18n/zh_TW.po | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/addons/hr/i18n/ja.po b/addons/hr/i18n/ja.po index ad14389644b..5781c49dd86 100644 --- a/addons/hr/i18n/ja.po +++ b/addons/hr/i18n/ja.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-21 03:38+0000\n" +"PO-Revision-Date: 2014-04-18 02:39+0000\n" "Last-Translator: Yoshi Tashiro \n" "Language-Team: Japanese \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-22 07:32+0000\n" -"X-Generator: Launchpad (build 16926)\n" +"X-Launchpad-Export-Date: 2014-04-18 07:21+0000\n" +"X-Generator: Launchpad (build 16985)\n" #. module: hr #: model:process.node,name:hr.process_node_openerpuser0 @@ -25,7 +25,7 @@ msgstr "OpenERPユーザ" #. module: hr #: field:hr.config.settings,module_hr_timesheet_sheet:0 msgid "Allow timesheets validation by managers" -msgstr "" +msgstr "マネジャーによるタイムシート検証" #. module: hr #: field:hr.job,requirements:0 @@ -111,7 +111,7 @@ msgstr "" #. module: hr #: help:hr.config.settings,module_hr_holidays:0 msgid "This installs the module hr_holidays." -msgstr "" +msgstr "hr_holidays モジュールをインストールします。" #. module: hr #: view:hr.job:0 @@ -126,7 +126,7 @@ msgstr "採用中" #. module: hr #: field:hr.job,message_unread:0 msgid "Unread Messages" -msgstr "" +msgstr "未読メッセージ" #. module: hr #: field:hr.department,company_id:0 @@ -144,7 +144,7 @@ msgstr "採用予定" #. module: hr #: view:hr.employee:0 msgid "Other Information ..." -msgstr "" +msgstr "その他情報..." #. module: hr #: constraint:hr.employee.category:0 @@ -154,7 +154,7 @@ msgstr "" #. module: hr #: help:hr.config.settings,module_hr_recruitment:0 msgid "This installs the module hr_recruitment." -msgstr "" +msgstr "hr_recruitment モジュールをインストールします。" #. module: hr #: view:hr.employee:0 diff --git a/addons/stock/i18n/zh_TW.po b/addons/stock/i18n/zh_TW.po index 15c281d95fd..18785a58b5e 100644 --- a/addons/stock/i18n/zh_TW.po +++ b/addons/stock/i18n/zh_TW.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: 2014-04-17 06:53+0000\n" +"X-Launchpad-Export-Date: 2014-04-18 07:21+0000\n" "X-Generator: Launchpad (build 16985)\n" #. module: stock From e0451e28cd780ad32e2e5ef6abb48dbda0d18c92 Mon Sep 17 00:00:00 2001 From: Denis Ledoux Date: Fri, 18 Apr 2014 10:38:18 +0200 Subject: [PATCH 24/44] [FIX] website_hr_recruitment: missing public group in security rule for website_published bzr revid: dle@openerp.com-20140418083818-p11a17k4az2wsa2e --- .../security/website_hr_recruitment_security.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/addons/website_hr_recruitment/security/website_hr_recruitment_security.xml b/addons/website_hr_recruitment/security/website_hr_recruitment_security.xml index 724c4dfddce..792995ca606 100644 --- a/addons/website_hr_recruitment/security/website_hr_recruitment_security.xml +++ b/addons/website_hr_recruitment/security/website_hr_recruitment_security.xml @@ -5,6 +5,7 @@ Job Positions: Public [('website_published', '=', True)] + @@ -14,6 +15,7 @@ Job department: Public [('jobs_ids.website_published', '=', True)] + From 067f21ce5aa9d215f6b174797ec8f79673f7033a Mon Sep 17 00:00:00 2001 From: Martin Trigaux Date: Fri, 18 Apr 2014 14:08:46 +0200 Subject: [PATCH 25/44] [FIX] gamification: set data in noupdate blocks to allow the user to customise it without loosing changes after update bzr revid: mat@openerp.com-20140418120846-h8yo4ljult88f1h3 --- addons/gamification/data/badge.xml | 4 ---- addons/gamification/data/cron.xml | 2 +- addons/gamification/data/goal_base.xml | 4 ---- addons/gamification/models/challenge.py | 2 +- addons/gamification_sale_crm/sale_crm_goals.xml | 2 +- 5 files changed, 3 insertions(+), 11 deletions(-) diff --git a/addons/gamification/data/badge.xml b/addons/gamification/data/badge.xml index 5a390be9deb..4035c51cfc8 100644 --- a/addons/gamification/data/badge.xml +++ b/addons/gamification/data/badge.xml @@ -32,10 +32,6 @@ 2 - - - - Received Badge diff --git a/addons/gamification/data/cron.xml b/addons/gamification/data/cron.xml index 8585771c97d..105f7d25681 100644 --- a/addons/gamification/data/cron.xml +++ b/addons/gamification/data/cron.xml @@ -1,6 +1,6 @@ - + Run Goal Challenge Checker diff --git a/addons/gamification/data/goal_base.xml b/addons/gamification/data/goal_base.xml index c8c18564772..1c18a5a70e5 100644 --- a/addons/gamification/data/goal_base.xml +++ b/addons/gamification/data/goal_base.xml @@ -92,10 +92,6 @@ ]]> - - - - Set your Timezone diff --git a/addons/gamification/models/challenge.py b/addons/gamification/models/challenge.py index 06d0c44baac..8ac7753898f 100644 --- a/addons/gamification/models/challenge.py +++ b/addons/gamification/models/challenge.py @@ -377,6 +377,7 @@ class gamification_challenge(osv.Model): can be called after each change in the list of users or lines. :param list(int) ids: the list of challenge concerned""" + goal_obj = self.pool.get('gamification.goal') for challenge in self.browse(cr, uid, ids, context): (start_date, end_date) = start_end_date_for_period(challenge.period) @@ -390,7 +391,6 @@ class gamification_challenge(osv.Model): # FIXME: allow to restrict to a subset of users for user in challenge.user_ids: - goal_obj = self.pool.get('gamification.goal') domain = [('line_id', '=', line.id), ('user_id', '=', user.id)] if start_date: domain.append(('start_date', '=', start_date)) diff --git a/addons/gamification_sale_crm/sale_crm_goals.xml b/addons/gamification_sale_crm/sale_crm_goals.xml index 4c1f8e46149..6db77be1aaf 100644 --- a/addons/gamification_sale_crm/sale_crm_goals.xml +++ b/addons/gamification_sale_crm/sale_crm_goals.xml @@ -1,6 +1,6 @@ - + From 6e04c0c5eb3c609cabdc33216b45aa3640ee291b Mon Sep 17 00:00:00 2001 From: Denis Ledoux Date: Fri, 18 Apr 2014 15:29:17 +0200 Subject: [PATCH 26/44] [FIX] account_analytic_analysis: prevent enable recurring invoices if not of type contract. Avoid cron to not continue if one of the contract failed to create its recurring invoices bzr revid: dle@openerp.com-20140418132917-ztvzinwn3kt786m2 --- .../account_analytic_analysis.py | 44 +++++++++++++------ .../account_analytic_analysis_cron.xml | 2 +- .../account_analytic_analysis_view.xml | 6 ++- 3 files changed, 36 insertions(+), 16 deletions(-) diff --git a/addons/account_analytic_analysis/account_analytic_analysis.py b/addons/account_analytic_analysis/account_analytic_analysis.py index b73dad2d385..f8905d6e546 100644 --- a/addons/account_analytic_analysis/account_analytic_analysis.py +++ b/addons/account_analytic_analysis/account_analytic_analysis.py @@ -22,6 +22,7 @@ from dateutil.relativedelta import relativedelta import datetime import logging import time +import traceback from openerp.osv import osv, fields from openerp.osv.orm import intersect, except_orm @@ -714,23 +715,40 @@ class account_analytic_account(osv.osv): inv_obj.button_compute(cr, uid, [invoice_id], context=context) return invoice_id - def recurring_create_invoice(self, cr, uid, automatic=False, context=None): + def recurring_create_invoice(self, cr, uid, ids, context=None): + return self._recurring_create_invoice(cr, uid, ids, context=context) + + def _cron_recurring_create_invoice(self, cr, uid, context=None): + return self._recurring_create_invoice(cr, uid, [], automatic=True, context=context) + + def _recurring_create_invoice(self, cr, uid, ids, automatic=False, context=None): context = context or {} current_date = time.strftime('%Y-%m-%d') - - contract_ids = self.search(cr, uid, [('recurring_next_date','<=', current_date), ('state','=', 'open'), ('recurring_invoices','=', True)]) + if ids: + contract_ids = ids + else: + contract_ids = self.search(cr, uid, [('recurring_next_date','<=', current_date), ('state','=', 'open'), ('recurring_invoices','=', True)]) for contract in self.browse(cr, uid, contract_ids, context=context): - invoice_id = self._prepare_invoice(cr, uid, contract, context=context) + try: + invoice_id = self._prepare_invoice(cr, uid, contract, context=context) - next_date = datetime.datetime.strptime(contract.recurring_next_date or current_date, "%Y-%m-%d") - interval = contract.recurring_interval - if contract.recurring_rule_type == 'daily': - new_date = next_date+relativedelta(days=+interval) - elif contract.recurring_rule_type == 'weekly': - new_date = next_date+relativedelta(weeks=+interval) - else: - new_date = next_date+relativedelta(months=+interval) - self.write(cr, uid, [contract.id], {'recurring_next_date': new_date.strftime('%Y-%m-%d')}, context=context) + next_date = datetime.datetime.strptime(contract.recurring_next_date or current_date, "%Y-%m-%d") + interval = contract.recurring_interval + if contract.recurring_rule_type == 'daily': + new_date = next_date+relativedelta(days=+interval) + elif contract.recurring_rule_type == 'weekly': + new_date = next_date+relativedelta(weeks=+interval) + else: + new_date = next_date+relativedelta(months=+interval) + self.write(cr, uid, [contract.id], {'recurring_next_date': new_date.strftime('%Y-%m-%d')}, context=context) + if automatic: + cr.commit() + except Exception: + if automatic: + cr.rollback() + _logger.error(traceback.format_exc()) + else: + raise return True class account_analytic_account_summary_user(osv.osv): diff --git a/addons/account_analytic_analysis/account_analytic_analysis_cron.xml b/addons/account_analytic_analysis/account_analytic_analysis_cron.xml index 492278a87b5..0637c2ad276 100644 --- a/addons/account_analytic_analysis/account_analytic_analysis_cron.xml +++ b/addons/account_analytic_analysis/account_analytic_analysis_cron.xml @@ -93,7 +93,7 @@ OpenERP Automatic Email days -1 - + diff --git a/addons/account_analytic_analysis/account_analytic_analysis_view.xml b/addons/account_analytic_analysis/account_analytic_analysis_view.xml index f5b89db7089..a6fe828926a 100644 --- a/addons/account_analytic_analysis/account_analytic_analysis_view.xml +++ b/addons/account_analytic_analysis/account_analytic_analysis_view.xml @@ -148,8 +148,10 @@
- -
From d0cf3056180bbd1e20d8f6266a1268476021e9c4 Mon Sep 17 00:00:00 2001 From: Denis Ledoux Date: Fri, 18 Apr 2014 15:47:40 +0200 Subject: [PATCH 27/44] [FIX] account_analytic_analysis: avoid create recurring invoices for contract templates bzr revid: dle@openerp.com-20140418134740-dv39ffwcdqh4np0g --- addons/account_analytic_analysis/account_analytic_analysis.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/account_analytic_analysis/account_analytic_analysis.py b/addons/account_analytic_analysis/account_analytic_analysis.py index f8905d6e546..f3e7d6d53a3 100644 --- a/addons/account_analytic_analysis/account_analytic_analysis.py +++ b/addons/account_analytic_analysis/account_analytic_analysis.py @@ -727,7 +727,7 @@ class account_analytic_account(osv.osv): if ids: contract_ids = ids else: - contract_ids = self.search(cr, uid, [('recurring_next_date','<=', current_date), ('state','=', 'open'), ('recurring_invoices','=', True)]) + contract_ids = self.search(cr, uid, [('recurring_next_date','<=', current_date), ('state','=', 'open'), ('recurring_invoices','=', True), ('type', '=', 'contract')]) for contract in self.browse(cr, uid, contract_ids, context=context): try: invoice_id = self._prepare_invoice(cr, uid, contract, context=context) From a97dd9adaf04377298fcd090d58fb144c9bfbe5c Mon Sep 17 00:00:00 2001 From: Martin Trigaux Date: Fri, 18 Apr 2014 16:05:08 +0200 Subject: [PATCH 28/44] [FIX] mail: correct missing comma in domain on mail.mail bzr revid: mat@openerp.com-20140418140508-y0fnxsbgda0gp6t4 --- addons/mail/mail_mail_view.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/mail/mail_mail_view.xml b/addons/mail/mail_mail_view.xml index e0d1f3e96b2..361959a9927 100644 --- a/addons/mail/mail_mail_view.xml +++ b/addons/mail/mail_mail_view.xml @@ -86,7 +86,7 @@ mail.mail - + From 4c68f32fadf3de8ebe5765bc402df17c51e000fb Mon Sep 17 00:00:00 2001 From: Denis Ledoux Date: Fri, 18 Apr 2014 16:15:27 +0200 Subject: [PATCH 29/44] [FIX] account_analytic_analysis: test recurring_create_invoice, ids is mandatory bzr revid: dle@openerp.com-20140418141527-jxc4l7amuj7weu0a --- .../test/account_analytic_analysis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/account_analytic_analysis/test/account_analytic_analysis.yml b/addons/account_analytic_analysis/test/account_analytic_analysis.yml index 49668a2b781..95194c97c86 100644 --- a/addons/account_analytic_analysis/test/account_analytic_analysis.yml +++ b/addons/account_analytic_analysis/test/account_analytic_analysis.yml @@ -32,7 +32,7 @@ I generate all invoices from contracts having recurring invoicing - !python {model: account.analytic.account}: | - self.recurring_create_invoice(cr, uid) + self.recurring_create_invoice(cr, uid, []) - I test the generated invoice - From 0253e8ab616015eae4c0f43b673fc547809ced55 Mon Sep 17 00:00:00 2001 From: Denis Ledoux Date: Fri, 18 Apr 2014 16:17:55 +0200 Subject: [PATCH 30/44] [FIX] base_geolocalize: no reason to have groups no one for geolocation tab, any salesman should be able to set the latitude longitude bzr revid: dle@openerp.com-20140418141755-x4wnhqh39v23tky2 --- addons/base_geolocalize/views/res_partner_view.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/base_geolocalize/views/res_partner_view.xml b/addons/base_geolocalize/views/res_partner_view.xml index 24cc8d2d21d..1bd537ae3ff 100644 --- a/addons/base_geolocalize/views/res_partner_view.xml +++ b/addons/base_geolocalize/views/res_partner_view.xml @@ -8,7 +8,7 @@ - + From df85f3baf6996af78a886a8e9a0399f51531238a Mon Sep 17 00:00:00 2001 From: Denis Ledoux Date: Tue, 22 Apr 2014 15:05:06 +0200 Subject: [PATCH 41/44] [FIX] note: typo in manifest bzr revid: dle@openerp.com-20140422130506-934g9o433kdhmwnp --- addons/note/__openerp__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/note/__openerp__.py b/addons/note/__openerp__.py index 2653c558923..e94a5f60181 100644 --- a/addons/note/__openerp__.py +++ b/addons/note/__openerp__.py @@ -27,8 +27,8 @@ This module allows users to create their own notes inside OpenERP ================================================================= -Use notes to write meeting minutes, organize ideas, organize personnal todo -lists, etc. Each user manages his own personnal Notes. Notes are available to +Use notes to write meeting minutes, organize ideas, organize personal todo +lists, etc. Each user manages his own personal Notes. Notes are available to their authors only, but they can share notes to others users so that several people can work on the same note in real time. It's very efficient to share meeting minutes. From b981f3f8efa54db76451645562057fff26baab69 Mon Sep 17 00:00:00 2001 From: Denis Ledoux Date: Tue, 22 Apr 2014 17:07:10 +0200 Subject: [PATCH 42/44] [FIX] *: in search views, use operator=child_of instead of filter_domain with a child_of domain operator child_of has the advantage to do exact ID matching for many2one, and not just matching on the name bzr revid: dle@openerp.com-20140422150710-mr9x3vyq0wcg31l5 --- addons/account/account_invoice_view.xml | 2 +- addons/account/project/project_view.xml | 2 +- addons/crm/crm_lead_view.xml | 4 ++-- addons/crm/crm_phonecall_view.xml | 2 +- addons/project_issue/project_issue_view.xml | 2 +- addons/purchase/purchase_view.xml | 4 ++-- addons/sale/sale_view.xml | 6 +++--- 7 files changed, 11 insertions(+), 11 deletions(-) diff --git a/addons/account/account_invoice_view.xml b/addons/account/account_invoice_view.xml index 94b98b78907..947aad481d1 100644 --- a/addons/account/account_invoice_view.xml +++ b/addons/account/account_invoice_view.xml @@ -457,7 +457,7 @@ - + diff --git a/addons/account/project/project_view.xml b/addons/account/project/project_view.xml index 00547261ca2..600056c05f1 100644 --- a/addons/account/project/project_view.xml +++ b/addons/account/project/project_view.xml @@ -31,7 +31,7 @@ - + diff --git a/addons/crm/crm_lead_view.xml b/addons/crm/crm_lead_view.xml index 7c087ebd5a8..e0311d1db40 100644 --- a/addons/crm/crm_lead_view.xml +++ b/addons/crm/crm_lead_view.xml @@ -328,7 +328,7 @@ - + @@ -546,7 +546,7 @@ - + diff --git a/addons/crm/crm_phonecall_view.xml b/addons/crm/crm_phonecall_view.xml index 2d456cc053a..21e18d8affc 100644 --- a/addons/crm/crm_phonecall_view.xml +++ b/addons/crm/crm_phonecall_view.xml @@ -186,7 +186,7 @@ - + diff --git a/addons/project_issue/project_issue_view.xml b/addons/project_issue/project_issue_view.xml index 74c83afd304..494f054f8e8 100644 --- a/addons/project_issue/project_issue_view.xml +++ b/addons/project_issue/project_issue_view.xml @@ -150,7 +150,7 @@ - + diff --git a/addons/purchase/purchase_view.xml b/addons/purchase/purchase_view.xml index 3504d49a884..3c8afceb6e7 100644 --- a/addons/purchase/purchase_view.xml +++ b/addons/purchase/purchase_view.xml @@ -270,7 +270,7 @@ - + @@ -297,7 +297,7 @@ - + diff --git a/addons/sale/sale_view.xml b/addons/sale/sale_view.xml index f12cba6ac9f..16e9e2a6305 100644 --- a/addons/sale/sale_view.xml +++ b/addons/sale/sale_view.xml @@ -307,7 +307,7 @@ - + @@ -471,7 +471,7 @@ - + @@ -497,7 +497,7 @@ - + From c6189d91a0f3a313393e48e2f3dc86d34c84542e Mon Sep 17 00:00:00 2001 From: Denis Ledoux Date: Tue, 22 Apr 2014 17:07:36 +0200 Subject: [PATCH 43/44] [FIX] base: in partner search view, use operator=child_of instead of filter_domain with a child_of domain operator child_of has the advantage to do exact ID matching for many2one, and not just matching on the name bzr revid: dle@openerp.com-20140422150736-o2t3eank6yqttlel --- openerp/addons/base/res/res_partner_view.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openerp/addons/base/res/res_partner_view.xml b/openerp/addons/base/res/res_partner_view.xml index 9ff9649b8b7..fd394549f4b 100644 --- a/openerp/addons/base/res/res_partner_view.xml +++ b/openerp/addons/base/res/res_partner_view.xml @@ -340,7 +340,7 @@ - + From 6083ed4b46dab046fe4e21bdb479afb7cd1d3216 Mon Sep 17 00:00:00 2001 From: Denis Ledoux Date: Tue, 22 Apr 2014 17:09:18 +0200 Subject: [PATCH 44/44] [FIX] web: abitility to do exact id matching with child_of operator for searchs on many2one fields bzr revid: dle@openerp.com-20140422150918-nxv2v4bcvi6u3v6g --- addons/web/static/src/js/search.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/addons/web/static/src/js/search.js b/addons/web/static/src/js/search.js index b82ad6504a9..1f616202c3f 100644 --- a/addons/web/static/src/js/search.js +++ b/addons/web/static/src/js/search.js @@ -1578,8 +1578,11 @@ instance.web.search.ManyToOneField = instance.web.search.CharField.extend({ return facetValue.get('label'); }, make_domain: function (name, operator, facetValue) { - if (operator === this.default_operator) { + switch(operator){ + case this.default_operator: return [[name, '=', facetValue.get('value')]]; + case 'child_of': + return [[name, 'child_of', facetValue.get('value')]]; } return this._super(name, operator, facetValue); },