[FIX] website: public user; website_sale
bzr revid: chm@openerp.com-20140128152136-pqh7oqj4drpjk09z
This commit is contained in:
parent
bb4c13a2ec
commit
316745250b
|
@ -173,7 +173,7 @@ class website(osv.osv):
|
|||
|
||||
def get_public_user(self, cr, uid, context=None):
|
||||
uid = openerp.SUPERUSER_ID
|
||||
res = self.pool['ir.model.data'].get_object_reference(cr, uid, 'website', 'public_user')
|
||||
res = self.pool['ir.model.data'].get_object_reference(cr, uid, 'base', 'public_user')
|
||||
return res and res[1] or False
|
||||
|
||||
@openerp.tools.ormcache(skiparg=3)
|
||||
|
|
|
@ -484,6 +484,7 @@ class Ecommerce(http.Controller):
|
|||
billing_info = dict((k, v) for k,v in checkout.items() if "shipping_" not in k and k != "company")
|
||||
billing_info['parent_id'] = company_id
|
||||
|
||||
partner_id = None
|
||||
public_id = request.registry['website'].get_public_user(cr, uid, context)
|
||||
if request.uid != public_id:
|
||||
partner_id = orm_user.browse(cr, SUPERUSER_ID, uid, context=context).partner_id.id
|
||||
|
@ -492,7 +493,7 @@ class Ecommerce(http.Controller):
|
|||
user_ids = request.registry['res.users'].search(cr, SUPERUSER_ID, domain, context=context)
|
||||
if not user_ids or public_id not in user_ids:
|
||||
partner_id = order.partner_id.id
|
||||
|
||||
|
||||
if partner_id:
|
||||
orm_partner.write(cr, SUPERUSER_ID, [partner_id], billing_info, context=context)
|
||||
else:
|
||||
|
|
|
@ -947,7 +947,7 @@
|
|||
<input t-att-value="acquirer.id" type="radio" name="acquirer" t-att-checked="acquirers[0] == acquirer"/>
|
||||
<img class="media-object" style="width: 60px; display: inline-block;"
|
||||
t-att-title="acquirer.name"
|
||||
t-att-src="'/payment_acquirer_%s/static/src/img/%s_icon.png' % (acquirer.name, acquirer.name)"/>
|
||||
t-att-src="'/payment_%s/static/src/img/%s_icon.png' % (acquirer.name, acquirer.name)"/>
|
||||
<span t-field="acquirer.name"/>
|
||||
</label>
|
||||
</li>
|
||||
|
|
Loading…
Reference in New Issue