diff --git a/addons/account/edi/invoice_action_data.xml b/addons/account/edi/invoice_action_data.xml index 417169fa8cb..766db9e1a99 100644 --- a/addons/account/edi/invoice_action_data.xml +++ b/addons/account/edi/invoice_action_data.xml @@ -23,7 +23,7 @@ Invoice - Send by Email ${(object.user_id.email or object.company_id.email or 'noreply@localhost')|safe} - ${object.company_id.name} Invoice (Ref ${object.number or 'n/a'}) + ${object.company_id.name|safe} Invoice (Ref ${object.number or 'n/a'}) ${object.partner_id.id} diff --git a/addons/analytic/analytic.py b/addons/analytic/analytic.py index 63ca07ac00b..db7a805c555 100644 --- a/addons/analytic/analytic.py +++ b/addons/analytic/analytic.py @@ -301,7 +301,7 @@ class account_analytic_account(osv.osv): dom = [] for name2 in name.split('/'): name = name2.strip() - account_ids = self.search(cr, uid, dom + [('name', 'ilike', name)] + args, limit=limit, context=context) + account_ids = self.search(cr, uid, dom + [('name', operator, name)] + args, limit=limit, context=context) if not account_ids: break dom = [('parent_id','in',account_ids)] else: diff --git a/addons/point_of_sale/point_of_sale_view.xml b/addons/point_of_sale/point_of_sale_view.xml index 50573017909..6731cb9b20a 100644 --- a/addons/point_of_sale/point_of_sale_view.xml +++ b/addons/point_of_sale/point_of_sale_view.xml @@ -60,6 +60,7 @@ +
diff --git a/addons/portal_claim/__init__.py b/addons/portal_claim/__init__.py index 26c654db9dd..dbd07a05428 100644 --- a/addons/portal_claim/__init__.py +++ b/addons/portal_claim/__init__.py @@ -19,3 +19,4 @@ # ############################################################################## +import portal_claim \ No newline at end of file diff --git a/addons/portal_claim/portal_claim.py b/addons/portal_claim/portal_claim.py new file mode 100644 index 00000000000..0a3aa40eb56 --- /dev/null +++ b/addons/portal_claim/portal_claim.py @@ -0,0 +1,44 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Management Solution +# Copyright (C) 2004-today OpenERP SA () +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################## + +from openerp import SUPERUSER_ID +from openerp.osv import osv + + +class crm_claim(osv.osv): + _inherit = "crm.claim" + + def _get_default_partner_id(self, cr, uid, context=None): + """ Gives default partner_id """ + if context is None: + context = {} + if context.get('portal'): + user = self.pool.get('res.users').browse(cr, uid, uid, context=context) + # Special case for portal users, as they are not allowed to call name_get on res.partner + # We save this call for the web client by returning it in default get + return self.pool['res.partner'].name_get(cr, SUPERUSER_ID, [user.partner_id.id], context=context)[0] + return False + + _defaults = { + 'partner_id': lambda s, cr, uid, c: s._get_default_partner_id(cr, uid, c), + } + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/portal_sale/portal_sale_data.xml b/addons/portal_sale/portal_sale_data.xml index 2da55bcb081..49f7c172e27 100644 --- a/addons/portal_sale/portal_sale_data.xml +++ b/addons/portal_sale/portal_sale_data.xml @@ -7,7 +7,7 @@ Sales Order - Send by Email (Portal) ${(object.user_id.email or '')|safe} - ${object.company_id.name} ${object.state in ('draft', 'sent') and 'Quotation' or 'Order'} (Ref ${object.name or 'n/a' }) + ${object.company_id.name|safe} ${object.state in ('draft', 'sent') and 'Quotation' or 'Order'} (Ref ${object.name or 'n/a' }) ${object.partner_invoice_id.id} @@ -97,8 +97,13 @@ Invoice - Send by Email (Portal) ${(object.user_id.email or object.company_id.email or 'noreply@localhost')|safe} +<<<<<<< HEAD ${object.company_id.name} Invoice (Ref ${object.number or 'n/a' }) ${object.partner_id.id} +======= + ${object.company_id.name|safe} Invoice (Ref ${object.number or 'n/a' }) + ${object.partner_id.id} +>>>>>>> 7.0 diff --git a/addons/purchase/edi/purchase_order_action_data.xml b/addons/purchase/edi/purchase_order_action_data.xml index 51d075b0ce0..b164261ddff 100644 --- a/addons/purchase/edi/purchase_order_action_data.xml +++ b/addons/purchase/edi/purchase_order_action_data.xml @@ -20,7 +20,7 @@ Purchase Order - Send by mail ${(object.validator.email or '')|safe} - ${object.company_id.name} Order (Ref ${object.name or 'n/a' }) + ${object.company_id.name|safe} Order (Ref ${object.name or 'n/a' }) ${object.partner_id.id} diff --git a/addons/sale/edi/sale_order_action_data.xml b/addons/sale/edi/sale_order_action_data.xml index 4ad657d7f82..d17443a7577 100644 --- a/addons/sale/edi/sale_order_action_data.xml +++ b/addons/sale/edi/sale_order_action_data.xml @@ -21,7 +21,7 @@ Sales Order - Send by Email ${(object.user_id.email or '')|safe} - ${object.company_id.name} ${object.state in ('draft', 'sent') and 'Quotation' or 'Order'} (Ref ${object.name or 'n/a' }) + ${object.company_id.name|safe} ${object.state in ('draft', 'sent') and 'Quotation' or 'Order'} (Ref ${object.name or 'n/a' }) ${object.partner_invoice_id.id} diff --git a/addons/stock/stock.py b/addons/stock/stock.py index 3e0a7d55e3a..99d420f49bb 100644 --- a/addons/stock/stock.py +++ b/addons/stock/stock.py @@ -1930,14 +1930,13 @@ class stock_move(osv.osv): product = self.pool.get('product.product').browse(cr, uid, [prod_id], context=ctx)[0] uos_id = product.uos_id and product.uos_id.id or False result = { + 'name': product.partner_ref, 'product_uom': product.uom_id.id, 'product_uos': uos_id, 'product_qty': 1.00, 'product_uos_qty' : self.pool.get('stock.move').onchange_quantity(cr, uid, ids, prod_id, 1.00, product.uom_id.id, uos_id)['value']['product_uos_qty'], 'prodlot_id' : False, } - if not ids: - result['name'] = product.partner_ref if loc_id: result['location_id'] = loc_id if loc_dest_id: