[MERGE] forward port of branch 9.0 up to 4d8ddab
This commit is contained in:
@@ -201,7 +201,7 @@ exports.PosModel = Backbone.Model.extend({
|
||||
},
|
||||
},{
|
||||
model: 'account.tax',
|
||||
fields: ['name','amount', 'price_include', 'include_base_amount', 'amount_type'],
|
||||
fields: ['name','amount', 'price_include', 'include_base_amount', 'amount_type', 'children_tax_ids'],
|
||||
domain: null,
|
||||
loaded: function(self, taxes){
|
||||
self.taxes = taxes;
|
||||
@@ -210,9 +210,8 @@ exports.PosModel = Backbone.Model.extend({
|
||||
self.taxes_by_id[tax.id] = tax;
|
||||
});
|
||||
_.each(self.taxes_by_id, function(tax) {
|
||||
tax.child_taxes = {};
|
||||
_.each(tax.child_ids, function(child_tax_id) {
|
||||
tax.child_taxes[child_tax_id] = self.taxes_by_id[child_tax_id];
|
||||
tax.children_tax_ids = _.map(tax.children_tax_ids, function (child_tax_id) {
|
||||
return self.taxes_by_id[child_tax_id];
|
||||
});
|
||||
});
|
||||
},
|
||||
@@ -1351,7 +1350,7 @@ exports.Orderline = Backbone.Model.extend({
|
||||
total_excluded = ret.total_excluded;
|
||||
base = ret.total_excluded;
|
||||
total_included = ret.total_included;
|
||||
list_taxes.concat(ret.taxes);
|
||||
list_taxes = list_taxes.concat(ret.taxes);
|
||||
}
|
||||
else {
|
||||
var tax_amount = self._compute_all(tax, base, quantity);
|
||||
|
||||
@@ -6,7 +6,6 @@ var utils = require('web.utils');
|
||||
var Widget = require('web.Widget');
|
||||
|
||||
var round_di = utils.round_decimals;
|
||||
var round_pr = utils.round_precision;
|
||||
|
||||
// This is a base class for all Widgets in the POS. It exposes relevant data to the
|
||||
// templates :
|
||||
@@ -43,11 +42,6 @@ var PosBaseWidget = Widget.extend({
|
||||
decimals = this.pos.dp[precision];
|
||||
}
|
||||
|
||||
this.format_currency_no_symbol = function(amount){
|
||||
amount = round_pr(amount,currency.rounding);
|
||||
amount = amount.toFixed(decimals);
|
||||
return amount;
|
||||
};
|
||||
if (typeof amount === 'number') {
|
||||
amount = round_di(amount,decimals).toFixed(decimals);
|
||||
amount = formats.format_value(round_di(amount, decimals), { type: 'float', digits: [69, decimals]});
|
||||
|
||||
@@ -822,6 +822,12 @@ class ProcurementOrder(models.Model):
|
||||
vals = procurement._prepare_purchase_order(partner)
|
||||
po = self.env['purchase.order'].create(vals)
|
||||
cache[domain] = po
|
||||
elif not po.origin or procurement.origin not in po.origin.split(', '):
|
||||
# Keep track of all procurements
|
||||
if po.origin:
|
||||
po.write({'origin': po.origin + ', ' + procurement.origin})
|
||||
else:
|
||||
po.write({'origin': procurement.origin})
|
||||
res += po.ids
|
||||
|
||||
# Create Line
|
||||
|
||||
@@ -1186,6 +1186,12 @@ msgstr ""
|
||||
msgid "Corridor (X)"
|
||||
msgstr ""
|
||||
|
||||
#. module: stock
|
||||
#: code:addons/stock/wizard/stock_immediate_transfer.py:31
|
||||
#, python-format
|
||||
msgid "Could not reserve all requested products. Please use the 'Mark as Todo' button to handle the reservation manually."
|
||||
msgstr ""
|
||||
|
||||
#. module: stock
|
||||
#: model:ir.ui.view,arch_db:stock.view_backorder_confirmation
|
||||
msgid "Create Backorder"
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
from openerp import models, fields, api
|
||||
from openerp import models, fields, api, _
|
||||
from openerp.tools import float_compare
|
||||
from openerp.exceptions import UserError
|
||||
|
||||
class stock_immediate_transfer(models.TransientModel):
|
||||
_name = 'stock.immediate.transfer'
|
||||
@@ -26,6 +27,8 @@ class stock_immediate_transfer(models.TransientModel):
|
||||
self.pick_id.action_confirm()
|
||||
if self.pick_id.state != 'assigned':
|
||||
self.pick_id.action_assign()
|
||||
if self.pick_id.state != 'assigned':
|
||||
raise UserError(_("Could not reserve all requested products. Please use the \'Mark as Todo\' button to handle the reservation manually."))
|
||||
for pack in self.pick_id.pack_operation_ids:
|
||||
if pack.product_qty > 0:
|
||||
pack.write({'qty_done': pack.product_qty})
|
||||
|
||||
Reference in New Issue
Block a user