[MERGE] forward port branch 11.0 up to a10ea93dbe
This commit is contained in:
@@ -874,6 +874,7 @@ var StatementModel = BasicModel.extend({
|
||||
}
|
||||
});
|
||||
total = Math.round(total*1000)/1000 || 0;
|
||||
amount_currency = Math.round(amount_currency);
|
||||
line.balance = {
|
||||
amount: total,
|
||||
amount_str: field_utils.format.monetary(Math.abs(total), {}, formatOptions),
|
||||
|
||||
@@ -60,6 +60,7 @@ class AssetAssetReport(models.Model):
|
||||
from account_asset_depreciation_line dl
|
||||
left join account_asset_asset a on (dl.asset_id=a.id)
|
||||
left join (select min(d.id) as id,ac.id as ac_id from account_asset_depreciation_line as d inner join account_asset_asset as ac ON (ac.id=d.asset_id) group by ac_id) as dlmin on dlmin.ac_id=a.id
|
||||
where a.active is true
|
||||
group by
|
||||
dl.amount,dl.asset_id,dl.depreciation_date,dl.name,
|
||||
a.date, dl.move_check, a.state, a.category_id, a.partner_id, a.company_id,
|
||||
|
||||
@@ -469,7 +469,7 @@ class Channel(models.Model):
|
||||
'is_minimized': minimized
|
||||
}
|
||||
domain = [('partner_id', '=', self.env.user.partner_id.id), ('channel_id.uuid', '=', uuid)]
|
||||
channel_partners = self.env['mail.channel.partner'].search(domain)
|
||||
channel_partners = self.env['mail.channel.partner'].search(domain, limit=1)
|
||||
channel_partners.write(values)
|
||||
self.env['bus.bus'].sendone((self._cr.dbname, 'res.partner', self.env.user.partner_id.id), channel_partners.channel_id.channel_info()[0])
|
||||
|
||||
|
||||
@@ -57,5 +57,6 @@ class ProductTemplate(models.Model):
|
||||
def _onchange_type(self):
|
||||
""" Force values to stay consistent with integrity constraints """
|
||||
if self.type == 'consu':
|
||||
self.invoice_policy = 'order'
|
||||
if not self.invoice_policy:
|
||||
self.invoice_policy = 'order'
|
||||
self.service_type = 'manual'
|
||||
|
||||
@@ -347,7 +347,7 @@
|
||||
</div>
|
||||
<h2>Invoicing</h2>
|
||||
<div class="row mt16 o_settings_container">
|
||||
<div class="col-xs-12 col-md-6 o_setting_box hidden" title="This default value is applied to any new product created. This can be changed in the product detail form.">
|
||||
<div class="col-xs-12 col-md-6 o_setting_box" title="This default value is applied to any new product created. This can be changed in the product detail form.">
|
||||
<div class="o_setting_right_pane">
|
||||
<label for="default_invoice_policy"/>
|
||||
<div class="text-muted">
|
||||
|
||||
@@ -60,3 +60,5 @@ class ProductTemplate(models.Model):
|
||||
if self.type == 'service':
|
||||
self.invoice_policy = 'order'
|
||||
self.service_type = 'timesheet'
|
||||
elif self.type == 'consu' and self.service_policy == 'ordered_timesheet':
|
||||
self.invoice_policy = 'order'
|
||||
|
||||
Reference in New Issue
Block a user