[MERGE] forward port of branch saas-3 up to 591326c
This commit is contained in:
commit
b49755b545
|
@ -1574,8 +1574,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:
|
||||
|
|
|
@ -433,7 +433,7 @@
|
|||
<field name="expiration_date" />
|
||||
</group>
|
||||
<group>
|
||||
<field name="insurer_id" />
|
||||
<field name="insurer_id" context="{'default_supplier': True}"/>
|
||||
<field name="purchaser_id" />
|
||||
<field name="ins_ref" />
|
||||
</group>
|
||||
|
@ -641,7 +641,7 @@
|
|||
<field name="date" />
|
||||
<field name="purchaser_id" />
|
||||
<field name="inv_ref" />
|
||||
<field name="vendor_id" />
|
||||
<field name="vendor_id" context="{'default_supplier': True}"/>
|
||||
</group>
|
||||
</group>
|
||||
<group string="Notes">
|
||||
|
@ -743,7 +743,7 @@
|
|||
<group string="Additional Details">
|
||||
<field name="date" />
|
||||
<field name="purchaser_id" />
|
||||
<field name="vendor_id" />
|
||||
<field name="vendor_id" context="{'default_supplier': True}"/>
|
||||
<field name="inv_ref" />
|
||||
</group>
|
||||
</group>
|
||||
|
|
|
@ -780,7 +780,7 @@
|
|||
<br />
|
||||
<t t-esc="widget.pos.company.name"/><br />
|
||||
Phone: <t t-esc="widget.pos.company.phone || ''"/><br />
|
||||
User: <t t-esc="widget.pos.cashier.name"/><br />
|
||||
User: <t t-esc="widget.pos.cashier ? widget.pos.cashier.name : widget.pos.user.name"/><br />
|
||||
Shop: <t t-esc="widget.pos.shop.name"/><br />
|
||||
<br />
|
||||
<t t-if="widget.pos.config.receipt_header">
|
||||
|
|
|
@ -474,6 +474,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();
|
||||
|
|
|
@ -302,6 +302,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