Git Product home page Git Product logo

Comments (3)

Olimalt85 avatar Olimalt85 commented on July 21, 2024

I found that the problem was because of the mail template creation.

To debug it, i made a method "_get_mail_template" in the wizard that return the mail template like this :
image

And i had to change the lines related to the td of amount_untaxed,amount_total and amount_residual :
<td style="padding: 5px; border: 1px solid black; text-align: right;">${format_amount(inv.amount_untaxed * (inv.move_type == 'out_refund' and -1 or 1), inv.currency_id)}</td> <td style="padding: 5px; border: 1px solid black; text-align: right;">${format_amount(inv.amount_total * (inv.move_type == 'out_refund' and -1 or 1), inv.currency_id)}</td> <td style="padding: 5px; border: 1px solid black; text-align: right;">${format_amount(inv.amount_residual * (inv.move_type == 'out_refund' and -1 or 1), inv.currency_id)}</td>

I just add _signed after the fields names to resolve it.
Like this :
<td style="padding: 5px; border: 1px solid black; text-align: right;">${format_amount(inv.amount_untaxed_signed * (inv.move_type == 'out_refund' and -1 or 1), inv.currency_id)}</td> <td style="padding: 5px; border: 1px solid black; text-align: right;">${format_amount(inv.amount_total_signed * (inv.move_type == 'out_refund' and -1 or 1), inv.currency_id)}</td> <td style="padding: 5px; border: 1px solid black; text-align: right;">${format_amount(inv.amount_residual_signed * (inv.move_type == 'out_refund' and -1 or 1), inv.currency_id)}</td>

But when i try to change the mail template directly like this, it won't work i don't understand why?

from credit-control.

Olimalt85 avatar Olimalt85 commented on July 21, 2024

I found the last problem, it was caused by the "total_residual" function.
I had to change inv.amount_residual by inv.amount_residual_signed in it :
image

its now working well !

from credit-control.

github-actions avatar github-actions commented on July 21, 2024

There hasn't been any activity on this issue in the past 6 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days.
If you want this issue to never become stale, please ask a PSC member to apply the "no stale" label.

from credit-control.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.