Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge remote-tracking branch 'odoo/9.0' into 9.0
  • Loading branch information
OCA-git-bot committed Feb 13, 2017
2 parents db8f7ee + 4a33db4 commit 221e895
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 10 deletions.
2 changes: 1 addition & 1 deletion addons/account/models/account_payment.py
Expand Up @@ -81,7 +81,7 @@ def _get_invoices(self):

def _compute_total_invoices_amount(self):
""" Compute the sum of the residual of invoices, expressed in the payment currency """
payment_currency = self.currency_id or self.journal_id.currency_id or self.journal_id.company_id.currency_id
payment_currency = self.currency_id or self.journal_id.currency_id or self.journal_id.company_id.currency_id or self.env.user.company_id.currency_id
invoices = self._get_invoices()

if all(inv.currency_id == payment_currency for inv in invoices):
Expand Down
9 changes: 0 additions & 9 deletions addons/product/product.py
Expand Up @@ -1179,15 +1179,6 @@ def search(self, cr, uid, args, offset=0, limit=None, order=None, context=None,
args.append((('categ_id', 'child_of', context['search_default_categ_id'])))
return super(product_product, self).search(cr, uid, args, offset=offset, limit=limit, order=order, context=context, count=count)

def open_product_template(self, cr, uid, ids, context=None):
""" Utility method used to add an "Open Template" button in product views """
product = self.browse(cr, uid, ids[0], context=context)
return {'type': 'ir.actions.act_window',
'res_model': 'product.template',
'view_mode': 'form',
'res_id': product.product_tmpl_id.id,
'target': 'new'}

def create(self, cr, uid, vals, context=None):
ctx = dict(context or {}, create_product_product=True)
product_id = super(product_product, self).create(cr, uid, vals, context=ctx)
Expand Down

0 comments on commit 221e895

Please sign in to comment.