[MERGE] forward port branch saas-14 up to d8c6e56975

This commit is contained in:
Christophe Simonis
2018-03-22 14:13:59 +01:00
4 changed files with 11 additions and 8 deletions
+1 -1
View File
@@ -994,7 +994,7 @@ class StockMove(models.Model):
'views': [(view.id, 'form')], 'views': [(view.id, 'form')],
'view_id': view.id, 'view_id': view.id,
'target': 'new', 'target': 'new',
'res_id': self.id} 'res_id': self.picking_id.id}
show_picking = action_show_picking show_picking = action_show_picking
# Quants management # Quants management
+2 -2
View File
@@ -201,8 +201,8 @@ class ProductProduct(models.Model):
@api.model @api.model
def _get_anglo_saxon_price_unit(self, uom=False): def _get_anglo_saxon_price_unit(self, uom=False):
price = self.standard_price price = self.standard_price
if not uom or self.uom_id.id == uom.id: if not self or not uom or self.uom_id.id == uom.id:
return price return price or 0.0
return self.uom_id._compute_price(price, uom) return self.uom_id._compute_price(price, uom)
+3 -5
View File
@@ -40,6 +40,7 @@ from odoo.http import content_disposition, dispatch_rpc, request, \
from odoo.exceptions import AccessError, UserError from odoo.exceptions import AccessError, UserError
from odoo.models import check_method_name from odoo.models import check_method_name
from odoo.service import db from odoo.service import db
from odoo.service.report import exp_report, exp_report_get
_logger = logging.getLogger(__name__) _logger = logging.getLogger(__name__)
@@ -1483,14 +1484,11 @@ class Reports(http.Controller):
report_ids = action['datas'].pop('ids') report_ids = action['datas'].pop('ids')
report_data.update(action['datas']) report_data.update(action['datas'])
report_id = dispatch_rpc('report', 'report', [ report_id = exp_report(request.session.db, request.session.uid, action["report_name"], report_ids, report_data, context)
request.session.db, request.session.uid, request.session.password,
action["report_name"], report_ids, report_data, context])
report_struct = None report_struct = None
while True: while True:
report_struct = dispatch_rpc('report', 'report_get', [ report_struct = exp_report_get(request.session.db, request.session.uid, report_id)
request.session.db, request.session.uid, request.session.password, report_id])
if report_struct["state"]: if report_struct["state"]:
break break
@@ -1118,6 +1118,11 @@ var One2ManyListView = X2ManyListView.extend({
self.x2m.reload_current_view(); self.x2m.reload_current_view();
}); });
}, },
create_function: function(data, options) {
return self.x2m.data_create(data, options).done(function() {
self.x2m.reload_current_view();
});
},
alternative_form_view: self.x2m.field.views ? self.x2m.field.views.form : undefined, alternative_form_view: self.x2m.field.views ? self.x2m.field.views.form : undefined,
parent_view: self.x2m.view, parent_view: self.x2m.view,
child_name: self.x2m.name, child_name: self.x2m.name,