[MERGE] forward port branch saas-11.3 up to 728bb2a28e
This commit is contained in:
@@ -33,7 +33,7 @@ class AccountAnalyticLine(models.Model):
|
||||
# Compute based on pricetype
|
||||
amount_unit = self.product_id.price_compute('standard_price', uom=unit)[self.product_id.id]
|
||||
amount = amount_unit * self.unit_amount or 0.0
|
||||
result = self.currency_id.round(amount) * -1
|
||||
result = (self.currency_id.round(amount) if self.currency_id else round(amount, 2)) * -1
|
||||
self.amount = result
|
||||
self.general_account_id = account
|
||||
self.product_uom_id = unit
|
||||
|
||||
@@ -15,7 +15,7 @@ class FleetVehicle(models.Model):
|
||||
|
||||
def _get_default_state(self):
|
||||
state = self.env.ref('fleet.fleet_vehicle_state_registered', raise_if_not_found=False)
|
||||
return state and state.id or False
|
||||
return state if state and state.id else False
|
||||
|
||||
name = fields.Char(compute="_compute_vehicle_name", store=True)
|
||||
active = fields.Boolean('Active', default=True, track_visibility="onchange")
|
||||
|
||||
@@ -264,7 +264,7 @@ class AccountFrFec(models.TransientModel):
|
||||
for row in self._cr.fetchall():
|
||||
listrow = list(row)
|
||||
account_id = listrow.pop()
|
||||
w.writerow([s.encode("utf-8") for s in listrow])
|
||||
w.writerow(listrow)
|
||||
|
||||
# LINES
|
||||
sql_query = '''
|
||||
|
||||
@@ -502,7 +502,7 @@ class MrpProduction(models.Model):
|
||||
move[0].with_context(do_not_unreserve=True).write({'product_uom_qty': quantity})
|
||||
move[0]._recompute_state()
|
||||
move[0]._action_assign()
|
||||
move.unit_factor = quantity / move.raw_material_production_id.product_qty
|
||||
move[0].unit_factor = quantity / move[0].raw_material_production_id.product_qty
|
||||
elif quantity < 0: # Do not remove 0 lines
|
||||
if move[0].quantity_done > 0:
|
||||
raise UserError(_('Lines need to be deleted, but can not as you still have some quantities to consume in them. '))
|
||||
|
||||
@@ -84,13 +84,14 @@ class AuthorizeController(http.Controller):
|
||||
'id': token.id,
|
||||
'short_name': token.short_name,
|
||||
'3d_secure': False,
|
||||
'verified': False,
|
||||
'verified': True, #Authorize.net does a transaction type of Authorization Only
|
||||
#As Authorize.net already verify this card, we do not verify this card again.
|
||||
}
|
||||
|
||||
if verify_validity != False:
|
||||
token.validate()
|
||||
res['verified'] = token.verified
|
||||
|
||||
#token.validate() don't work with Authorize.net.
|
||||
#Payments made via Authorize.net are settled and allowed to be refunded only on the next day.
|
||||
#https://account.authorize.net/help/Miscellaneous/FAQ/Frequently_Asked_Questions.htm#Refund
|
||||
#<quote>The original transaction that you wish to refund must have a status of Settled Successfully.
|
||||
#You cannot issue refunds against unsettled, voided, declined or errored transactions.</quote>
|
||||
return res
|
||||
|
||||
@http.route(['/payment/authorize/s2s/create'], type='http', auth='public')
|
||||
|
||||
@@ -85,6 +85,11 @@ msgid "<div style=\"margin: 0px; padding: 0px;\">\n"
|
||||
" Best regards,\n"
|
||||
" </p>\n"
|
||||
"</div>"
|
||||
"<p style=\"color:#888888;\">\n"
|
||||
"% if object.sudo().create_uid and object.sudo().create_uid.signature:\n"
|
||||
" ${object.sudo().create_uid.signature | safe}\n"
|
||||
"% endif\n"
|
||||
"</p>\n"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
|
||||
@@ -369,6 +369,16 @@ class PurchaseOrder(models.Model):
|
||||
'currency_id': currency.id,
|
||||
'delay': 0,
|
||||
}
|
||||
# In case the order partner is a contact address, a new supplierinfo is created on
|
||||
# the parent company. In this case, we keep the product name and code.
|
||||
seller = line.product_id._select_seller(
|
||||
partner_id=line.partner_id,
|
||||
quantity=line.product_qty,
|
||||
date=line.order_id.date_order and line.order_id.date_order[:10],
|
||||
uom_id=line.product_uom)
|
||||
if seller:
|
||||
supplierinfo['product_name'] = seller.product_name
|
||||
supplierinfo['product_code'] = seller.product_code
|
||||
vals = {
|
||||
'seller_ids': [(0, 0, supplierinfo)],
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ class SaleOrderLine(models.Model):
|
||||
if line.qty_delivered_method == 'stock_move':
|
||||
# In the case of a kit, we need to check if all components are shipped. Since the BOM might
|
||||
# have changed, we don't compute the quantities but verify the move state.
|
||||
bom = self.env['mrp.bom']._bom_find(product=line.product_id)
|
||||
bom = self.env['mrp.bom']._bom_find(product=line.product_id, company_id=line.company_id.id)
|
||||
if bom and bom.type == 'phantom':
|
||||
moves = line.move_ids.filtered(lambda m: m.picking_id and m.picking_id.state != 'cancel')
|
||||
bom_delivered = all([move.state == 'done' for move in moves])
|
||||
|
||||
@@ -7,6 +7,7 @@ var Dialog = require('web.Dialog');
|
||||
var fieldUtils = require('web.field_utils');
|
||||
var mixins = require('web.mixins');
|
||||
var testUtils = require('web.test_utils');
|
||||
var time = require('web.time');
|
||||
var session = require('web.session');
|
||||
|
||||
var createActionManager = testUtils.createActionManager;
|
||||
|
||||
@@ -665,6 +665,10 @@ var SnippetsMenu = Widget.extend({
|
||||
class: 'oe_drop_zone oe_insert',
|
||||
});
|
||||
|
||||
function isFullWidth($elem) {
|
||||
return $elem.parent().width() === $elem.outerWidth(true);
|
||||
}
|
||||
|
||||
if ($selectorChildren) {
|
||||
$selectorChildren.each(function () {
|
||||
var $zone = $(this);
|
||||
@@ -685,7 +689,10 @@ var SnippetsMenu = Widget.extend({
|
||||
display: 'inline-block',
|
||||
});
|
||||
} else if (float === 'left' || float === 'right' || (parentDisplay === 'flex' && parentFlex === 'row')) {
|
||||
$drop.addClass('oe_vertical').css('height', Math.max(Math.min($zone.outerHeight(), $zone.children().last().outerHeight()), 30));
|
||||
$drop.css('float', float);
|
||||
if (!isFullWidth($zone)) {
|
||||
$drop.addClass('oe_vertical').css('height', Math.max(Math.min($zone.outerHeight(), $zone.children().last().outerHeight()), 30));
|
||||
}
|
||||
}
|
||||
|
||||
$drop = $drop.clone();
|
||||
@@ -700,7 +707,10 @@ var SnippetsMenu = Widget.extend({
|
||||
display: 'inline-block'
|
||||
});
|
||||
} else if (float === 'left' || float === 'right' || (parentDisplay === 'flex' && parentFlex === 'row')) {
|
||||
$drop.addClass('oe_vertical').css('height', Math.max(Math.min($zone.outerHeight(), $zone.children().first().outerHeight()), 30));
|
||||
$drop.css('float', float);
|
||||
if (!isFullWidth($zone)) {
|
||||
$drop.addClass('oe_vertical').css('height', Math.max(Math.min($zone.outerHeight(), $zone.children().first().outerHeight()), 30));
|
||||
}
|
||||
}
|
||||
if (test) {
|
||||
$drop.css({'float': 'none', 'display': 'inline-block'});
|
||||
@@ -724,14 +734,20 @@ var SnippetsMenu = Widget.extend({
|
||||
if ($zone.prev('.oe_drop_zone:visible').length === 0) {
|
||||
$drop = zone_template.clone();
|
||||
if (float === 'left' || float === 'right' || (parentDisplay === 'flex' && parentFlex === 'row')) {
|
||||
$drop.addClass('oe_vertical').css('height', Math.max(Math.min($zone.outerHeight(), $zone.prev().outerHeight() || Infinity), 30));
|
||||
$drop.css('float', float);
|
||||
if (!isFullWidth($zone)) {
|
||||
$drop.addClass('oe_vertical').css('height', Math.max(Math.min($zone.outerHeight(), $zone.prev().outerHeight() || Infinity), 30));
|
||||
}
|
||||
}
|
||||
$zone.before($drop);
|
||||
}
|
||||
if ($zone.next('.oe_drop_zone:visible').length === 0) {
|
||||
$drop = zone_template.clone();
|
||||
if (float === 'left' || float === 'right' || (parentDisplay === 'flex' && parentFlex === 'row')) {
|
||||
$drop.addClass('oe_vertical').css('height', Math.max(Math.min($zone.outerHeight(), $zone.next().outerHeight() || Infinity), 30));
|
||||
$drop.css('float', float);
|
||||
if (!isFullWidth($zone)) {
|
||||
$drop.addClass('oe_vertical').css('height', Math.max(Math.min($zone.outerHeight(), $zone.next().outerHeight() || Infinity), 30));
|
||||
}
|
||||
}
|
||||
$zone.after($drop);
|
||||
}
|
||||
|
||||
@@ -276,12 +276,12 @@ html[lang] > body.editor_enable [data-oe-translation-state] {
|
||||
}
|
||||
|
||||
&.oe_vertical {
|
||||
border: 2px dashed $o-brand-odoo;
|
||||
border: $o-we-dropzone-border;
|
||||
border-left: none;
|
||||
border-right: none;
|
||||
|
||||
width: $o-we-dropzone-size;
|
||||
float: left;
|
||||
height: 100%;
|
||||
margin: 0 (-$o-we-dropzone-size/2);
|
||||
|
||||
&:after {
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
South Africa, 05/02/2019
|
||||
|
||||
I hereby agree to the terms of the Odoo Individual Contributor License
|
||||
Agreement v1.0.
|
||||
|
||||
I declare that I am authorized and able to make this agreement and sign this
|
||||
declaration.
|
||||
|
||||
Signed,
|
||||
|
||||
Carel van Dam carelvdam@gmail.com https://github.com/carelvd
|
||||
Reference in New Issue
Block a user