← Back to team overview

openerp-community-reviewer team mailing list archive

[Merge] lp:~numerigraphe-team/ocb-addons/7.0-stock-move-cancel-context into lp:ocb-addons

 

Lionel Sausin - Numérigraphe has proposed merging lp:~numerigraphe-team/ocb-addons/7.0-stock-move-cancel-context into lp:ocb-addons.

Requested reviews:
  OpenERP Community Backports Team (ocb)
Related bugs:
  Bug #1291874 in OpenERP Community Backports (Addons): "Method stock_move.action_cancel() loses  context"
  https://bugs.launchpad.net/ocb-addons/+bug/1291874

For more details, see:
https://code.launchpad.net/~numerigraphe-team/ocb-addons/7.0-stock-move-cancel-context/+merge/210761

This branch adds the missing context in several function calls in stock.inventory.action_cancel().
This is not necessary for the standard addons, but makes it possible to use the context in custom modules.
-- 
https://code.launchpad.net/~numerigraphe-team/ocb-addons/7.0-stock-move-cancel-context/+merge/210761
Your team OpenERP Community Backports Team is requested to review the proposed merge of lp:~numerigraphe-team/ocb-addons/7.0-stock-move-cancel-context into lp:ocb-addons.
=== modified file 'account/i18n/ko.po'
--- account/i18n/ko.po	2014-03-12 05:26:04 +0000
+++ account/i18n/ko.po	2014-03-13 09:42:30 +0000
@@ -14,7 +14,7 @@
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-03-12 05:25+0000\n"
+"X-Launchpad-Export-Date: 2014-03-13 07:15+0000\n"
 "X-Generator: Launchpad (build 16963)\n"
 
 #. module: account

=== modified file 'base_import/models.py'
--- base_import/models.py	2014-03-04 11:54:13 +0000
+++ base_import/models.py	2014-03-13 09:42:30 +0000
@@ -11,6 +11,7 @@
 import psycopg2
 
 from openerp.osv import orm, fields
+from openerp.osv.orm import BaseModel
 from openerp.tools.translate import _
 
 FIELDS_RECURSION_LIMIT = 2
@@ -316,8 +317,12 @@
             }]
 
         _logger.info('importing %d rows...', len(data))
-        import_result = self.pool[record.res_model].load(
-            cr, uid, import_fields, data, context=context)
+        # DO NOT FORWARD PORT, already fixed in trunk
+        # hack to avoid to call the load method from ir_translation (name clash)
+        if record.res_model == 'ir.translation':
+            import_result = BaseModel.load(self.pool['ir.translation'], cr, uid, import_fields, data, context=context)
+        else:
+            import_result = self.pool[record.res_model].load(cr, uid, import_fields, data, context=context)
         _logger.info('done')
 
         # If transaction aborted, RELEASE SAVEPOINT is going to raise

=== modified file 'crm/i18n/ja.po'
--- crm/i18n/ja.po	2014-03-06 06:15:19 +0000
+++ crm/i18n/ja.po	2014-03-13 09:42:30 +0000
@@ -8,14 +8,14 @@
 "Project-Id-Version: openobject-addons\n"
 "Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
 "POT-Creation-Date: 2014-01-07 16:56+0000\n"
-"PO-Revision-Date: 2014-03-05 21:13+0000\n"
+"PO-Revision-Date: 2014-03-12 13:24+0000\n"
 "Last-Translator: hiro TAKADA <tkhiro0712@xxxxxxxxx>\n"
 "Language-Team: Japanese <ja@xxxxxx>\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-03-06 06:14+0000\n"
-"X-Generator: Launchpad (build 16948)\n"
+"X-Launchpad-Export-Date: 2014-03-13 07:15+0000\n"
+"X-Generator: Launchpad (build 16963)\n"
 
 #. module: crm
 #: view:crm.lead.report:0
@@ -1218,7 +1218,7 @@
 msgid ""
 "This field is used to distinguish stages related to Leads from stages "
 "related to Opportunities, or to specify stages available for both types."
-msgstr ""
+msgstr "このフィールドは商談とリードの区別、あるいは両方を指定するために使用します。"
 
 #. module: crm
 #: model:mail.message.subtype,name:crm.mt_lead_create
@@ -1423,7 +1423,7 @@
 #. module: crm
 #: help:crm.case.stage,sequence:0
 msgid "Used to order stages. Lower is better."
-msgstr ""
+msgstr "ステージの順位に使用します。 低いほど良好です。"
 
 #. module: crm
 #: model:ir.actions.act_window,name:crm.crm_phonecall_categ_action

=== added file 'l10n_be_invoice_bba/i18n/zh_CN.po'
--- l10n_be_invoice_bba/i18n/zh_CN.po	1970-01-01 00:00:00 +0000
+++ l10n_be_invoice_bba/i18n/zh_CN.po	2014-03-13 09:42:30 +0000
@@ -0,0 +1,146 @@
+# Chinese (Simplified) translation for openobject-addons
+# Copyright (c) 2014 Rosetta Contributors and Canonical Ltd 2014
+# This file is distributed under the same license as the openobject-addons package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2014.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: openobject-addons\n"
+"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
+"POT-Creation-Date: 2012-11-24 02:53+0000\n"
+"PO-Revision-Date: 2014-03-13 03:38+0000\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: Chinese (Simplified) <zh_CN@xxxxxx>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Launchpad-Export-Date: 2014-03-13 07:15+0000\n"
+"X-Generator: Launchpad (build 16963)\n"
+
+#. module: l10n_be_invoice_bba
+#: sql_constraint:account.invoice:0
+msgid "Invoice Number must be unique per Company!"
+msgstr "发票号必须在公司范围内唯一"
+
+#. module: l10n_be_invoice_bba
+#: model:ir.model,name:l10n_be_invoice_bba.model_account_invoice
+msgid "Invoice"
+msgstr "发票"
+
+#. module: l10n_be_invoice_bba
+#: constraint:res.partner:0
+msgid "Error ! You cannot create recursive associated members."
+msgstr "错误,您不能创建循环引用的会员用户"
+
+#. module: l10n_be_invoice_bba
+#: constraint:account.invoice:0
+msgid "Invalid BBA Structured Communication !"
+msgstr "BBA结构化传输有误!"
+
+#. module: l10n_be_invoice_bba
+#: selection:res.partner,out_inv_comm_algorithm:0
+msgid "Random"
+msgstr "随机"
+
+#. module: l10n_be_invoice_bba
+#: help:res.partner,out_inv_comm_type:0
+msgid "Select Default Communication Type for Outgoing Invoices."
+msgstr ""
+
+#. module: l10n_be_invoice_bba
+#: help:res.partner,out_inv_comm_algorithm:0
+msgid ""
+"Select Algorithm to generate the Structured Communication on Outgoing "
+"Invoices."
+msgstr ""
+
+#. module: l10n_be_invoice_bba
+#: code:addons/l10n_be_invoice_bba/invoice.py:109
+#: code:addons/l10n_be_invoice_bba/invoice.py:135
+#, python-format
+msgid ""
+"The daily maximum of outgoing invoices with an automatically generated BBA "
+"Structured Communications has been exceeded!\n"
+"Please create manually a unique BBA Structured Communication."
+msgstr "自动生成结构化BBA传输已超出每日销售发票的最大值,请手动建立BBA结构化传输"
+
+#. module: l10n_be_invoice_bba
+#: code:addons/l10n_be_invoice_bba/invoice.py:150
+#, python-format
+msgid "Error!"
+msgstr ""
+
+#. module: l10n_be_invoice_bba
+#: code:addons/l10n_be_invoice_bba/invoice.py:121
+#, python-format
+msgid ""
+"The Partner should have a 3-7 digit Reference Number for the generation of "
+"BBA Structured Communications!\n"
+"Please correct the Partner record."
+msgstr ""
+
+#. module: l10n_be_invoice_bba
+#: constraint:res.partner:0
+msgid "Error: Invalid ean code"
+msgstr "错误:无效的EAN编码"
+
+#. module: l10n_be_invoice_bba
+#: code:addons/l10n_be_invoice_bba/invoice.py:108
+#: code:addons/l10n_be_invoice_bba/invoice.py:120
+#: code:addons/l10n_be_invoice_bba/invoice.py:134
+#: code:addons/l10n_be_invoice_bba/invoice.py:162
+#: code:addons/l10n_be_invoice_bba/invoice.py:172
+#: code:addons/l10n_be_invoice_bba/invoice.py:197
+#, python-format
+msgid "Warning!"
+msgstr "警告!"
+
+#. module: l10n_be_invoice_bba
+#: selection:res.partner,out_inv_comm_algorithm:0
+msgid "Customer Reference"
+msgstr "客户参考号"
+
+#. module: l10n_be_invoice_bba
+#: field:res.partner,out_inv_comm_type:0
+msgid "Communication Type"
+msgstr "讯息类型"
+
+#. module: l10n_be_invoice_bba
+#: code:addons/l10n_be_invoice_bba/invoice.py:173
+#: code:addons/l10n_be_invoice_bba/invoice.py:198
+#, python-format
+msgid ""
+"The BBA Structured Communication has already been used!\n"
+"Please create manually a unique BBA Structured Communication."
+msgstr ""
+
+#. module: l10n_be_invoice_bba
+#: selection:res.partner,out_inv_comm_algorithm:0
+msgid "Date"
+msgstr "事务处理日期"
+
+#. module: l10n_be_invoice_bba
+#: model:ir.model,name:l10n_be_invoice_bba.model_res_partner
+msgid "Partner"
+msgstr "合作伙伴"
+
+#. module: l10n_be_invoice_bba
+#: code:addons/l10n_be_invoice_bba/invoice.py:151
+#, python-format
+msgid ""
+"Unsupported Structured Communication Type Algorithm '%s' !\n"
+"Please contact your OpenERP support channel."
+msgstr "不支持的结构化传输算法类型\"%s\"!请联系你的OpenERP 维护人员"
+
+#. module: l10n_be_invoice_bba
+#: field:res.partner,out_inv_comm_algorithm:0
+msgid "Communication Algorithm"
+msgstr ""
+
+#. module: l10n_be_invoice_bba
+#: code:addons/l10n_be_invoice_bba/invoice.py:163
+#, python-format
+msgid ""
+"Empty BBA Structured Communication!\n"
+"Please fill in a unique BBA Structured Communication."
+msgstr ""

=== modified file 'stock/stock.py'
--- stock/stock.py	2014-03-04 13:08:40 +0000
+++ stock/stock.py	2014-03-13 09:42:30 +0000
@@ -2272,15 +2272,15 @@
                 if move.picking_id:
                     pickings.add(move.picking_id.id)
             if move.move_dest_id and move.move_dest_id.state == 'waiting':
-                self.write(cr, uid, [move.move_dest_id.id], {'state': 'confirmed'})
+                self.write(cr, uid, [move.move_dest_id.id], {'state': 'confirmed'}, context=context)
                 if context.get('call_unlink',False) and move.move_dest_id.picking_id:
                     wf_service = netsvc.LocalService("workflow")
                     wf_service.trg_write(uid, 'stock.picking', move.move_dest_id.picking_id.id, cr)
-        self.write(cr, uid, ids, {'state': 'cancel', 'move_dest_id': False})
+        self.write(cr, uid, ids, {'state': 'cancel', 'move_dest_id': False}, context=context)
         if not context.get('call_unlink',False):
             for pick in self.pool.get('stock.picking').browse(cr, uid, list(pickings), context=context):
                 if all(move.state == 'cancel' for move in pick.move_lines):
-                    self.pool.get('stock.picking').write(cr, uid, [pick.id], {'state': 'cancel'})
+                    self.pool.get('stock.picking').write(cr, uid, [pick.id], {'state': 'cancel'}, context=context)
 
         wf_service = netsvc.LocalService("workflow")
         for id in ids:


Follow ups