[MERGE] forward port branch 9.0 up to bab597bb47
This commit is contained in:
@@ -892,7 +892,7 @@ class AccountBankStatementLine(models.Model):
|
||||
total = self.amount
|
||||
for aml_rec in payment_aml_rec:
|
||||
total -= aml_rec.debit-aml_rec.credit
|
||||
aml_rec.write({'statement_id': self.statement_id.id})
|
||||
aml_rec.with_context(check_move_validity=False).write({'statement_id': self.statement_id.id})
|
||||
aml_rec.move_id.write({'statement_line_id': self.id})
|
||||
counterpart_moves = (counterpart_moves | aml_rec.move_id)
|
||||
|
||||
|
||||
@@ -38,8 +38,7 @@ def migrate_tags_on_taxes(cr, registry):
|
||||
('type_tax_use', '=', tax_template.type_tax_use),
|
||||
('description', '=', tax_template.description)
|
||||
])
|
||||
if len(tax_id.ids) == 1:
|
||||
tax_id.sudo().write({'tag_ids': [(6, 0, tax_template.tag_ids.ids)]})
|
||||
tax_id.sudo().write({'tag_ids': [(6, 0, tax_template.tag_ids.ids)]})
|
||||
|
||||
def preserve_existing_tags_on_taxes(cr, registry, module):
|
||||
''' This is a utility function used to preserve existing previous tags during upgrade of the module.'''
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
* only when the deferred is resolved, and its value is equal to the resolved value.
|
||||
* The module can be rejected (unloaded). This will be logged in the console as info.
|
||||
*
|
||||
* logs:
|
||||
* logs:
|
||||
* Missing dependencies:
|
||||
* These modules do not appear in the page. It is possible that the
|
||||
* JavaScript file is not in the page or that the module name is wrong
|
||||
@@ -180,16 +180,27 @@
|
||||
var failed = odoo.__DEBUG__.get_failed_jobs();
|
||||
var unloaded = _.filter(debug_jobs, function (job) { return job.missing; });
|
||||
|
||||
var log = [(_.isEmpty(failed) ? (_.isEmpty(unloaded) ? 'info' : 'warning' ) : 'error') + ':', 'Some modules could not be started'];
|
||||
if (missing.length) log.push('\nMissing dependencies: ', missing);
|
||||
if (!_.isEmpty(failed)) log.push('\nFailed modules: ', _.pluck(failed, 'name'));
|
||||
if (!_.isEmpty(rejected)) log.push('\nRejected modules: ', rejected);
|
||||
if (!_.isEmpty(rejected_linked))log.push('\nRejected linked modules:', rejected_linked);
|
||||
if (!_.isEmpty(unloaded)) log.push('\nNon loaded modules: ', _.pluck(unloaded, 'name'));
|
||||
if (odoo.debug && !_.isEmpty(debug_jobs)) log.push('\nDebug: ', debug_jobs);
|
||||
|
||||
if (odoo.debug || !_.isEmpty(failed) || !_.isEmpty(unloaded)) {
|
||||
console[_.isEmpty(failed) || _.isEmpty(unloaded) ? 'info' : 'error'].apply(console, log);
|
||||
var log = console[_.isEmpty(failed) || _.isEmpty(unloaded) ? 'info' : 'error'].bind(console);
|
||||
log((_.isEmpty(failed) ? (_.isEmpty(unloaded) ? 'info' : 'warning') : 'error') + ': Some modules could not be started');
|
||||
if (missing.length) {
|
||||
log('Missing dependencies: ', missing);
|
||||
}
|
||||
if (!_.isEmpty(failed)) {
|
||||
log('Failed modules: ', _.pluck(failed, 'name'));
|
||||
}
|
||||
if (!_.isEmpty(rejected)) {
|
||||
log('Rejected modules: ', rejected);
|
||||
}
|
||||
if (!_.isEmpty(rejected_linked)) {
|
||||
log('Rejected linked modules: ', rejected_linked);
|
||||
}
|
||||
if (!_.isEmpty(unloaded)) {
|
||||
log('Non loaded modules: ', _.pluck(unloaded, 'name'));
|
||||
}
|
||||
if (odoo.debug && !_.isEmpty(debug_jobs)) {
|
||||
log('Debug: ', debug_jobs);
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user