[REF] mail: remove account.move.line hack
While refactoring the move_line_list_views.js in owl, we provided the account.move id and model + "generate" a thread in the front-end for account.move.line instead of only providing account.move.line model and id. This allows us to get rid of this hacky special case Task-id: 2857743 Part-of: odoo/odoo#96672
This commit is contained in:
committed by
Habib (ayh)
parent
569ca1bd20
commit
a3c7a06dc3
@@ -189,6 +189,7 @@
|
||||
<field name="amount_residual" sum="Total Residual" string="Residual" optional="hide" attrs="{'invisible':[('is_account_reconcile', '=', False)]}"/>
|
||||
<field name="amount_residual_currency" sum="Total Residual in Currency" string="Residual in Currency" optional="hide" attrs="{'invisible':['|', ('is_same_currency', '=', True), ('is_account_reconcile', '=', False)]}"/>
|
||||
|
||||
<field name="move_id" invisible="1"/>
|
||||
<field name="parent_state" invisible="1"/>
|
||||
<field name="account_type" invisible="1"/>
|
||||
<field name="statement_id" invisible="1"/>
|
||||
|
||||
@@ -949,10 +949,6 @@ registerModel({
|
||||
*/
|
||||
async setMainAttachment(attachment) {
|
||||
this.update({ mainAttachment: attachment });
|
||||
if (this.model === 'account.move.line') {
|
||||
// account.move.line is not actually a thread in python
|
||||
return;
|
||||
}
|
||||
await this.messaging.rpc({
|
||||
model: 'ir.attachment',
|
||||
method: 'register_as_main_attachment',
|
||||
|
||||
@@ -37,11 +37,6 @@ registerModel({
|
||||
* @private
|
||||
*/
|
||||
_onChangeThreadAttachmentsInWebClientView() {
|
||||
if (this.thread.model === 'account.move.line') {
|
||||
// account.move.line is not actually a thread in python
|
||||
this.setMainAttachmentFromIndex(0);
|
||||
return;
|
||||
}
|
||||
if (
|
||||
this.thread.areAttachmentsLoaded &&
|
||||
!this.thread.isLoadingAttachments &&
|
||||
|
||||
Reference in New Issue
Block a user