[MERGE] forward port of branch 7.0 up to 095be21
This commit is contained in:
commit
978fd47261
|
@ -23,7 +23,7 @@
|
||||||
<record id="email_template_edi_invoice" model="email.template">
|
<record id="email_template_edi_invoice" model="email.template">
|
||||||
<field name="name">Invoice - Send by Email</field>
|
<field name="name">Invoice - Send by Email</field>
|
||||||
<field name="email_from">${(object.user_id.email or object.company_id.email or 'noreply@localhost')|safe}</field>
|
<field name="email_from">${(object.user_id.email or object.company_id.email or 'noreply@localhost')|safe}</field>
|
||||||
<field name="subject">${object.company_id.name} Invoice (Ref ${object.number or 'n/a'})</field>
|
<field name="subject">${object.company_id.name|safe} Invoice (Ref ${object.number or 'n/a'})</field>
|
||||||
<field name="partner_to">${object.partner_id.id}</field>
|
<field name="partner_to">${object.partner_id.id}</field>
|
||||||
<field name="model_id" ref="account.model_account_invoice"/>
|
<field name="model_id" ref="account.model_account_invoice"/>
|
||||||
<field name="auto_delete" eval="True"/>
|
<field name="auto_delete" eval="True"/>
|
||||||
|
|
|
@ -301,7 +301,7 @@ class account_analytic_account(osv.osv):
|
||||||
dom = []
|
dom = []
|
||||||
for name2 in name.split('/'):
|
for name2 in name.split('/'):
|
||||||
name = name2.strip()
|
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
|
if not account_ids: break
|
||||||
dom = [('parent_id','in',account_ids)]
|
dom = [('parent_id','in',account_ids)]
|
||||||
else:
|
else:
|
||||||
|
|
|
@ -60,6 +60,7 @@
|
||||||
</div>
|
</div>
|
||||||
<field name="amount_total" nolabel="1" class="oe_subtotal_footer_separator"/>
|
<field name="amount_total" nolabel="1" class="oe_subtotal_footer_separator"/>
|
||||||
</group>
|
</group>
|
||||||
|
<div class="oe_clear"/>
|
||||||
</page>
|
</page>
|
||||||
<page string="Payments">
|
<page string="Payments">
|
||||||
<field name="statement_ids" colspan="4" nolabel="1">
|
<field name="statement_ids" colspan="4" nolabel="1">
|
||||||
|
|
|
@ -19,3 +19,4 @@
|
||||||
#
|
#
|
||||||
##############################################################################
|
##############################################################################
|
||||||
|
|
||||||
|
import portal_claim
|
|
@ -0,0 +1,44 @@
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
##############################################################################
|
||||||
|
#
|
||||||
|
# OpenERP, Open Source Management Solution
|
||||||
|
# Copyright (C) 2004-today OpenERP SA (<http://www.openerp.com>)
|
||||||
|
#
|
||||||
|
# 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 <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
|
##############################################################################
|
||||||
|
|
||||||
|
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:
|
|
@ -7,7 +7,7 @@
|
||||||
<record id="email_template_edi_sale" model="email.template">
|
<record id="email_template_edi_sale" model="email.template">
|
||||||
<field name="name">Sales Order - Send by Email (Portal)</field>
|
<field name="name">Sales Order - Send by Email (Portal)</field>
|
||||||
<field name="email_from">${(object.user_id.email or '')|safe}</field>
|
<field name="email_from">${(object.user_id.email or '')|safe}</field>
|
||||||
<field name="subject">${object.company_id.name} ${object.state in ('draft', 'sent') and 'Quotation' or 'Order'} (Ref ${object.name or 'n/a' })</field>
|
<field name="subject">${object.company_id.name|safe} ${object.state in ('draft', 'sent') and 'Quotation' or 'Order'} (Ref ${object.name or 'n/a' })</field>
|
||||||
<field name="partner_to">${object.partner_invoice_id.id}</field>
|
<field name="partner_to">${object.partner_invoice_id.id}</field>
|
||||||
<field name="model_id" ref="sale.model_sale_order"/>
|
<field name="model_id" ref="sale.model_sale_order"/>
|
||||||
<field name="auto_delete" eval="True"/>
|
<field name="auto_delete" eval="True"/>
|
||||||
|
@ -97,8 +97,13 @@
|
||||||
<record id="email_template_edi_invoice" model="email.template">
|
<record id="email_template_edi_invoice" model="email.template">
|
||||||
<field name="name">Invoice - Send by Email (Portal)</field>
|
<field name="name">Invoice - Send by Email (Portal)</field>
|
||||||
<field name="email_from">${(object.user_id.email or object.company_id.email or 'noreply@localhost')|safe}</field>
|
<field name="email_from">${(object.user_id.email or object.company_id.email or 'noreply@localhost')|safe}</field>
|
||||||
|
<<<<<<< HEAD
|
||||||
<field name="subject">${object.company_id.name} Invoice (Ref ${object.number or 'n/a' })</field>
|
<field name="subject">${object.company_id.name} Invoice (Ref ${object.number or 'n/a' })</field>
|
||||||
<field name="partner_to">${object.partner_id.id}</field>
|
<field name="partner_to">${object.partner_id.id}</field>
|
||||||
|
=======
|
||||||
|
<field name="subject">${object.company_id.name|safe} Invoice (Ref ${object.number or 'n/a' })</field>
|
||||||
|
<field name="email_recipients">${object.partner_id.id}</field>
|
||||||
|
>>>>>>> 7.0
|
||||||
<field name="model_id" ref="account.model_account_invoice"/>
|
<field name="model_id" ref="account.model_account_invoice"/>
|
||||||
<field name="auto_delete" eval="True"/>
|
<field name="auto_delete" eval="True"/>
|
||||||
<field name="report_template" ref="account.account_invoices"/>
|
<field name="report_template" ref="account.account_invoices"/>
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
<record id="email_template_edi_purchase" model="email.template">
|
<record id="email_template_edi_purchase" model="email.template">
|
||||||
<field name="name">Purchase Order - Send by mail</field>
|
<field name="name">Purchase Order - Send by mail</field>
|
||||||
<field name="email_from">${(object.validator.email or '')|safe}</field>
|
<field name="email_from">${(object.validator.email or '')|safe}</field>
|
||||||
<field name="subject">${object.company_id.name} Order (Ref ${object.name or 'n/a' })</field>
|
<field name="subject">${object.company_id.name|safe} Order (Ref ${object.name or 'n/a' })</field>
|
||||||
<field name="partner_to">${object.partner_id.id}</field>
|
<field name="partner_to">${object.partner_id.id}</field>
|
||||||
<field name="model_id" ref="purchase.model_purchase_order"/>
|
<field name="model_id" ref="purchase.model_purchase_order"/>
|
||||||
<field name="auto_delete" eval="True"/>
|
<field name="auto_delete" eval="True"/>
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
<record id="email_template_edi_sale" model="email.template">
|
<record id="email_template_edi_sale" model="email.template">
|
||||||
<field name="name">Sales Order - Send by Email</field>
|
<field name="name">Sales Order - Send by Email</field>
|
||||||
<field name="email_from">${(object.user_id.email or '')|safe}</field>
|
<field name="email_from">${(object.user_id.email or '')|safe}</field>
|
||||||
<field name="subject">${object.company_id.name} ${object.state in ('draft', 'sent') and 'Quotation' or 'Order'} (Ref ${object.name or 'n/a' })</field>
|
<field name="subject">${object.company_id.name|safe} ${object.state in ('draft', 'sent') and 'Quotation' or 'Order'} (Ref ${object.name or 'n/a' })</field>
|
||||||
<field name="partner_to">${object.partner_invoice_id.id}</field>
|
<field name="partner_to">${object.partner_invoice_id.id}</field>
|
||||||
<field name="model_id" ref="sale.model_sale_order"/>
|
<field name="model_id" ref="sale.model_sale_order"/>
|
||||||
<field name="auto_delete" eval="True"/>
|
<field name="auto_delete" eval="True"/>
|
||||||
|
|
|
@ -1930,14 +1930,13 @@ class stock_move(osv.osv):
|
||||||
product = self.pool.get('product.product').browse(cr, uid, [prod_id], context=ctx)[0]
|
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
|
uos_id = product.uos_id and product.uos_id.id or False
|
||||||
result = {
|
result = {
|
||||||
|
'name': product.partner_ref,
|
||||||
'product_uom': product.uom_id.id,
|
'product_uom': product.uom_id.id,
|
||||||
'product_uos': uos_id,
|
'product_uos': uos_id,
|
||||||
'product_qty': 1.00,
|
'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'],
|
'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,
|
'prodlot_id' : False,
|
||||||
}
|
}
|
||||||
if not ids:
|
|
||||||
result['name'] = product.partner_ref
|
|
||||||
if loc_id:
|
if loc_id:
|
||||||
result['location_id'] = loc_id
|
result['location_id'] = loc_id
|
||||||
if loc_dest_id:
|
if loc_dest_id:
|
||||||
|
|
Loading…
Reference in New Issue