[MERGE] forward port branch 8.0 up to 638989b84e
This commit is contained in:
@@ -652,7 +652,7 @@ class account_account(osv.osv):
|
||||
done_list = []
|
||||
account = self.browse(cr, uid, id, context=context)
|
||||
new_child_ids = []
|
||||
default.update(code=_("%s (copy)") % (account['code'] or ''))
|
||||
default.setdefault('code', _("%s (copy)") % (account['code'] or ''))
|
||||
if not local:
|
||||
done_list = []
|
||||
if account.id in done_list:
|
||||
|
||||
@@ -231,7 +231,7 @@
|
||||
<filter string="Unread Messages" name="message_unread" domain="[('message_unread','=',True)]"/>
|
||||
<separator/>
|
||||
<filter string="Unconfirmed" name="draft" domain="[('state','=','draft')]" help="Events in New state"/>
|
||||
<filter string="Confirmed" domain="[('state','=','confirm')]" help="Confirmed events"/>
|
||||
<filter name="confirm" string="Confirmed" domain="[('state','=','confirm')]" help="Confirmed events"/>
|
||||
<separator/>
|
||||
<filter string="My Events" help="My Events" domain="[('user_id','=',uid)]"/>
|
||||
<separator/>
|
||||
|
||||
@@ -33,18 +33,17 @@ from openerp.tools.translate import _
|
||||
EXPRESSION_PATTERN = re.compile('(\$\{.+?\})')
|
||||
|
||||
|
||||
def _reopen(self, res_id, model):
|
||||
def _reopen(self, res_id, model, context=None):
|
||||
# save original model in context, because selecting the list of available
|
||||
# templates requires a model in context
|
||||
context = dict(context or {}, default_model=model)
|
||||
return {'type': 'ir.actions.act_window',
|
||||
'view_mode': 'form',
|
||||
'view_type': 'form',
|
||||
'res_id': res_id,
|
||||
'res_model': self._name,
|
||||
'target': 'new',
|
||||
# save original model in context, because selecting the list of available
|
||||
# templates requires a model in context
|
||||
'context': {
|
||||
'default_model': model,
|
||||
},
|
||||
'context': context,
|
||||
}
|
||||
|
||||
|
||||
@@ -428,7 +427,7 @@ class mail_compose_message(osv.TransientModel):
|
||||
template_values = record.onchange_template_id(template_id, record.composition_mode, record.model, record.res_id)['value']
|
||||
template_values['template_id'] = template_id
|
||||
record.write(template_values)
|
||||
return _reopen(self, record.id, record.model)
|
||||
return _reopen(self, record.id, record.model, context=context)
|
||||
|
||||
#------------------------------------------------------
|
||||
# Template rendering
|
||||
|
||||
@@ -6,8 +6,8 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 8.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2015-09-05 12:00+0000\n"
|
||||
"PO-Revision-Date: 2015-09-05 12:00+0000\n"
|
||||
"POT-Creation-Date: 2016-12-14 14:52+0000\n"
|
||||
"PO-Revision-Date: 2016-12-14 14:52+0000\n"
|
||||
"Last-Translator: <>\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
@@ -15,6 +15,18 @@ msgstr ""
|
||||
"Content-Transfer-Encoding: \n"
|
||||
"Plural-Forms: \n"
|
||||
|
||||
#. module: payment_transfer
|
||||
#: code:addons/payment_transfer/models/payment_acquirer.py:32
|
||||
#, python-format
|
||||
msgid "<div>\n"
|
||||
"<h3>Please use the following transfer details</h3>\n"
|
||||
"<h4>%(bank_title)s</h4>\n"
|
||||
"%(bank_accounts)s\n"
|
||||
"<h4>Communication</h4>\n"
|
||||
"<p>Please use the order name as communication reference.</p>\n"
|
||||
"</div>"
|
||||
msgstr ""
|
||||
|
||||
#. module: payment_transfer
|
||||
#: model:payment.acquirer,pre_msg:payment_transfer.payment_acquirer_transfer
|
||||
msgid "<p>Transfer information will be provided after choosing the payment mode.</p>\n"
|
||||
@@ -45,6 +57,7 @@ msgstr ""
|
||||
|
||||
#. module: payment_transfer
|
||||
#: code:addons/payment_transfer/models/payment_acquirer.py:19
|
||||
#: model:payment.acquirer,name:payment_transfer.payment_acquirer_transfer
|
||||
#, python-format
|
||||
msgid "Wire Transfer"
|
||||
msgstr ""
|
||||
|
||||
@@ -29,13 +29,13 @@ class TransferPaymentAcquirer(osv.Model):
|
||||
accounts = self.pool['res.partner.bank'].name_get(cr, uid, bank_ids, context=context)
|
||||
bank_title = _('Bank Accounts') if len(accounts) > 1 else _('Bank Account')
|
||||
bank_accounts = ''.join(['<ul>'] + ['<li>%s</li>' % name for id, name in accounts] + ['</ul>'])
|
||||
post_msg = '''<div>
|
||||
post_msg = _('''<div>
|
||||
<h3>Please use the following transfer details</h3>
|
||||
<h4>%(bank_title)s</h4>
|
||||
%(bank_accounts)s
|
||||
<h4>Communication</h4>
|
||||
<p>Please use the order name as communication reference.</p>
|
||||
</div>''' % {
|
||||
</div>''') % {
|
||||
'bank_title': bank_title,
|
||||
'bank_accounts': bank_accounts,
|
||||
}
|
||||
|
||||
@@ -78,7 +78,7 @@ class make_procurement(osv.osv_memory):
|
||||
'warehouse_id': proc.warehouse_id.id,
|
||||
'location_id': wh.lot_stock_id.id,
|
||||
'company_id': wh.company_id.id,
|
||||
})
|
||||
}, context=context)
|
||||
procurement_obj.signal_workflow(cr, uid, [procure_id], 'button_confirm')
|
||||
|
||||
id2 = data_obj._get_id(cr, uid, 'procurement', 'procurement_tree_view')
|
||||
|
||||
@@ -5612,6 +5612,7 @@ instance.web.form.FieldReference = instance.web.form.AbstractField.extend(instan
|
||||
this.m2o = new instance.web.form.FieldMany2One(fm, { attrs: {
|
||||
name: 'Referenced Document',
|
||||
modifiers: JSON.stringify({readonly: this.get('effective_readonly')}),
|
||||
context: this.build_context().eval(),
|
||||
}});
|
||||
this.m2o.on("change:value", this, this.data_changed);
|
||||
this.m2o.appendTo(this.$(".oe_form_view_reference_m2o"));
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
Denmark, 2016-05-06
|
||||
|
||||
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,
|
||||
|
||||
Hans Henrik Gabelgaard hhg@gabelgaard.org https://github.com/hhgabelgaard
|
||||
+4
-3
@@ -741,10 +741,11 @@ class BaseModel(object):
|
||||
methods = []
|
||||
for attr, func in getmembers(cls, is_constraint):
|
||||
for name in func._constrains:
|
||||
if name not in cls._fields:
|
||||
field = cls._fields.get(name)
|
||||
if not field:
|
||||
_logger.warning("method %s.%s: @constrains parameter %r is not a field name", cls._name, attr, name)
|
||||
if not cls._fields[name].store:
|
||||
_logger.warning("method %s.%s: @constrains parameter %r is not stored", cls._name, attr, name)
|
||||
if not (field.store or field.column and field.column._fnct_inv):
|
||||
_logger.warning("method %s.%s: @constrains parameter %r is not writeable", cls._name, attr, name)
|
||||
methods.append(func)
|
||||
|
||||
# optimization: memoize result on cls, it will not be recomputed
|
||||
|
||||
Reference in New Issue
Block a user