mirror of
https://gitlab.com/flectra-hq/flectra.git
synced 2026-11-02 09:58:50 -06:00
[FIX]fixed all of the open issues
This commit is contained in:
1 parent
3e0715e48d
commit
b565f06a79
3 files changed
+12
-6
No files matched your search
@@ -19,6 +19,7 @@ class AccountReconciliation(models.AbstractModel):
|
||||
|
||||
@api.model
|
||||
def process_bank_statement_line(self, st_line_ids, data):
|
||||
print(data,"insideeeeee bank\n\n\n\n\n",st_line_ids)
|
||||
""" Handles data sent from the bank statement reconciliation widget
|
||||
(and can otherwise serve as an old-API bridge)
|
||||
|
||||
@@ -790,7 +791,7 @@ class AccountReconciliation(models.AbstractModel):
|
||||
'date': format_date(self.env, st_line.date),
|
||||
'amount': amount,
|
||||
'amount_str': amount_str, # Amount in the statement line currency
|
||||
'currency_id': st_line.currency_id.id or statement_currency.id,
|
||||
'currency_id': st_line.foreign_currency_id.id or statement_currency.id,
|
||||
'partner_id': st_line.partner_id.id,
|
||||
'journal_id': st_line.journal_id.id,
|
||||
'statement_id': st_line.statement_id.id,
|
||||
@@ -865,6 +866,7 @@ class AccountReconciliation(models.AbstractModel):
|
||||
|
||||
@api.model
|
||||
def _process_move_lines(self, move_line_ids, new_mv_line_dicts):
|
||||
print("insideeeee\n\n\n\n\n\n\n\n\n")
|
||||
""" Create new move lines from new_mv_line_dicts (if not empty) then call reconcile_partial on self and new move lines
|
||||
|
||||
:param new_mv_line_dicts: list of dicts containing values suitable for account_move_line.create()
|
||||
@@ -887,8 +889,9 @@ class AccountReconciliation(models.AbstractModel):
|
||||
for mv_line_dict in new_mv_line_dicts:
|
||||
if not same_currency:
|
||||
mv_line_dict['amount_currency'] = False
|
||||
print("mv lineeee\n\n\n\n\n\n\n",mv_line_dict)
|
||||
writeoff_lines += account_move_line._create_writeoff([mv_line_dict])
|
||||
|
||||
(account_move_line + writeoff_lines).reconcile()
|
||||
else:
|
||||
account_move_line.reconcile()
|
||||
account_move_line.reconcile()
|
||||
+3
@@ -1309,6 +1309,7 @@ var StatementModel = BasicModel.extend({
|
||||
var account_id = false;
|
||||
var tax_ids = false;
|
||||
var analytic_account_id = false;
|
||||
var force_tax_included = false;
|
||||
if(Array.isArray(values.line_ids)){
|
||||
if(values.line_ids.length > 0){
|
||||
account_id = {};
|
||||
@@ -1322,6 +1323,7 @@ var StatementModel = BasicModel.extend({
|
||||
tax_ids = get_account_id[0].tax_ids;
|
||||
}
|
||||
analytic_account_id = get_account_id[0].analytic_account_id;
|
||||
force_tax_included = get_account_id[0].force_tax_included;
|
||||
}
|
||||
}
|
||||
var final_account = values.hasOwnProperty('account_id') ? {'id':values.account_id[0]} : account_id;
|
||||
@@ -1341,6 +1343,7 @@ var StatementModel = BasicModel.extend({
|
||||
'date': values.date ? values.date : field_utils.parse.date(today, {}, {isUTC: true}),
|
||||
'force_tax_included': values.force_tax_included || false,
|
||||
'base_amount': amount,
|
||||
'force_tax_included': force_tax_included || false,
|
||||
'percent': values.amount_type === "percentage" ? values.amount : null,
|
||||
'link': values.link,
|
||||
'display': true,
|
||||
|
||||
@@ -101,9 +101,9 @@
|
||||
<tr>
|
||||
<td class="cell_account_code"><t t-esc="state.st_line.account_code"/></td>
|
||||
<td class="cell_due_date"><t t-esc="state.st_line.date"/></td>
|
||||
<td class="cell_label"><t t-if="state.st_line.name" t-esc="state.st_line.name"/> <t t-if="state.st_line.amount_str"> (<t t-esc="state.st_line.amount_str"/>)</t></td>
|
||||
<td class="cell_left"><t t-if="state.st_line.amount > 0"><t t-raw="state.st_line.amount_currency_str"/></t></td>
|
||||
<td class="cell_right"><t t-if="state.st_line.amount < 0"><t t-raw="state.st_line.amount_currency_str"/></t></td>
|
||||
<td class="cell_label"><t t-if="state.st_line.name" t-esc="state.st_line.name"/> <t t-if="state.st_line.amount_currency_str"> (<t t-esc="state.st_line.amount_currency_str"/>)</t></td>
|
||||
<td class="cell_left"><t t-if="state.st_line.amount > 0"><t t-raw="state.st_line.amount_str"/></t></td>
|
||||
<td class="cell_right"><t t-if="state.st_line.amount < 0"><t t-raw="state.st_line.amount_str"/></t></td>
|
||||
<td class="cell_info_popover"></td>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -399,4 +399,4 @@
|
||||
</div>
|
||||
</t>
|
||||
|
||||
</templates>
|
||||
</templates>
|
||||
Reference in new issue
Block a user