mirror of
https://github.com/OCA/account-reconcile.git
synced 2025-01-20 12:27:39 +02:00
@@ -31,7 +31,7 @@ export class ReconcileController extends KanbanController {
|
||||
});
|
||||
}
|
||||
get journalId() {
|
||||
if (this.props.resModel === "account.bank.statement.line") {
|
||||
if (this.props.context.active_model === "account.journal") {
|
||||
return this.props.context.active_id;
|
||||
}
|
||||
return false;
|
||||
@@ -67,6 +67,7 @@ export class ReconcileController extends KanbanController {
|
||||
this.action.doAction(action, {
|
||||
onClose: async () => {
|
||||
await this.model.root.load();
|
||||
await this.updateJournalInfo();
|
||||
this.render(true);
|
||||
},
|
||||
});
|
||||
|
||||
@@ -23,10 +23,12 @@ export class ReconcileFormController extends FormController {
|
||||
async reloadFormController() {
|
||||
var is_reconciled = this.model.root.data.is_reconciled;
|
||||
await this.model.root.load();
|
||||
if (!is_reconciled && this.model.root.data.is_reconciled) {
|
||||
// This only happens when we press the reconcile button
|
||||
if (this.env.parentController) {
|
||||
// Showing rainbow man
|
||||
if (this.env.parentController) {
|
||||
// We will update the parent controller every time we reload the form.
|
||||
await this.env.parentController.model.root.load();
|
||||
await this.env.parentController.render(true);
|
||||
if (!is_reconciled && this.model.root.data.is_reconciled) {
|
||||
// This only happens when we press the reconcile button for showing rainbow man
|
||||
const message = await this.orm.call(
|
||||
"account.journal",
|
||||
"get_rainbowman_message",
|
||||
@@ -36,8 +38,6 @@ export class ReconcileFormController extends FormController {
|
||||
this.env.parentController.setRainbowMan(message);
|
||||
}
|
||||
// Refreshing
|
||||
await this.env.parentController.model.root.load();
|
||||
await this.env.parentController.render(true);
|
||||
this.env.parentController.selectRecord();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
type="action"
|
||||
name="%(account_reconcile_oca.action_bank_statement_line_move_view_reconcile)s"
|
||||
string="Bank reconcile"
|
||||
context="{'search_default_move_id': id}"
|
||||
class="btn btn-primary"
|
||||
icon="fa-list"
|
||||
attrs="{'invisible': [('statement_line_id', '=', False)]}"
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
<field
|
||||
name="name"
|
||||
string="Journal Item"
|
||||
filter_domain="[ '|', '|', '|', ('name', 'ilike', self), ('ref', 'ilike', self), ('account_id', 'ilike', self), ('partner_id', 'ilike', self)]"
|
||||
filter_domain="['|','|','|','|','|',('name', 'ilike', self), ('ref', 'ilike', self), ('account_id', 'ilike', self), ('partner_id', 'ilike', self),('amount_residual', 'ilike', self),('amount_residual_currency', 'ilike', self)]"
|
||||
/>
|
||||
<field name="name" />
|
||||
<field name="ref" />
|
||||
|
||||
@@ -72,6 +72,8 @@
|
||||
optional="hide"
|
||||
attrs="{'readonly': [('is_reconciled', '=', True)]}"
|
||||
/>
|
||||
<field name="transaction_type" optional="hide" />
|
||||
<field name="account_number" optional="hide" />
|
||||
<field
|
||||
name="partner_id"
|
||||
attrs="{'readonly': [('is_reconciled', '=', True)]}"
|
||||
@@ -79,7 +81,7 @@
|
||||
<field name="amount" attrs="{'readonly': [('is_reconciled', '=', True)]}" />
|
||||
<field
|
||||
name="foreign_currency_id"
|
||||
optional="hidden"
|
||||
optional="hide"
|
||||
groups="base.group_multi_currency"
|
||||
attrs="{'readonly': [('is_reconciled', '=', True)]}"
|
||||
/>
|
||||
@@ -89,6 +91,7 @@
|
||||
groups="base.group_multi_currency"
|
||||
attrs="{'readonly': [('is_reconciled', '=', True)]}"
|
||||
/>
|
||||
<field name="running_balance" />
|
||||
<field
|
||||
name="narration"
|
||||
optional="hide"
|
||||
|
||||
Reference in New Issue
Block a user