[MERGE] forward port of branch 7.0 up to 60ab6f1
This commit is contained in:
commit
8a7728790b
|
@ -1595,8 +1595,7 @@ class account_invoice_line(osv.osv):
|
|||
company_currency = self.pool['res.company'].browse(cr, uid, inv.company_id.id).currency_id.id
|
||||
for line in inv.invoice_line:
|
||||
mres = self.move_line_get_item(cr, uid, line, context)
|
||||
if not mres:
|
||||
continue
|
||||
mres['invl_id'] = line.id
|
||||
res.append(mres)
|
||||
tax_code_found= False
|
||||
for tax in tax_obj.compute_all(cr, uid, line.invoice_line_tax_id,
|
||||
|
|
|
@ -124,7 +124,7 @@ class account_invoice_line(osv.osv):
|
|||
account_prec = decimal_precision.precision_get(cr, uid, 'Account')
|
||||
# calculate and write down the possible price difference between invoice price and product price
|
||||
for line in res:
|
||||
if a == line['account_id'] and i_line.product_id.id == line['product_id']:
|
||||
if line.get('invl_id', 0) == i_line.id and a == line['account_id']:
|
||||
uom = i_line.product_id.uos_id or i_line.product_id.uom_id
|
||||
valuation_price_unit = self.pool.get('product.uom')._compute_price(cr, uid, uom.id, i_line.product_id.standard_price, i_line.uos_id.id)
|
||||
if inv.currency_id.id != company_currency:
|
||||
|
|
|
@ -473,6 +473,7 @@ instance.web.SearchView = instance.web.Widget.extend(/** @lends instance.web.Sea
|
|||
* Sets up search view's view-wide auto-completion widget
|
||||
*/
|
||||
setup_global_completion: function () {
|
||||
var self = this;
|
||||
var autocomplete = this.$el.autocomplete({
|
||||
source: this.proxy('complete_global_search'),
|
||||
select: this.proxy('select_completion'),
|
||||
|
|
|
@ -516,7 +516,7 @@ instance.web.ListView = instance.web.View.extend( /** @lends instance.web.ListVi
|
|||
self.dataset.index = 0;
|
||||
}
|
||||
} else if (self.dataset.index >= self.records.length) {
|
||||
self.dataset.index = 0;
|
||||
self.dataset.index = self.records.length ? 0 : null;
|
||||
}
|
||||
|
||||
self.compute_aggregates();
|
||||
|
|
|
@ -303,6 +303,8 @@ instance.web_kanban.KanbanView = instance.web.View.extend({
|
|||
var kgroup = new instance.web_kanban.KanbanGroup(self, records, null, self.dataset);
|
||||
if (!_.isEmpty(self.dataset.ids) && (self.dataset.index === null || self.dataset.index >= self.dataset.ids.length)) {
|
||||
self.dataset.index = 0;
|
||||
} else if (_.isEmpty(self.dataset.ids)){
|
||||
self.dataset.index = null;
|
||||
}
|
||||
self.do_add_groups([kgroup]).done(function() {
|
||||
if (_.isEmpty(records)) {
|
||||
|
|
Loading…
Reference in New Issue