diff --git a/addons/account/models/account_move.py b/addons/account/models/account_move.py index c57de34eda6..be4be9d3918 100644 --- a/addons/account/models/account_move.py +++ b/addons/account/models/account_move.py @@ -1728,15 +1728,15 @@ class AccountPartialReconcile(models.Model): 'amount_currency': self.amount_currency and line.currency_id.round(-line.amount_currency * amount / line.balance) or 0.0, 'partner_id': line.partner_id.id, }) - if newly_created_move: - if move_date > (self.company_id.period_lock_date or '0000-00-00') and newly_created_move.date != move_date: - # The move date should be the maximum date between payment and invoice (in case - # of payment in advance). However, we should make sure the move date is not - # recorded before the period lock date as the tax statement for this period is - # probably already sent to the estate. - newly_created_move.write({'date': move_date}) - # post move - newly_created_move.post() + if newly_created_move: + if move_date > (self.company_id.period_lock_date or '0000-00-00') and newly_created_move.date != move_date: + # The move date should be the maximum date between payment and invoice (in case + # of payment in advance). However, we should make sure the move date is not + # recorded before the period lock date as the tax statement for this period is + # probably already sent to the estate. + newly_created_move.write({'date': move_date}) + # post move + newly_created_move.post() def _create_tax_basis_move(self): # Check if company_journal for cash basis is set if not, raise exception diff --git a/addons/product/models/product.py b/addons/product/models/product.py index 19f0fc50890..dec647c9566 100644 --- a/addons/product/models/product.py +++ b/addons/product/models/product.py @@ -230,7 +230,7 @@ class ProductProduct(models.Model): def _compute_partner_ref(self): for supplier_info in self.seller_ids: if supplier_info.name.id == self._context.get('partner_id'): - product_name = supplier_info.product_name or self.default_code + product_name = supplier_info.product_name or self.default_code or self.name self.partner_ref = '%s%s' % (self.code and '[%s] ' % self.code or '', product_name) break else: diff --git a/addons/purchase/views/purchase_views.xml b/addons/purchase/views/purchase_views.xml index 2bfa07c5ae6..d8982aed353 100644 --- a/addons/purchase/views/purchase_views.xml +++ b/addons/purchase/views/purchase_views.xml @@ -184,8 +184,8 @@
-