Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[16.0][IMP] account_statement_base: add possibility to navigate from statement lines to the associated journal entry #678

Conversation

JordiBForgeFlow
Copy link
Member

Through a button. Adds also the journal entry number as an optional field.

image

cc @etobella @pedrobaeza @alexis-via

@OCA-git-bot
Copy link
Contributor

Hi @alexis-via,
some modules you are maintaining are being modified, check this out!

@pedrobaeza pedrobaeza added this to the 16.0 milestone Aug 5, 2024
self.ensure_one()
if not self:
return {}
action = self.env.ref("account.action_move_line_form").sudo().read()[0]
Copy link
Member

Choose a reason for hiding this comment

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

Please use the newer form to do this with self.env["ir.actions.actions"]._for_xml_id()

action["view_mode"] = "form"
action["res_id"] = self.move_id.id
del action["view_id"]
del action["views"]
Copy link
Member

Choose a reason for hiding this comment

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

You are removing here the possible specific form view. This can have side effects.

@JordiBForgeFlow
Copy link
Member Author

@pedrobaeza Thanks. I have attended your review comments

@pedrobaeza
Copy link
Member

You should squash by default the commits, as it doesn't add value. We have here in GitHub a differential view of the latest changes already.

@JordiBForgeFlow JordiBForgeFlow force-pushed the 16.0-account_reconcile_oca-statement_line_account_move branch from 7e00485 to d258d50 Compare August 5, 2024 13:02
@JordiBForgeFlow
Copy link
Member Author

Squashed.

What I don't like about adding the button is that it shows always. We cannot make it optional, as it happens with normal fields.

@pedrobaeza
Copy link
Member

pedrobaeza commented Aug 5, 2024

Really? You can make it invisible AFAIK.

…ent lines to the

associated journal entry through a button. Adds also the journal entry number
as an optional field
Copy link
Member

@etobella etobella left a comment

Choose a reason for hiding this comment

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

I don't see a problem on leaving the button visible 🤔

@pedrobaeza
Copy link
Member

Sorry, I wrote the reverse sentence: "you can make the button invisible with the attrs thing AFAIK". Can you try?

@JordiBForgeFlow
Copy link
Member Author

@pedrobaeza Can we merge this one?

@pedrobaeza
Copy link
Member

Please do it invisible when no move present.

@JordiBForgeFlow
Copy link
Member Author

Please do it invisible when no move present.

I do not understand your suggestion. there's always a move.

Copy link
Member

@pedrobaeza pedrobaeza left a comment

Choose a reason for hiding this comment

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

Oh, sorry, my bad.

/ocabot merge minor

@OCA-git-bot
Copy link
Contributor

This PR looks fantastic, let's merge it!
Prepared branch 16.0-ocabot-merge-pr-678-by-pedrobaeza-bump-minor, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit 4cdefb6 into OCA:16.0 Sep 23, 2024
5 of 7 checks passed
@OCA-git-bot
Copy link
Contributor

Congratulations, your PR was merged at 0869f74. Thanks a lot for contributing to OCA. ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants