Skip to content

Conversation

@AungKoKoLin1997
Copy link
Contributor

This PR fixes an issue that occurs when creating billings from the list view of credit notes, or when creating credit notes and invoices together by calling _create_billing from dependency modules or test cases.

@qrtl QT6260

@OCA-git-bot
Copy link
Contributor

Hi @Saran440,
some modules you are maintaining are being modified, check this out!

@AungKoKoLin1997 AungKoKoLin1997 force-pushed the 16.0-6260-fix_account_billing branch from 5c22ff1 to e87bbc8 Compare December 17, 2025 04:35
Copy link
Member

@yostashiro yostashiro left a comment

Choose a reason for hiding this comment

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

Code review. LGTM. 👍

Copy link
Member

@Saran440 Saran440 left a comment

Choose a reason for hiding this comment

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

LGTM 👍

In my opinion, should we add a new method so other modules can hook into it?

{
    "partner_id": partner.id,
    "bill_type": self._get_billing_type(),
    "billing_line_ids": [
        Command.create(
            {
                "move_id": m.id,
                "amount_total": m.amount_total * (-1 if m.move_type in ["out_refund", "in_refund"] else 1),
                "amount_residual": m.amount_residual * (-1 if m.move_type in ["out_refund", "in_refund"] else 1),
            }
        )
        for m in self
     ],
}

@AungKoKoLin1997
Copy link
Contributor Author

In my opinion, should we add a new method so other modules can hook into it?

@Saran440 I think it is better to have a method _prepare_billing_vals() instead of def _create_billing(): and do the creation inside def action_create_billing(): by calling _prepare_billing_vals().
How do you think?

@Saran440
Copy link
Member

I agree with you 👍

@AungKoKoLin1997
Copy link
Contributor Author

@yostashiro @Saran440 I added the new commit to follow up on my above comment.
#2195 (comment)

@OCA-git-bot
Copy link
Contributor

This PR has the approved label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖

1 similar comment
@OCA-git-bot
Copy link
Contributor

This PR has the approved label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖

Copy link

@nobuQuartile nobuQuartile left a comment

Choose a reason for hiding this comment

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

LGTM
Functional review

Copy link
Member

@yostashiro yostashiro left a comment

Choose a reason for hiding this comment

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

LGTM.

@AungKoKoLin1997 AungKoKoLin1997 force-pushed the 16.0-6260-fix_account_billing branch from 465141e to 6c8ebef Compare December 25, 2025 06:38
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.

LGTM

@etobella
Copy link
Member

/ocabot merge minor

@OCA-git-bot
Copy link
Contributor

On my way to merge this fine PR!
Prepared branch 16.0-ocabot-merge-pr-2195-by-etobella-bump-minor, awaiting test results.

@OCA-git-bot
Copy link
Contributor

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

@OCA-git-bot OCA-git-bot merged commit f1a85d2 into OCA:16.0 Dec 27, 2025
11 checks passed
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.

6 participants