[MERGE] forward port branch saas-15 up to c4ee29345a

This commit is contained in:
Christophe Simonis
2018-07-23 15:45:08 +02:00
5 changed files with 15 additions and 17 deletions
+9 -9
View File
@@ -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
+1 -1
View File
@@ -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:
+4 -4
View File
@@ -184,8 +184,8 @@
</button>
</div>
<div class="oe_title">
<label string="Request for Quotation " attrs="{'invisible': [('state','not in',('draft','sent','bid'))]}"/>
<label string="Purchase Order " attrs="{'invisible': [('state','in',('draft','sent','bid'))]}"/>
<label string="Request for Quotation " attrs="{'invisible': [('state','not in',('draft','sent'))]}"/>
<label string="Purchase Order " attrs="{'invisible': [('state','in',('draft','sent'))]}"/>
<h1>
<field name="name" readonly="1"/>
</h1>
@@ -412,7 +412,7 @@
<field name="type">ir.actions.act_window</field>
<field name="res_model">purchase.order</field>
<field name="context">{'search_default_todo':1, 'show_purchase': False}</field>
<field name="domain">[('state','in',('draft','sent','bid','cancel', 'confirmed'))]</field>
<field name="domain">[('state','in',('draft','sent','cancel', 'confirmed'))]</field>
<field name="view_mode">tree,kanban,form,pivot,graph,calendar</field>
<field name="search_view_id" ref="view_purchase_order_filter"/>
<field name="help" type="html">
@@ -438,7 +438,7 @@
<field name="res_model">purchase.order</field>
<field name="view_mode">tree,kanban,form,pivot,graph,calendar</field>
<field name="context">{'search_default_todo':1, 'show_purchase': True}</field>
<field name="domain">[('state','not in',('draft','sent','bid', 'confirmed'))]</field>
<field name="domain">[('state','not in',('draft','sent', 'confirmed'))]</field>
<field name="search_view_id" ref="view_purchase_order_filter"/>
<field name="help" type="html">
<p class="oe_view_nocontent_create">
-2
View File
@@ -71,8 +71,6 @@ This means the first *group rule* restricts access, but any further
.. warning:: record rules do not apply to the Administrator user
:class: aphorism
although access rules do
.. _reference/security/fields:
Field Access
+1 -1
View File
@@ -393,7 +393,7 @@ def load_modules(db, force_demo=False, status=None, update_module=False):
cr.execute("""select model,name from ir_model where id NOT IN (select distinct model_id from ir_model_access)""")
for (model, name) in cr.fetchall():
if model in registry and not registry[model]._abstract and not registry[model]._transient:
_logger.warning('The model %s has no access rules, consider adding one. E.g. access_%s,access_%s,model_%s,,1,0,0,0',
_logger.warning('The model %s has no access rules, consider adding one. E.g. access_%s,access_%s,model_%s,base.group_user,1,0,0,0',
model, model.replace('.', '_'), model.replace('.', '_'), model.replace('.', '_'))
# Temporary warning while we remove access rights on osv_memory objects, as they have