[MERGE] Forward-port of latest saas-3 bugfixes, up to rev. 9460 revid:dle@openerp.com-20140519103942-do7uem4in0jfqzo2

This commit is contained in:
Denis Ledoux 2014-05-19 12:46:33 +02:00
commit cab190b136
7 changed files with 14 additions and 11 deletions

View File

@ -2055,6 +2055,8 @@ class account_tax(osv.osv):
amount = amount2
child_tax = self._unit_compute(cr, uid, tax.child_ids, amount, product, partner, quantity)
res.extend(child_tax)
for child in child_tax:
amount2 += child.get('amount', 0.0)
if tax.child_depend:
for r in res:
for name in ('base','ref_base'):

View File

@ -2,13 +2,13 @@
<openerp>
<data noupdate="1">
<record id="provider_openerp" model="auth.oauth.provider">
<field name="name">OpenERP.com Accounts</field>
<field name="auth_endpoint">https://accounts.openerp.com/oauth2/auth</field>
<field name="name">Odoo.com Accounts</field>
<field name="auth_endpoint">https://accounts.odoo.com/oauth2/auth</field>
<field name="scope">userinfo</field>
<field name="validation_endpoint">https://accounts.openerp.com/oauth2/tokeninfo</field>
<field name="validation_endpoint">https://accounts.odoo.com/oauth2/tokeninfo</field>
<field name="data_endpoint"></field>
<field name="css_class">zocial openerp</field>
<field name="body">Log in with OpenERP.com</field>
<field name="body">Log in with Odoo.com</field>
<field name="enabled" eval="True"/>
</record>
<record id="provider_facebook" model="auth.oauth.provider">

View File

@ -491,11 +491,9 @@ class marketing_campaign_activity(osv.osv):
active_ids=[workitem.res_id],
active_model=workitem.object_id.model,
workitem=workitem)
res = server_obj.run(cr, uid, [activity.server_action_id.id],
server_obj.run(cr, uid, [activity.server_action_id.id],
context=action_context)
# server action return False if the action is performed
# except client_action, other and python code
return res == False and True or res
return True
def process(self, cr, uid, act_id, wi_id, context=None):
activity = self.browse(cr, uid, act_id, context=context)

View File

@ -1167,8 +1167,8 @@ class pos_order(osv.osv):
return self.write(cr, uid, ids, {'state': 'payment'}, context=context)
def action_paid(self, cr, uid, ids, context=None):
self.write(cr, uid, ids, {'state': 'paid'}, context=context)
self.create_picking(cr, uid, ids, context=context)
self.write(cr, uid, ids, {'state': 'paid'}, context=context)
return True
def action_cancel(self, cr, uid, ids, context=None):

View File

@ -146,6 +146,9 @@ function openerp_pos_db(instance, module){
var product = products[i];
var search_string = this._product_search_string(product);
var categ_id = product.public_categ_id ? product.public_categ_id[0] : this.root_category_id;
if (product.variants){
product.name = product.name+" ("+product.variants+")";
}
if(!stored_categories[categ_id]){
stored_categories[categ_id] = [];
}

View File

@ -219,7 +219,7 @@ function openerp_pos_models(instance, module){ //module is instance.point_of_sal
return self.fetch(
'product.product',
['name', 'list_price','price','public_categ_id', 'taxes_id', 'ean13', 'default_code',
['name', 'list_price','price','public_categ_id', 'taxes_id', 'ean13', 'default_code', 'variants',
'to_weight', 'uom_id', 'uos_id', 'uos_coeff', 'mes_type', 'description_sale', 'description'],
[['sale_ok','=',true],['available_in_pos','=',true]],
{pricelist: self.pricelist.id} // context for price

View File

@ -64,7 +64,7 @@ class sale_quote(http.Controller):
order = order_obj.browse(request.cr, SUPERUSER_ID, order_id)
if token != order.access_token:
return request.website.render('website.404')
attachments=sign and [('signature.png', sign)] or []
attachments=sign and [('signature.png', sign.decode('base64'))] or []
order_obj.signal_order_confirm(request.cr, SUPERUSER_ID, [order_id], context=request.context)
message = _('Order signed by %s') % (signer,)
self.__message_post(message, order_id, type='comment', subtype='mt_comment', attachments=attachments)