diff --git a/addons/account/models/account_move.py b/addons/account/models/account_move.py
index a47f232f3f2..413c2e39440 100644
--- a/addons/account/models/account_move.py
+++ b/addons/account/models/account_move.py
@@ -1443,7 +1443,7 @@ class AccountPartialReconcile(models.Model):
company_id = fields.Many2one('res.company', related='debit_move_id.company_id', store=True, string='Currency')
full_reconcile_id = fields.Many2one('account.full.reconcile', string="Full Reconcile", copy=False)
max_date = fields.Date(string='Max Date of Matched Lines', compute='_compute_max_date',
- readonly=True, copy=False, stored=True,
+ readonly=True, copy=False, store=True,
help='Technical field used to determine at which date this reconciliation needs to be shown on the aged receivable/payable reports.')
@api.multi
diff --git a/addons/l10n_in_hr_payroll/models/l10n_in_hr_payroll.py b/addons/l10n_in_hr_payroll/models/l10n_in_hr_payroll.py
index b31cf67f5d1..b52641ec3cb 100644
--- a/addons/l10n_in_hr_payroll/models/l10n_in_hr_payroll.py
+++ b/addons/l10n_in_hr_payroll/models/l10n_in_hr_payroll.py
@@ -73,6 +73,7 @@ class HrPayrollAdvice(models.Model):
self.env['hr.payroll.advice.line'].create({
'advice_id': advice.id,
'name': slip.employee_id.bank_account_id.acc_number,
+ 'ifsc_code': slip.employee_id.bank_account_id.bank_bic or '',
'employee_id': slip.employee_id.id,
'bysal': payslip_line.total
})
@@ -147,6 +148,7 @@ class HrPayslipRun(models.Model):
self.env['hr.payroll.advice.line'].create({
'advice_id': advice.id,
'name': slip.employee_id.bank_account_id.acc_number,
+ 'ifsc_code': slip.employee_id.bank_account_id.bank_bic or '',
'employee_id': slip.employee_id.id,
'bysal': payslip_line.total
})
diff --git a/addons/purchase/models/purchase.py b/addons/purchase/models/purchase.py
index f3387885915..cf7f0733f08 100644
--- a/addons/purchase/models/purchase.py
+++ b/addons/purchase/models/purchase.py
@@ -416,7 +416,7 @@ class PurchaseOrder(models.Model):
moves = order.order_line._create_stock_moves(picking)
moves = moves.filtered(lambda x: x.state not in ('done', 'cancel')).action_confirm()
seq = 0
- for move in moves:
+ for move in sorted(moves, key=lambda move: move.date_expected):
seq += 5
move.sequence = seq
moves.action_assign()
diff --git a/addons/purchase/views/purchase_views.xml b/addons/purchase/views/purchase_views.xml
index 36873d5daf6..2e280cedf12 100644
--- a/addons/purchase/views/purchase_views.xml
+++ b/addons/purchase/views/purchase_views.xml
@@ -574,7 +574,7 @@
+ attrs="{'required':[('purchase_line_warn','!=','no-message')],'readonly':[('purchase_line_warn','=','no-message')], 'invisible':[('purchase_line_warn','=','no-message')]}"/>
diff --git a/addons/sale/views/sale_views.xml b/addons/sale/views/sale_views.xml
index 1e163564f0f..783c9032801 100644
--- a/addons/sale/views/sale_views.xml
+++ b/addons/sale/views/sale_views.xml
@@ -640,7 +640,7 @@
+ attrs="{'required':[('sale_line_warn','!=','no-message')],'readonly':[('sale_line_warn','=','no-message')], 'invisible':[('sale_line_warn','=','no-message')]}"/>
diff --git a/addons/sale_stock/models/sale_order.py b/addons/sale_stock/models/sale_order.py
index fc5a51b6318..5c0c8091dbe 100644
--- a/addons/sale_stock/models/sale_order.py
+++ b/addons/sale_stock/models/sale_order.py
@@ -195,7 +195,7 @@ class SaleOrderLine(models.Model):
if move.location_dest_id.usage == "customer":
if not move.origin_returned_move_id:
qty += move.product_uom._compute_quantity(move.product_uom_qty, self.product_uom)
- elif move.location_dest_id.usage == "internal" and move.to_refund:
+ elif move.location_dest_id.usage != "customer" and move.to_refund:
qty -= move.product_uom._compute_quantity(move.product_uom_qty, self.product_uom)
return qty
diff --git a/addons/stock/models/product.py b/addons/stock/models/product.py
index 02adf13698e..dcd964a5df5 100644
--- a/addons/stock/models/product.py
+++ b/addons/stock/models/product.py
@@ -521,7 +521,7 @@ class ProductTemplate(models.Model):
def action_view_stock_moves(self):
products = self.mapped('product_variant_ids')
action = self.env.ref('stock.act_product_stock_move_open').read()[0]
- if self:
+ if products:
action['context'] = {'default_product_id': products.ids[0]}
action['domain'] = [('product_id.product_tmpl_id', 'in', self.ids)]
return action
diff --git a/addons/stock/models/stock_move.py b/addons/stock/models/stock_move.py
index 1530976de0a..e3c937d12bf 100644
--- a/addons/stock/models/stock_move.py
+++ b/addons/stock/models/stock_move.py
@@ -298,8 +298,11 @@ class StockMove(models.Model):
@api.constrains('product_uom')
def _check_uom(self):
- if any(move.product_id.uom_id.category_id.id != move.product_uom.category_id.id for move in self):
- raise UserError(_('You try to move a product using a UoM that is not compatible with the UoM of the product moved. Please use an UoM in the same UoM category.'))
+ moves_error = self.filtered(lambda move: move.product_id.uom_id.category_id.id != move.product_uom.category_id.id)
+ if moves_error:
+ user_warning = _('You try to move a product using a UoM that is not compatible with the UoM of the product moved. Please use an UoM in the same UoM category.')
+ user_warning += '\n\nBlocking: %s' % ' ,'.join(moves_error.mapped('name'))
+ raise UserError(user_warning)
@api.model_cr
def init(self):
diff --git a/addons/website_slides/data/demo-thumbnails/8DBabYQ1nUE.jpg b/addons/website_slides/data/demo-thumbnails/8DBabYQ1nUE.jpg
new file mode 100644
index 00000000000..2a4245bf9ba
Binary files /dev/null and b/addons/website_slides/data/demo-thumbnails/8DBabYQ1nUE.jpg differ
diff --git a/addons/website_slides/data/demo-thumbnails/QtIU0p8daAo.jpg b/addons/website_slides/data/demo-thumbnails/QtIU0p8daAo.jpg
new file mode 100644
index 00000000000..7db70d6aeb4
Binary files /dev/null and b/addons/website_slides/data/demo-thumbnails/QtIU0p8daAo.jpg differ
diff --git a/addons/website_slides/data/demo-thumbnails/VMuCr5_arsY.jpg b/addons/website_slides/data/demo-thumbnails/VMuCr5_arsY.jpg
new file mode 100644
index 00000000000..ca2ceb8e819
Binary files /dev/null and b/addons/website_slides/data/demo-thumbnails/VMuCr5_arsY.jpg differ
diff --git a/addons/website_slides/data/demo-thumbnails/Vp5xqQOWLzE.jpg b/addons/website_slides/data/demo-thumbnails/Vp5xqQOWLzE.jpg
new file mode 100644
index 00000000000..6f692064738
Binary files /dev/null and b/addons/website_slides/data/demo-thumbnails/Vp5xqQOWLzE.jpg differ
diff --git a/addons/website_slides/data/demo-thumbnails/fgdz8MH2YHY.jpg b/addons/website_slides/data/demo-thumbnails/fgdz8MH2YHY.jpg
new file mode 100644
index 00000000000..19be3967af2
Binary files /dev/null and b/addons/website_slides/data/demo-thumbnails/fgdz8MH2YHY.jpg differ
diff --git a/addons/website_slides/data/demo-thumbnails/sDxfUTd-gs0.jpg b/addons/website_slides/data/demo-thumbnails/sDxfUTd-gs0.jpg
new file mode 100644
index 00000000000..38a695d6910
Binary files /dev/null and b/addons/website_slides/data/demo-thumbnails/sDxfUTd-gs0.jpg differ
diff --git a/addons/website_slides/data/demo-thumbnails/tUx39vAENy0.jpg b/addons/website_slides/data/demo-thumbnails/tUx39vAENy0.jpg
new file mode 100644
index 00000000000..223b7a47e0b
Binary files /dev/null and b/addons/website_slides/data/demo-thumbnails/tUx39vAENy0.jpg differ
diff --git a/addons/website_slides/data/demo-thumbnails/v2O0YZU19ms.jpg b/addons/website_slides/data/demo-thumbnails/v2O0YZU19ms.jpg
new file mode 100644
index 00000000000..4cf84bcdd0c
Binary files /dev/null and b/addons/website_slides/data/demo-thumbnails/v2O0YZU19ms.jpg differ
diff --git a/addons/website_slides/data/website_slides_demo.xml b/addons/website_slides/data/website_slides_demo.xml
index eb47562e18d..39e91d3b73f 100644
--- a/addons/website_slides/data/website_slides_demo.xml
+++ b/addons/website_slides/data/website_slides_demo.xml
@@ -28,66 +28,111 @@
Odoo MRP
https://www.youtube.com/watch?v=QtIU0p8daAo
+ QtIU0p8daAo
+ video
+
+ Discover how you can integrate MRP, PLM, Quality and Maintenance in a single application to maximize the efficiency of your manufacturing operations.
+
+Read more about the features at: https://www.odoo.com/page/manufacturing-features
+
+Discover Odoo MRP: https://www.odoo.com/page/manufacturing
Odoo CRM
https://www.youtube.com/watch?v=fgdz8MH2YHY
+ fgdz8MH2YHY
+ video
+
+ Discover the CRM sales people love https://www.odoo.com/page/crm
Odoo All-in-One Software Demonstration
https://www.youtube.com/watch?v=tUx39vAENy0
+ tUx39vAENy0
+ video
+
+ Discover the all-in-one business management software solution that fits any business size and use case.
+
+Learn more at https://odoo.com
Odoo Sign Demonstration
https://www.youtube.com/watch?v=8DBabYQ1nUE
+ 8DBabYQ1nUE
+ video
+
+ Stop doing manual printing and scanning. Move to electronic signature with Odoo Sign!
+
+Discover more at https://www.odoo.com/page/sign
Awesome Timesheet by Odoo
https://www.youtube.com/watch?v=v2O0YZU19ms
+ v2O0YZU19ms
+ video
+
+ Download Awesome Timesheet by Odoo and discover how easy time tracking and employee management can be!
+
+Chrome: http://bit.ly/2613LcY
+iOS: http://bit.ly/1ZUZsZD
Odoo Marketing
https://www.youtube.com/watch?v=sDxfUTd-gs0
+ sDxfUTd-gs0
+ video
+
+ Discover how easy marketing your business can be with Odoo
Odoo Inventory
https://www.youtube.com/watch?v=Vp5xqQOWLzE
+ Vp5xqQOWLzE
+ video
+
+ Warehouse management software for the 21st century.
+
+Discover Odoo Inventory: https://www.odoo.com/page/warehouse
Odoo Sales
https://www.youtube.com/watch?v=VMuCr5_arsY
+ VMuCr5_arsY
+ video
+
+ Learn more at https://www.odoo.com/page/sales
diff --git a/addons/website_slides/models/slides.py b/addons/website_slides/models/slides.py
index 7a0ee51caf1..ee65b15734b 100644
--- a/addons/website_slides/models/slides.py
+++ b/addons/website_slides/models/slides.py
@@ -382,7 +382,7 @@ class Slide(models.Model):
values['image'] = values['datas']
if values.get('website_published') and not values.get('date_published'):
values['date_published'] = datetime.datetime.now()
- if values.get('url'):
+ if values.get('url') and not values.get('document_id'):
doc_data = self._parse_document_url(values['url']).get('values', dict())
for key, value in pycompat.items(doc_data):
values.setdefault(key, value)
@@ -396,7 +396,7 @@ class Slide(models.Model):
@api.multi
def write(self, values):
- if values.get('url'):
+ if values.get('url') and values['url'] != self.url:
doc_data = self._parse_document_url(values['url']).get('values', dict())
for key, value in pycompat.items(doc_data):
values.setdefault(key, value)
diff --git a/odoo/exceptions.py b/odoo/exceptions.py
index 1facc6207cb..c318f9ecdac 100644
--- a/odoo/exceptions.py
+++ b/odoo/exceptions.py
@@ -30,7 +30,7 @@ class except_orm(Exception):
class UserError(except_orm):
def __init__(self, msg):
- super(UserError, self).__init__(msg)
+ super(UserError, self).__init__(msg, value='')
# deprecated due to collision with builtins, kept for compatibility