[MERGE] forward port of branch saas-3 up to 591326c

This commit is contained in:
Denis Ledoux
2014-08-13 10:29:14 +02:00
7 changed files with 10 additions and 8 deletions
+1 -2
View File
@@ -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 company_currency = self.pool['res.company'].browse(cr, uid, inv.company_id.id).currency_id.id
for line in inv.invoice_line: for line in inv.invoice_line:
mres = self.move_line_get_item(cr, uid, line, context) mres = self.move_line_get_item(cr, uid, line, context)
if not mres: mres['invl_id'] = line.id
continue
res.append(mres) res.append(mres)
tax_code_found= False tax_code_found= False
for tax in tax_obj.compute_all(cr, uid, line.invoice_line_tax_id, for tax in tax_obj.compute_all(cr, uid, line.invoice_line_tax_id,
+1 -1
View File
@@ -124,7 +124,7 @@ class account_invoice_line(osv.osv):
account_prec = decimal_precision.precision_get(cr, uid, 'Account') account_prec = decimal_precision.precision_get(cr, uid, 'Account')
# calculate and write down the possible price difference between invoice price and product price # calculate and write down the possible price difference between invoice price and product price
for line in res: 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 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) 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: if inv.currency_id.id != company_currency:
+3 -3
View File
@@ -433,7 +433,7 @@
<field name="expiration_date" /> <field name="expiration_date" />
</group> </group>
<group> <group>
<field name="insurer_id" /> <field name="insurer_id" context="{'default_supplier': True}"/>
<field name="purchaser_id" /> <field name="purchaser_id" />
<field name="ins_ref" /> <field name="ins_ref" />
</group> </group>
@@ -641,7 +641,7 @@
<field name="date" /> <field name="date" />
<field name="purchaser_id" /> <field name="purchaser_id" />
<field name="inv_ref" /> <field name="inv_ref" />
<field name="vendor_id" /> <field name="vendor_id" context="{'default_supplier': True}"/>
</group> </group>
</group> </group>
<group string="Notes"> <group string="Notes">
@@ -743,7 +743,7 @@
<group string="Additional Details"> <group string="Additional Details">
<field name="date" /> <field name="date" />
<field name="purchaser_id" /> <field name="purchaser_id" />
<field name="vendor_id" /> <field name="vendor_id" context="{'default_supplier': True}"/>
<field name="inv_ref" /> <field name="inv_ref" />
</group> </group>
</group> </group>
+1 -1
View File
@@ -780,7 +780,7 @@
<br /> <br />
<t t-esc="widget.pos.company.name"/><br /> <t t-esc="widget.pos.company.name"/><br />
Phone: <t t-esc="widget.pos.company.phone || ''"/><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 /> Shop: <t t-esc="widget.pos.shop.name"/><br />
<br /> <br />
<t t-if="widget.pos.config.receipt_header"> <t t-if="widget.pos.config.receipt_header">
+1
View File
@@ -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 * Sets up search view's view-wide auto-completion widget
*/ */
setup_global_completion: function () { setup_global_completion: function () {
var self = this;
var autocomplete = this.$el.autocomplete({ var autocomplete = this.$el.autocomplete({
source: this.proxy('complete_global_search'), source: this.proxy('complete_global_search'),
select: this.proxy('select_completion'), select: this.proxy('select_completion'),
+1 -1
View File
@@ -516,7 +516,7 @@ instance.web.ListView = instance.web.View.extend( /** @lends instance.web.ListVi
self.dataset.index = 0; self.dataset.index = 0;
} }
} else if (self.dataset.index >= self.records.length) { } else if (self.dataset.index >= self.records.length) {
self.dataset.index = 0; self.dataset.index = self.records.length ? 0 : null;
} }
self.compute_aggregates(); 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); 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)) { if (!_.isEmpty(self.dataset.ids) && (self.dataset.index === null || self.dataset.index >= self.dataset.ids.length)) {
self.dataset.index = 0; self.dataset.index = 0;
} else if (_.isEmpty(self.dataset.ids)){
self.dataset.index = null;
} }
self.do_add_groups([kgroup]).done(function() { self.do_add_groups([kgroup]).done(function() {
if (_.isEmpty(records)) { if (_.isEmpty(records)) {