[MERGE] forward port branch saas-14 up to 42f87c73fd

This commit is contained in:
Christophe Simonis
2018-08-08 17:58:05 +02:00
5 changed files with 19 additions and 2 deletions
@@ -115,7 +115,9 @@ var BarcodeEvents = core.Class.extend(mixins.PropertiesMixin, {
e.key === "ArrowUp" || e.key === "ArrowDown" ||
e.key === "Escape" || e.key === "Tab" ||
e.key === "Backspace" || e.key === "Delete" ||
/F\d\d?/.test(e.key)) {
e.key === "Home" || e.key === "End" ||
e.key === "PageUp" || e.key === "PageDown" ||
e.key === "Unidentified" || /F\d\d?/.test(e.key)) {
return true;
} else {
return false;
@@ -2,4 +2,4 @@ id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
challenge_officer,"Challenge Officer",gamification.model_gamification_challenge,hr.group_hr_user,1,1,1,1
challenge_line_officer,"Challenge Line Officer",gamification.model_gamification_challenge_line,hr.group_hr_user,1,1,1,1
badge_officer,"Badge Officer",gamification.model_gamification_badge,hr.group_hr_user,1,1,1,1
badge_user_officer,"Badge-user Officer",gamification.model_gamification_badge_user,hr.group_hr_user,1,1,1,1
badge_user_officer,"Badge-user Officer",gamification.model_gamification_badge_user,hr.group_hr_user,1,1,1,1
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
2 challenge_officer Challenge Officer gamification.model_gamification_challenge hr.group_hr_user 1 1 1 1
3 challenge_line_officer Challenge Line Officer gamification.model_gamification_challenge_line hr.group_hr_user 1 1 1 1
4 badge_officer Badge Officer gamification.model_gamification_badge hr.group_hr_user 1 1 1 1
5 badge_user_officer Badge-user Officer gamification.model_gamification_badge_user hr.group_hr_user 1 1 1 1 1
@@ -92,7 +92,10 @@ odoo.define('payment_stripe.stripe', function(require) {
so_id: so_id,
so_token: so_token
}, {'async': false}).then(function (data) {
var $pay_stripe = $('#pay_stripe').detach();
$form.html(data);
// Restore 'Pay Now' button HTML since data might have changed it.
$form.find('#pay_stripe').replaceWith($pay_stripe);
handler.open({
name: $("input[name='merchant']").val(),
email: $("input[name='email']").val(),
+5
View File
@@ -40,6 +40,11 @@ class StockMove(models.Model):
subtype_id=self.env.ref('mail.mt_note').id)
return result
def _prepare_move_split_vals(self, defaults):
defaults = super(StockMove, self)._prepare_move_split_vals(defaults)
defaults['to_refund_so'] = self.to_refund_so
return defaults
class StockPicking(models.Model):
_inherit = 'stock.picking'
+7
View File
@@ -935,6 +935,10 @@ class StockMove(models.Model):
new_move_prop = self.move_dest_id.split(qty)
new_move.write({'move_dest_id': new_move_prop})
def _prepare_move_split_vals(self, defaults):
# hook to add values in default vals in other modules
return defaults
@api.multi
def split(self, qty, restrict_lot_id=False, restrict_partner_id=False):
""" Splits qty from move move into a new move
@@ -964,6 +968,9 @@ class StockMove(models.Model):
'move_dest_id': self.move_dest_id.id,
'origin_returned_move_id': self.origin_returned_move_id.id,
}
defaults = self._prepare_move_split_vals(defaults)
if restrict_partner_id:
defaults['restrict_partner_id'] = restrict_partner_id