[MERGE] forward port branch saas-6 up to 2317801ddb
This commit is contained in:
@@ -149,7 +149,7 @@ class AccountAccount(models.Model):
|
||||
@api.one
|
||||
def copy(self, default=None):
|
||||
default = dict(default or {})
|
||||
default.update(code=_("%s (copy)") % (self.code or ''))
|
||||
default.setdefault('code', _("%s (copy)") % (self.code or ''))
|
||||
return super(AccountAccount, self).copy(default)
|
||||
|
||||
@api.multi
|
||||
|
||||
@@ -242,7 +242,7 @@
|
||||
<filter string="Unread Messages" name="message_needaction" domain="[('message_needaction','=',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/>
|
||||
|
||||
@@ -12,18 +12,17 @@ from openerp.tools.safe_eval import safe_eval as eval
|
||||
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,
|
||||
}
|
||||
|
||||
|
||||
@@ -397,7 +396,7 @@ class MailComposer(models.TransientModel):
|
||||
# generate the saved template
|
||||
record.write({'template_id': template.id})
|
||||
record.onchange_template_id_wrapper()
|
||||
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 9.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2015-09-18 08:11+0000\n"
|
||||
"PO-Revision-Date: 2015-09-18 08:11+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
|
||||
#: code:addons/payment_transfer/models/payment_acquirer.py:68
|
||||
#, python-format
|
||||
|
||||
@@ -29,13 +29,13 @@ class TransferPaymentAcquirer(osv.Model):
|
||||
accounts = self.pool['account.journal'].browse(cr, uid, journal_ids, context=context).mapped('bank_account_id').name_get()
|
||||
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,
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ class make_procurement(osv.osv_memory):
|
||||
'location_id': wh.lot_stock_id.id,
|
||||
'company_id': wh.company_id.id,
|
||||
'route_ids': [(6, 0, proc.route_ids.ids)],
|
||||
})
|
||||
}, context=context)
|
||||
procurement_obj.signal_workflow(cr, uid, [procure_id], 'button_confirm')
|
||||
|
||||
id2 = data_obj._get_id(cr, uid, 'procurement', 'procurement_tree_view')
|
||||
|
||||
@@ -1113,6 +1113,7 @@ var FieldReference = common.AbstractField.extend(common.ReinitializeFieldMixin,
|
||||
this.m2o = new 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
@@ -748,10 +748,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