Dear ${object.partner_id.name},
-Thank you for your payment.
Here is your payment receipt ${(object.name or '').replace('/','-')} amounting to ${object.amount} ${object.currency_id.name} from ${object.company_id.name}.
+Thank you for your payment.
Here is your payment receipt ${(object.name or '').replace('/','-')} amounting to ${format_amount(object.amount, object.currency_id)} from ${object.company_id.name}.
If you have any questions, please do not hesitate to contact us.
Best regards,
% if user and user.signature:
diff --git a/addons/account/models/account.py b/addons/account/models/account.py
index 5ec4c3de..96ad474f 100644
--- a/addons/account/models/account.py
+++ b/addons/account/models/account.py
@@ -792,7 +792,7 @@ class AccountTax(models.Model):
tag_ids = fields.Many2many('account.account.tag', 'account_tax_account_tag', string='Tags', help="Optional tags you may want to assign for custom reporting")
tax_group_id = fields.Many2one('account.tax.group', string="Tax Group", default=_default_tax_group, required=True)
# Technical field to make the 'tax_exigibility' field invisible if the same named field is set to false in 'res.company' model
- hide_tax_exigibility = fields.Boolean(string='Hide Use Cash Basis Option', related='company_id.tax_exigibility')
+ hide_tax_exigibility = fields.Boolean(string='Hide Use Cash Basis Option', related='company_id.tax_exigibility', readonly=True)
tax_exigibility = fields.Selection(
[('on_invoice', 'Based on Invoice'),
('on_payment', 'Based on Payment'),
diff --git a/addons/account/models/account_invoice.py b/addons/account/models/account_invoice.py
index 0d146d5e..01112b50 100644
--- a/addons/account/models/account_invoice.py
+++ b/addons/account/models/account_invoice.py
@@ -71,7 +71,7 @@ class AccountInvoice(models.Model):
@api.onchange('amount_total')
def _onchange_amount_total(self):
for inv in self:
- if inv.amount_total < 0:
+ if float_compare(inv.amount_total, 0.0, precision_rounding=inv.currency_id.rounding) == -1:
raise Warning(_('You cannot validate an invoice with a negative total amount. You should create a credit note instead.'))
@api.model
@@ -406,7 +406,7 @@ class AccountInvoice(models.Model):
""" computes the prefix of the number that will be assigned to the first invoice/bill/refund of a journal, in order to
let the user manually change it.
"""
- if not self.env.user._is_admin():
+ if not self.env.user._is_system():
for invoice in self:
invoice.sequence_number_next_prefix = False
invoice.sequence_number_next = ''
@@ -562,7 +562,10 @@ class AccountInvoice(models.Model):
"""
self.ensure_one()
self.sent = True
- return self.env.ref('account.account_invoices').report_action(self)
+ if self.user_has_groups('account.group_account_invoice'):
+ return self.env.ref('account.account_invoices').report_action(self)
+ else:
+ return self.env.ref('account.account_invoices_without_payment').report_action(self)
@api.multi
def action_invoice_sent(self):
@@ -602,7 +605,8 @@ class AccountInvoice(models.Model):
for invoice in self:
# Delete non-manual tax lines
self._cr.execute("DELETE FROM account_invoice_tax WHERE invoice_id=%s AND manual is False", (invoice.id,))
- self.invalidate_cache()
+ if self._cr.rowcount:
+ self.invalidate_cache()
# Generate one tax line per tax, however many invoice lines it's applied to
tax_grouped = invoice.get_taxes_values()
@@ -783,7 +787,7 @@ class AccountInvoice(models.Model):
to_open_invoices = self.filtered(lambda inv: inv.state != 'open')
if to_open_invoices.filtered(lambda inv: inv.state != 'draft'):
raise UserError(_("Invoice must be in draft state in order to validate it."))
- if to_open_invoices.filtered(lambda inv: inv.amount_total < 0):
+ if to_open_invoices.filtered(lambda inv: float_compare(inv.amount_total, 0.0, precision_rounding=inv.currency_id.rounding) == -1):
raise UserError(_("You cannot validate an invoice with a negative total amount. You should create a credit note instead."))
to_open_invoices.action_date_assign()
to_open_invoices.action_move_create()
@@ -1523,6 +1527,13 @@ class AccountInvoiceLine(models.Model):
return accounts['income']
return accounts['expense']
+ def _set_currency(self):
+ company = self.invoice_id.company_id
+ currency = self.invoice_id.currency_id
+ if company and currency:
+ if company.currency_id != currency:
+ self.price_unit = self.price_unit * currency.with_context(dict(self._context or {}, date=self.invoice_id.date_invoice)).rate
+
def _set_taxes(self):
""" Used in on_change to set taxes and price."""
if self.invoice_id.type in ('out_invoice', 'out_refund'):
@@ -1541,8 +1552,10 @@ class AccountInvoiceLine(models.Model):
prec = self.env['decimal.precision'].precision_get('Product Price')
if not self.price_unit or float_compare(self.price_unit, self.product_id.standard_price, precision_digits=prec) == 0:
self.price_unit = fix_price(self.product_id.standard_price, taxes, fp_taxes)
+ self._set_currency()
else:
self.price_unit = fix_price(self.product_id.lst_price, taxes, fp_taxes)
+ self._set_currency()
@api.onchange('product_id')
def _onchange_product_id(self):
@@ -1591,8 +1604,6 @@ class AccountInvoiceLine(models.Model):
domain['uom_id'] = [('category_id', '=', product.uom_id.category_id.id)]
if company and currency:
- if company.currency_id != currency:
- self.price_unit = self.price_unit * currency.with_context(dict(self._context or {}, date=self.invoice_id.date_invoice)).rate
if self.uom_id and self.uom_id.id != product.uom_id.id:
self.price_unit = product.uom_id._compute_price(self.price_unit, self.uom_id)
diff --git a/addons/account/models/account_move.py b/addons/account/models/account_move.py
index 48d31bd1..ba9c387e 100644
--- a/addons/account/models/account_move.py
+++ b/addons/account/models/account_move.py
@@ -56,7 +56,8 @@ class AccountMove(models.Model):
total_amount += amount
for partial_line in (line.matched_debit_ids + line.matched_credit_ids):
total_reconciled += partial_line.amount
- if float_is_zero(total_amount, precision_rounding=move.currency_id.rounding):
+ precision_currency = move.currency_id or move.company_id.currency_id
+ if float_is_zero(total_amount, precision_rounding=precision_currency.rounding):
move.matched_percentage = 1.0
else:
move.matched_percentage = total_reconciled / total_amount
@@ -103,8 +104,7 @@ class AccountMove(models.Model):
partner_id = fields.Many2one('res.partner', compute='_compute_partner_id', string="Partner", store=True, readonly=True)
amount = fields.Monetary(compute='_amount_compute', store=True)
narration = fields.Text(string='Internal Note')
- company_id = fields.Many2one('res.company', related='journal_id.company_id', string='Company', store=True, readonly=True,
- default=lambda self: self.env.user.company_id)
+ company_id = fields.Many2one('res.company', related='journal_id.company_id', string='Company', store=True, readonly=True)
matched_percentage = fields.Float('Percentage Matched', compute='_compute_matched_percentage', digits=0, store=True, readonly=True, help="Technical field used in cash basis method")
# Dummy Account field to search on account.move by account_id
dummy_account_id = fields.Many2one('account.account', related='line_ids.account_id', string='Account', store=False, readonly=True)
@@ -1044,8 +1044,6 @@ class AccountMoveLine(models.Model):
raise UserError(_('Entries are not of the same account!'))
if not (all_accounts[0].reconcile or all_accounts[0].internal_type == 'liquidity'):
raise UserError(_('The account %s (%s) is not marked as reconciliable !') % (all_accounts[0].name, all_accounts[0].code))
- if len(partners) > 1:
- raise UserError(_('The partner has to be the same on all lines for receivable and payable accounts!'))
#reconcile everything that can be
remaining_moves = self.auto_reconcile_lines()
@@ -1163,19 +1161,22 @@ class AccountMoveLine(models.Model):
#create an empty move that will hold all the exchange rate adjustments
exchange_move = False
- if aml_to_balance_currency:
+ if aml_to_balance_currency and any([residual for dummy, residual in aml_to_balance_currency.values()]):
exchange_move = self.env['account.move'].create(
self.env['account.full.reconcile']._prepare_exchange_diff_move(move_date=maxdate, company=self[0].company_id))
for currency, values in aml_to_balance_currency.items():
aml_to_balance = values[0]
total_amount_currency = values[1]
- #eventually create journal entries to book the difference due to foreign currency's exchange rate that fluctuates
- aml_recs, partial_recs = self.env['account.partial.reconcile'].create_exchange_rate_entry(aml_to_balance, 0.0, total_amount_currency, currency, exchange_move)
+ if total_amount_currency:
+ #eventually create journal entries to book the difference due to foreign currency's exchange rate that fluctuates
+ aml_recs, partial_recs = self.env['account.partial.reconcile'].create_exchange_rate_entry(aml_to_balance, 0.0, total_amount_currency, currency, exchange_move)
- #add the ecxhange rate line and the exchange rate partial reconciliation in the et of the full reconcile
- self |= aml_recs
- partial_rec_set |= partial_recs
+ #add the ecxhange rate line and the exchange rate partial reconciliation in the et of the full reconcile
+ self |= aml_recs
+ partial_rec_set |= partial_recs
+ else:
+ aml_to_balance.reconcile()
if exchange_move:
exchange_move.post()
@@ -1203,6 +1204,7 @@ class AccountMoveLine(models.Model):
rec_move_ids += account_move_line.matched_credit_ids
if self.env.context.get('invoice_id'):
current_invoice = self.env['account.invoice'].browse(self.env.context['invoice_id'])
+ aml_to_keep = current_invoice.move_id.line_ids | current_invoice.move_id.line_ids.mapped('full_reconcile_id.exchange_move_id.line_ids')
rec_move_ids = rec_move_ids.filtered(
lambda r: (r.debit_move_id + r.credit_move_id) & current_invoice.move_id.line_ids
)
diff --git a/addons/account/models/account_payment.py b/addons/account/models/account_payment.py
index ae879cce..b2cd72bd 100644
--- a/addons/account/models/account_payment.py
+++ b/addons/account/models/account_payment.py
@@ -374,6 +374,12 @@ class account_payment(models.Model):
self.destination_account_id = self.partner_id.property_account_receivable_id.id
else:
self.destination_account_id = self.partner_id.property_account_payable_id.id
+ elif self.partner_type == 'customer':
+ default_account = self.env['ir.property'].get('property_account_receivable_id', 'res.partner')
+ self.destination_account_id = default_account.id
+ elif self.partner_type == 'supplier':
+ default_account = self.env['ir.property'].get('property_account_payable_id', 'res.partner')
+ self.destination_account_id = default_account.id
@api.onchange('partner_type')
def _onchange_partner_type(self):
@@ -429,12 +435,17 @@ class account_payment(models.Model):
@api.multi
def button_invoices(self):
+ if self.partner_type == 'supplier':
+ views = [(self.env.ref('account.invoice_supplier_tree').id, 'tree'), (self.env.ref('account.invoice_supplier_form').id, 'form')]
+ else:
+ views = [(self.env.ref('account.invoice_tree').id, 'tree'), (self.env.ref('account.invoice_form').id, 'form')]
return {
'name': _('Paid Invoices'),
'view_type': 'form',
'view_mode': 'tree,form',
'res_model': 'account.invoice',
'view_id': False,
+ 'views': views,
'type': 'ir.actions.act_window',
'domain': [('id', 'in', [x.id for x in self.invoice_ids])],
}
@@ -517,6 +528,7 @@ class account_payment(models.Model):
(transfer_credit_aml + transfer_debit_aml).reconcile()
rec.write({'state': 'posted', 'move_name': move.name})
+ return True
@api.multi
def action_draft(self):
diff --git a/addons/account/models/chart_template.py b/addons/account/models/chart_template.py
index fa3e99d8..0ab56904 100644
--- a/addons/account/models/chart_template.py
+++ b/addons/account/models/chart_template.py
@@ -859,7 +859,7 @@ class WizardMultiChartsAccounts(models.TransientModel):
@api.multi
def existing_accounting(self, company_id):
- model_to_check = ['account.move.line', 'account.invoice', 'account.move', 'account.payment', 'account.bank.statement']
+ model_to_check = ['account.move.line', 'account.invoice', 'account.payment', 'account.bank.statement']
for model in model_to_check:
if len(self.env[model].search([('company_id', '=', company_id.id)])) > 0:
return True
@@ -894,7 +894,7 @@ class WizardMultiChartsAccounts(models.TransientModel):
accounting_props.unlink()
# delete account, journal, tax, fiscal position and reconciliation model
- models_to_delete = ['account.reconcile.model', 'account.fiscal.position', 'account.tax', 'account.journal']
+ models_to_delete = ['account.reconcile.model', 'account.fiscal.position', 'account.tax', 'account.move', 'account.journal']
for model in models_to_delete:
res = self.env[model].search([('company_id', '=', self.company_id.id)])
if len(res):
diff --git a/addons/account/models/company.py b/addons/account/models/company.py
index d9b9fe62..99099d11 100644
--- a/addons/account/models/company.py
+++ b/addons/account/models/company.py
@@ -2,10 +2,12 @@
from datetime import timedelta, datetime
import calendar
+import time
+from dateutil.relativedelta import relativedelta
from flectra import fields, models, api, _
-from flectra.exceptions import ValidationError
from flectra.exceptions import UserError
+from flectra.tools.misc import DEFAULT_SERVER_DATE_FORMAT
from flectra.tools.float_utils import float_round, float_is_zero
@@ -62,6 +64,61 @@ Best Regards,'''))
account_setup_coa_done = fields.Boolean(string='Chart of Account Checked', help="Technical field holding the status of the chart of account setup step.")
account_setup_bar_closed = fields.Boolean(string='Setup Bar Closed', help="Technical field set to True when setup bar has been closed by the user.")
+ @api.multi
+ def _check_lock_dates(self, vals):
+ '''Check the lock dates for the current companies. This can't be done in a api.constrains because we need
+ to perform some comparison between new/old values. This method forces the lock dates to be irreversible.
+
+ * You cannot define stricter conditions on advisors than on users. Then, the lock date on advisor must be set
+ after the lock date for users.
+ * You cannot lock a period that is not finished yet. Then, the lock date for advisors must be set after the
+ last day of the previous month.
+ * The new lock date for advisors must be set after the previous lock date.
+
+ :param vals: The values passed to the write method.
+ '''
+ period_lock_date = vals.get('period_lock_date') and\
+ time.strptime(vals['period_lock_date'], DEFAULT_SERVER_DATE_FORMAT)
+ fiscalyear_lock_date = vals.get('fiscalyear_lock_date') and\
+ time.strptime(vals['fiscalyear_lock_date'], DEFAULT_SERVER_DATE_FORMAT)
+
+ previous_month = datetime.strptime(fields.Date.today(), DEFAULT_SERVER_DATE_FORMAT) + relativedelta(months=-1)
+ days_previous_month = calendar.monthrange(previous_month.year, previous_month.month)
+ previous_month = previous_month.replace(day=days_previous_month[1]).timetuple()
+ for company in self:
+ old_fiscalyear_lock_date = company.fiscalyear_lock_date and\
+ time.strptime(company.fiscalyear_lock_date, DEFAULT_SERVER_DATE_FORMAT)
+
+ # The user attempts to remove the lock date for advisors
+ if old_fiscalyear_lock_date and not fiscalyear_lock_date and 'fiscalyear_lock_date' in vals:
+ raise ValidationError(_('The lock date for advisors is irreversible and can\'t be removed.'))
+
+ # The user attempts to set a lock date for advisors prior to the previous one
+ if old_fiscalyear_lock_date and fiscalyear_lock_date and fiscalyear_lock_date < old_fiscalyear_lock_date:
+ raise ValidationError(_('The new lock date for advisors must be set after the previous lock date.'))
+
+ # In case of no new fiscal year in vals, fallback to the oldest
+ if not fiscalyear_lock_date:
+ if old_fiscalyear_lock_date:
+ fiscalyear_lock_date = old_fiscalyear_lock_date
+ else:
+ continue
+
+ # The user attempts to set a lock date for advisors prior to the last day of previous month
+ if fiscalyear_lock_date > previous_month:
+ raise ValidationError(_('You cannot lock a period that is not finished yet. Please make sure that the lock date for advisors is not set after the last day of the previous month.'))
+
+ # In case of no new period lock date in vals, fallback to the one defined in the company
+ if not period_lock_date:
+ if company.period_lock_date:
+ period_lock_date = time.strptime(company.period_lock_date, DEFAULT_SERVER_DATE_FORMAT)
+ else:
+ continue
+
+ # The user attempts to set a lock date for advisors prior to the lock date for users
+ if period_lock_date < fiscalyear_lock_date:
+ raise ValidationError(_('You cannot define stricter conditions on advisors than on users. Please make sure that the lock date on advisor is set before the lock date for users.'))
+
@api.model
def _verify_fiscalyear_last_day(self, company_id, last_day, last_month):
company = self.browse(company_id)
diff --git a/addons/account/models/partner.py b/addons/account/models/partner.py
index e234bf7e..c17963ee 100644
--- a/addons/account/models/partner.py
+++ b/addons/account/models/partner.py
@@ -444,3 +444,12 @@ class ResPartner(models.Model):
action['domain'] = literal_eval(action['domain'])
action['domain'].append(('partner_id', 'child_of', self.id))
return action
+
+ @api.onchange('company_id')
+ def _onchange_company_id(self):
+ company = self.env['res.company']
+ if self.company_id:
+ company = self.company_id
+ else:
+ company = self.env.user.company_id
+ return {'domain': {'property_account_position_id': [('company_id', 'in', [company.id, False])]}}
diff --git a/addons/account/models/product.py b/addons/account/models/product.py
index a5a6afb5..d57b836e 100644
--- a/addons/account/models/product.py
+++ b/addons/account/models/product.py
@@ -35,22 +35,6 @@ class ProductTemplate(models.Model):
domain=[('deprecated', '=', False)],
help="The expense is accounted for when a vendor bill is validated, except in anglo-saxon accounting with perpetual inventory valuation in which case the expense (Cost of Goods Sold account) is recognized at the customer invoice validation. If the field is empty, it uses the one defined in the product category.")
- @api.multi
- def write(self, vals):
- #TODO: really? i don't see the reason we'd need that constraint..
- check = self.ids and 'uom_po_id' in vals
- if check:
- self._cr.execute("SELECT id, uom_po_id FROM product_template WHERE id IN %s", [tuple(self.ids)])
- uoms = dict(self._cr.fetchall())
- res = super(ProductTemplate, self).write(vals)
- if check:
- self._cr.execute("SELECT id, uom_po_id FROM product_template WHERE id IN %s", [tuple(self.ids)])
- if dict(self._cr.fetchall()) != uoms:
- products = self.env['product.product'].search([('product_tmpl_id', 'in', self.ids)])
- if self.env['account.move.line'].search_count([('product_id', 'in', products.ids)]):
- raise UserError(_('You can not change the unit of measure of a product that has been already used in an account journal item. If you need to change the unit of measure, you may deactivate this product.'))
- return res
-
@api.multi
def _get_product_accounts(self):
return {
diff --git a/addons/account/report/account_aged_partner_balance.py b/addons/account/report/account_aged_partner_balance.py
index d7ce4aac..f8c30b32 100644
--- a/addons/account/report/account_aged_partner_balance.py
+++ b/addons/account/report/account_aged_partner_balance.py
@@ -193,7 +193,7 @@ class ReportAgedPartnerBalance(models.AbstractModel):
values['name'] = _('Unknown Partner')
values['trust'] = False
- if at_least_one_amount or self._context.get('include_nullified_amount'):
+ if at_least_one_amount or (self._context.get('include_nullified_amount') and lines[partner['partner_id']]):
res.append(values)
return res, total, lines
diff --git a/addons/account/report/account_general_ledger.py b/addons/account/report/account_general_ledger.py
index 87b7a417..4649e0e7 100644
--- a/addons/account/report/account_general_ledger.py
+++ b/addons/account/report/account_general_ledger.py
@@ -38,7 +38,7 @@ class ReportGeneralLedger(models.AbstractModel):
init_wheres.append(init_where_clause.strip())
init_filters = " AND ".join(init_wheres)
filters = init_filters.replace('account_move_line__move_id', 'm').replace('account_move_line', 'l')
- sql = ("""SELECT 0 AS lid, l.account_id AS account_id, '' AS ldate, '' AS lcode, NULL AS amount_currency, '' AS lref, 'Initial Balance' AS lname, COALESCE(SUM(l.debit),0.0) AS debit, COALESCE(SUM(l.credit),0.0) AS credit, COALESCE(SUM(l.debit),0) - COALESCE(SUM(l.credit), 0) as balance, '' AS lpartner_id,\
+ sql = ("""SELECT 0 AS lid, l.account_id AS account_id, '' AS ldate, '' AS lcode, 0.0 AS amount_currency, '' AS lref, 'Initial Balance' AS lname, COALESCE(SUM(l.debit),0.0) AS debit, COALESCE(SUM(l.credit),0.0) AS credit, COALESCE(SUM(l.debit),0) - COALESCE(SUM(l.credit), 0) as balance, '' AS lpartner_id,\
'' AS move_name, '' AS mmove_id, '' AS currency_code,\
NULL AS currency_id,\
'' AS invoice_id, '' AS invoice_type, '' AS invoice_number,\
diff --git a/addons/account/report/account_overdue_report.py b/addons/account/report/account_overdue_report.py
index d31d1f32..0e95fba0 100644
--- a/addons/account/report/account_overdue_report.py
+++ b/addons/account/report/account_overdue_report.py
@@ -25,7 +25,7 @@ class ReportOverdue(models.AbstractModel):
"FROM account_move_line l "
"JOIN account_account_type at ON (l.user_type_id = at.id) "
"JOIN account_move m ON (l.move_id = m.id) "
- "WHERE l.partner_id IN %s AND at.type IN ('receivable', 'payable') AND NOT l.reconciled GROUP BY l.date, l.name, l.ref, l.date_maturity, l.partner_id, at.type, l.blocked, l.amount_currency, l.currency_id, l.move_id, m.name", (((fields.date.today(), ) + (tuple(partner_ids),))))
+ "WHERE l.partner_id IN %s AND at.type IN ('receivable', 'payable') AND l.full_reconcile_id IS NULL GROUP BY l.date, l.name, l.ref, l.date_maturity, l.partner_id, at.type, l.blocked, l.amount_currency, l.currency_id, l.move_id, m.name", (((fields.date.today(), ) + (tuple(partner_ids),))))
for row in self.env.cr.dictfetchall():
res[row.pop('partner_id')].append(row)
return res
diff --git a/addons/account/static/src/js/reconciliation/reconciliation_model.js b/addons/account/static/src/js/reconciliation/reconciliation_model.js
index c7fd2779..be6f467c 100644
--- a/addons/account/static/src/js/reconciliation/reconciliation_model.js
+++ b/addons/account/static/src/js/reconciliation/reconciliation_model.js
@@ -784,6 +784,7 @@ var StatementModel = BasicModel.extend({
model: 'account.tax',
method: 'json_friendly_compute_all',
args: args,
+ context: $.extend(self.context || {}, {'round': true}),
})
.then(function (result) {
_.each(result.taxes, function(tax){
@@ -847,7 +848,7 @@ var StatementModel = BasicModel.extend({
}) : false,
account_code: self.accounts[line.st_line.open_balance_account_id],
};
- line.balance.type = line.balance.amount_currency ? (line.balance.amount_currency > 0 && line.st_line.partner_id ? 0 : -1) : 1;
+ line.balance.type = line.balance.amount_currency ? (line.st_line.partner_id ? 0 : -1) : 1;
});
},
/**
@@ -963,6 +964,7 @@ var StatementModel = BasicModel.extend({
var formatOptions = {
currency_id: line.st_line.currency_id,
};
+ var amount = values.amount !== undefined ? values.amount : line.balance.amount;
var prop = {
'id': _.uniqueId('createLine'),
'label': values.label || line.st_line.name,
@@ -974,8 +976,7 @@ var StatementModel = BasicModel.extend({
'debit': 0,
'credit': 0,
'base_amount': values.amount_type !== "percentage" ?
- (values.amount || line.balance.amount) :
- line.balance.amount * values.amount / 100,
+ (amount) : line.balance.amount * values.amount / 100,
'percent': values.amount_type === "percentage" ? values.amount : null,
'link': values.link,
'display': true,
diff --git a/addons/account/static/src/js/reconciliation/reconciliation_renderer.js b/addons/account/static/src/js/reconciliation/reconciliation_renderer.js
index 58ee890f..1f70529a 100644
--- a/addons/account/static/src/js/reconciliation/reconciliation_renderer.js
+++ b/addons/account/static/src/js/reconciliation/reconciliation_renderer.js
@@ -298,7 +298,9 @@ var LineRenderer = Widget.extend(FieldManagerMixin, {
};
self.fields.partner_id.appendTo(self.$('.accounting_view caption'));
});
- this.$('thead .line_info_button').attr("data-content", qweb.render('reconciliation.line.statement_line.details', {'state': this._initialState}));
+ $('')
+ .appendTo(this.$('thead .cell_info_popover'))
+ .attr("data-content", qweb.render('reconciliation.line.statement_line.details', {'state': this._initialState}));
this.$el.popover({
'selector': '.line_info_button',
'placement': 'left',
@@ -626,7 +628,7 @@ var LineRenderer = Widget.extend(FieldManagerMixin, {
/**
* @private
*/
- _onFilterChange: function () {
+ _onFilterChange: function (event) {
this.trigger_up('change_filter', {'data': _.str.strip($(event.target).val())});
},
/**
diff --git a/addons/account/static/src/less/account_reconciliation.less b/addons/account/static/src/less/account_reconciliation.less
index deb0c76c..f15e82e6 100644
--- a/addons/account/static/src/less/account_reconciliation.less
+++ b/addons/account/static/src/less/account_reconciliation.less
@@ -159,6 +159,9 @@
}
/* info popover */
+ .popover {
+ max-width: none;
+ }
table.details {
vertical-align: top;
@@ -209,6 +212,7 @@
}
&[data-mode="match"] > .match {
max-height: none;
+ overflow: visible;
.o-transition(max-height, 400ms);
}
&[data-mode="create"] > .create {
diff --git a/addons/account/static/src/xml/account_reconciliation.xml b/addons/account/static/src/xml/account_reconciliation.xml
index 7d24458f..897b7a0c 100644
--- a/addons/account/static/src/xml/account_reconciliation.xml
+++ b/addons/account/static/src/xml/account_reconciliation.xml
@@ -128,7 +128,7 @@
|
|
|
- Create Write-offOpen balanceChoose counterpart |
+ Open balanceChoose counterpart or Create Write-off |
|
|
|
@@ -251,7 +251,7 @@
Description | |
Amount | () |
Account | |
- Note | |
+ Note | |