Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions mis_builder_analytic/models/mis_account_analytic_line.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ class MisAccountAnalyticLine(models.Model):
state = fields.Selection(
[("draft", "Unposted"), ("posted", "Posted")], string="Status"
)
move_line_id = fields.Many2one(
string="Journal Item", comodel_name="account.move.line"
)

def init(self):
tools.drop_view_if_exists(self._cr, "mis_account_analytic_line")
Expand All @@ -37,6 +40,7 @@ def init(self):
aal.general_account_id as account_id,
aal.account_id as analytic_account_id,
aal.company_id as company_id,
aal.move_line_id AS move_line_id,
'posted'::VARCHAR as state,
CASE
WHEN aal.amount >= 0.0 THEN aal.amount
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
<field name="company_id" />
<field name="account_id" />
<field name="analytic_account_id" />
<field name="move_line_id" widget="line_open_move_widget" />
<field name="credit" />
<field name="debit" />
<field name="balance" />
Expand All @@ -28,6 +29,7 @@
<group>
<group>
<field name="analytic_line_id" />
<field name="move_line_id" />
Copy link
Copy Markdown
Member

@sbidoul sbidoul Apr 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<field name="move_line_id" />
<field name="move_line_id" widget="line_open_move_widget" />

So the move can be opened easily like in the Analytic Items list view.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, can you put it on the right of analytic_account_id so it is more similar to the Analytic Items view?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sbidoul you can check

<field name="date" />
<field name="company_id" />
<field name="account_id" />
Expand Down
Loading