Git Product home page Git Product logo

credit-control's Introduction

Runboat Pre-commit Status Build Status codecov Translation Status

credit-control

TODO: add repo description.

Available addons

addon version maintainers summary
account_credit_control 14.0.1.5.0 Account Credit Control
account_financial_risk 14.0.2.2.1 carlosdauden Manage customer risk
account_invoice_overdue_reminder 14.0.1.5.0 alexis-via Simple mail/letter/phone overdue customer invoice reminder
account_invoice_overdue_warn 14.0.1.0.0 alexis-via Show warning on customer form view if it has overdue invoices
account_invoice_overdue_warn_sale 14.0.1.0.0 alexis-via Show overdue warning on sale order form view
account_payment_return_financial_risk 14.0.1.0.0 Partner Payment Return Risk
partner_risk_insurance 14.0.1.1.0 Daniel-CA sergio-teruel omar7r Tardo Risk insurance partner information
sale_financial_risk 14.0.1.3.1 Manage partner risk in sales orders
sale_financial_risk_info 14.0.1.1.0 Adds risk consumption info in sales orders.
stock_financial_risk 14.0.1.0.1 Manage partner risk in stock moves

Licenses

This repository is licensed under AGPL-3.0.

However, each module can have a totally different license, as long as they adhere to Odoo Community Association (OCA) policy. Consult each module's __manifest__.py file, which contains a license key that explains its license.


OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use.

credit-control's People

Contributors

adrienpeiffer avatar alexis-via avatar carlosdauden avatar carmenbianca avatar chienandalu avatar cubells avatar ernestotejeda avatar extrememicro avatar felipemotter avatar francesco-ooops avatar ivorra78 avatar klodr avatar miquelrforgeflow avatar mymage avatar nbessi avatar nimarosa avatar oca-git-bot avatar oca-transbot avatar oca-travis avatar pedrobaeza avatar pedrocasi avatar psugne avatar qgroulard avatar sergio-teruel avatar sysadminmatmoz avatar thomich avatar victoralmau avatar vrenaville avatar weblate avatar yvaucher avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

credit-control's Issues

[12.0] Is there any credit_limit addon regarding sepa_direct_debit?

We have a developed financial risk addon that we have seen should not exist since the account_credit_control addon should be used
This addon controls with respect to the field: credit_control and all the payment_mode linked to sepa_direct_debit so that before confirming a sale_order it does NOT allow to create it if there is not enough credit (sum of amounts pending invoices with those payment methods and the sum of the amount of the sale_order that you want to confirm).

This addon is the base that we use for another developed regarding: https://www.cesce.es/ (site that allows requesting risk from a client) and for this reason we want to know if we should create that new addon called: sale_credit_control_sepa_direct_debit

The addon sale_credit_control_sepa_direct_debit would have account_credit_control as dependency

Later, we would upload another: cesce to https://github.com/OCA/l10n-spain with the dependency of: sale_credit_control_sepa_direct_debit

Is this correct or does something similar already exist or should it be stated differently?

Thank you very much.

sale_financial_risk - incorrect currency taken when computing amount

account_financial_risk allows to choose the currency in which the amount is being computed. sale_financial_risk does not take this currency into account while evaluating risk. Currency of active company is always used.

Module

sale_financial_risk

Describe the bug

This issue appears for multi-company, multi-currency configuration. Whenever risk is calculated for the partner, Sale Order amount is converted to company currency, instead of currency set on the partner (risk_currency_id).

To Reproduce

Affected versions: all

Steps to reproduce the behavior:

  1. Create Company A, currency EUR
  2. Create Company B, currency PLN
  3. Create currency rate EUR/PLN = 0.9
  4. Create Partner A:
    • Check Include Sales Orders in Financial Risk tab
    • Credit currency: Manual Credit Currency
    • Manual Credit Currency: EUR
    • Credit limit: 100
  5. Company B: create Sale Order for Partner A. Total 101 PLN
  6. A message appears: This sale order exceeds the financial risk
  7. In Partner A form, Financial risk tab, user can see, that risk was not exceeded.

Expected behavior
Message This sale order exceeds the financial risk should not appear.

Additional context
The issue is connected to incorrect currency taken during evaluation. [1] [2]

[14.0] Validation in `overdue_reminder_wizard` crashes: `'ir.actions.report' object has no attribute 'render'`

Module

account_invoice_overdue_reminder

Describe the bug

After the wizard has been opened, an error message appears when the created mail or letter is confirmed via the Validate button.

To Reproduce

Affected versions: 14.0 (tested just this version)

Steps to reproduce the behavior:

  1. Open the wizard "Overdue Invoice Remind"
  2. Select a customer and check the box for the actuality of the payments
  3. Click the " Start " button to go to the next view.
  4. Click the "Validate" button. This generates the error.

Expected behavior
It is expected that the corresponding reminder email will be sent or that the reminder letter will be issued.

Additional context
Error Message:

2022-05-13 10:33:47,979 110614 ERROR Company_Test odoo.http: Exception during JSON request handling. 
Traceback (most recent call last):
  File "/home/karo/Develop/Odoo_git/odoo/odoo/addons/base/models/ir_http.py", line 237, in _dispatch
    result = request.dispatch()
  File "/home/karo/Develop/Odoo_git/odoo/odoo/http.py", line 683, in dispatch
    result = self._call_function(**self.params)
  File "/home/karo/Develop/Odoo_git/odoo/odoo/http.py", line 359, in _call_function
    return checked_call(self.db, *args, **kwargs)
  File "/home/karo/Develop/Odoo_git/odoo/odoo/service/model.py", line 94, in wrapper
    return f(dbname, *args, **kwargs)
  File "/home/karo/Develop/Odoo_git/odoo/odoo/http.py", line 347, in checked_call
    result = self.endpoint(*a, **kw)
  File "/home/karo/Develop/Odoo_git/odoo/odoo/http.py", line 912, in __call__
    return self.method(*args, **kw)
  File "/home/karo/Develop/Odoo_git/odoo/odoo/http.py", line 531, in response_wrap
    response = f(*args, **kw)
  File "/home/karo/Develop/Odoo_git/odoo/addons/web/controllers/main.py", line 1398, in call_button
    action = self._call_kw(model, method, args, kwargs)
  File "/home/karo/Develop/Odoo_git/odoo/addons/web/controllers/main.py", line 1386, in _call_kw
    return call_kw(request.env[model], method, args, kwargs)
  File "/home/karo/Develop/Odoo_git/odoo/odoo/api.py", line 399, in call_kw
    result = _call_kw_multi(method, model, args, kwargs)
  File "/home/karo/Develop/Odoo_git/odoo/odoo/api.py", line 386, in _call_kw_multi
    result = method(recs, *args, **kwargs)
  File "/home/karo/Develop/Odoo_git/custom_addons/credit-control/account_invoice_overdue_reminder/wizard/overdue_reminder_wizard.py", line 511, in validate
    vals = rec.validate_mail()
  File "/home/karo/Develop/Odoo_git/custom_addons/credit-control/account_invoice_overdue_reminder/wizard/overdue_reminder_wizard.py", line 567, in validate_mail
    res = inv_report.render([inv.id])
Exception

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/karo/Develop/Odoo_git/odoo/odoo/http.py", line 639, in _handle_exception
    return super(JsonRequest, self)._handle_exception(exception)
  File "/home/karo/Develop/Odoo_git/odoo/odoo/http.py", line 315, in _handle_exception
    raise exception.with_traceback(None) from new_cause
AttributeError: 'ir.actions.report' object has no attribute 'render'

[13.0] double anglo booking when validating invoice

When you use account_financial_risk module on validation of the invoice books the anglo saxon part of the booking 2 times.
This is due to the fact the open_invoice module is called 2 times when following this flow.

account_invoice_overdue_reminder: include the credit notes in the process

Is your feature request related to a problem?
One of our customers would like to include the credit notes in the process. Here is why. They invoice twice a week all their customers. After delivery of products, they create credit notes. They don't reconcile the credit note with the invoice until the customer pays one of the due invoices and decide to deduct the credit note amount. It's not always 1 invoice - 1 credit note in the way their customer decide to pay. Once the credit note is deducted by the customer from the invoice of his choice, the matching is done in Odoo and the credit note is marked as "paid".

Describe the solution you'd like
The account_invoice_overdue_reminder could have an additionnal configuration "do you want to include open credit notes in the reminder process?"
If no => no change to current behavior
If yes => the open credit notes are included in the list of due invoices and in the table in the mail template. In addition, the checkbox "To check if unreconciled payments/refunds above have a good reason not to be reconciled with an open invoice" is not displayed (because not useful, the user would need to always check it manually).

Describe alternatives you've considered
Instead of including this credit note feature in the module, we could add it in a separate module.

Additional context
We can do the described development and propose it in this repo. Please advise if it can be useful to others and if a separate module would be best or not.
Thanks!
@alexis-via I'd be glad to get your feedback here.
@carmenbianca for follow-up next weeks when I'm off.

account_financial_risk, +related modules - Make stored all fields related to risk information

Context

I've reviewed all Risk Management (only Risk Management, not Credit Control or Reminders) modules and a lot of partner fields has a compute function with an @api.depends. This means that are being recomputed every time the fields in the @api.depends changes. The fields:

Risk Amounts:

  • risk_invoice_draft
  • risk_invoice_open
  • risk_invoice_unpaid
  • risk_account_amount
  • risk_account_amount_unpaid

Exceptions:

  • risk_total
  • risk_exception
  • risk_amount_exceeded

Currency:

  • risk_currency_id

Remaining Amounts:

  • risk_remaining_value
  • risk_remaining_percentage

The problem

These fields are not stored on the database and every recomputation, a precious time is wasted or not efficiently used.
Usually, if a field has an @api.depends, we store in the database to not trigger recomputation every time the field is read.

What I would like to change

I suggest make these fields stored on the database (the only thing needs to change is the store=True on each field, an easy solution) and have these fields available for search, compare, print on reports or views, etc. without an extra cost.

Desirable option

I prefer to store in the database and have all the data stored and updated at any point.
Maybe you want to make a spreadsheet with these data, send it to another system, show a full report and having this stored in the database will help to increase efficency.

If we are agree with this change I will make all the necessary PRs for v15+ for every module that depends on account_financial_risk (account_payment_return_financial_risk, sale_financial_risk, sale_payment_sheet_financial_risk)

Comments

What do you guys think about this? @rafaelbn @pedrobaeza @carlosdauden @MiquelRForgeFlow @fclementic2c

[12] Scheduling Credit Control Run and Compute activity

Hi, I want to schedule the activity for automatize the system of check and notify the customers that hasn't yet payed the invoices.

I try to create one but don't work, I'm not a python developers and I have some difficult to resolve it.

Can anyone help me?

Thanks,
Simone

Migration to version 14.0

Todo

https://github.com/OCA/maintainer-tools/wiki/Migration-to-version-14.0

Modules to migrate

Missing module? Check https://github.com/OCA/maintainer-tools/wiki/%5BFAQ%5D-Missing-modules-in-migration-issue-list

[sale_financial_risk] Sales orders not confirmed, but nobody is notified

When we try to confirm a sales order automatically (when the customer signs on the portal, for example) and the customer is over-risk, the order is simply not confirmed, but no one is notified.

Module

sale_financial_risk

To Reproduce

Tested in Version 15 enterprise:

Steps to reproduce the behavior:

  1. Create a quotation for a customer that is over-risk
  2. Sign the quotation from the user portal
  3. Check in the chatter that the quotation has been signed and however that it has not moved to the "sales order" stage.

Expected behavior
Followers are notified to make a decision

Credit control for companies who invoice same customers every month

Hello,

We have a customer who sells monthly subscriptions, thus a lot of invoices are created for each of their customers since each subscription is invoiced every months.

This may lead to a situation where there are many credit control lines for a single customer.
In such a case, our customer prefers to group all the credit control lines for a customer under the highest level among those lines. The goal here is to avoid sending X mails and letters to the same customer, grouping all credit control lines in a single reminder.

A way of improvement could be to add an option on policies in order to group credit control lines under the highest level.
Thus, only one credit control line per customer (per account) would be displayed, and when this line is selected for action (status change, send by email), the action would apply to all grouped lines at once.

What do you think of this issue ? Do you have any other ideas ?

[16.0]account_invoice_overdue_reminder. Incorrect overdue info on formview customer invoice

I have validated an overdue reminder for customer Test. On the listview I can see that 1 reminder is sent (first screenshot).

When I go to an invoice of this customer, I see the notification that there are overdue invoices and I can click on the link 'send an overdue reminder'. The result of clicking this option is the remark 'There are no overdue reminders'. This is confusing for the user.

Once a reminder is sent, it should be clear on the formview that the user does not have to remind until the next reminder date. In the case where no reminder was sent, the formview is godd as is (user can sent the reminder from the view)

Listview_sent_mail
Formview

[16.0]account_invoice_overdue_reminder: Partialy paid invoices not reminded

Module

[16]account_invoice_overdue_reminder

Describe the bug

It seems that, in v16, the account_invoice_overdue_reminder module does not take partially paid invoices into account in reminder.
If a customer has an invoice that has only been partially paid, it indicates that there is no reminder to be done for this customer.
This works well in v14 not in v16.

account_financial_risk: "Expected singleton: res.company(1, 2)" while evaluating 'model._autopost_draft_entries()

Odoo Version:

  • 13.0

I think it can be reproduced in 13.0 and above versions

Hi, the cron that calls the method _autopost_daft_entries() is raising an error due to account_financial_risk.

The error occurs when:

  • More than one company in odoo
  • More than one draft move in each company with auto_post = True.

The error is:

   File "/opt/odoo/auto/addons/account_financial_risk/models/account_invoice.py", **line 65, in post
     or self.company_id.allow_overrisk_invoice_validation**
   File "/opt/odoo/custom/src/odoo/odoo/fields.py", line 1021, in __get__
     record.ensure_one()
   File "/opt/odoo/custom/src/odoo/odoo/models.py", line 5104, in ensure_one
     raise ValueError("Expected singleton: %s" % self)
 ValueError: <class 'ValueError'>: "Expected singleton: res.company(1, 2)" while evaluating
 'model._autopost_draft_entries()'

We fixed the issue (was urgently in our instance ) with:

Original code:

    def action_post(self):
        if (
            self.env.context.get("bypass_risk", False)
            or self.company_id.allow_overrisk_invoice_validation
        )

Fixed code:

    def action_post(self):
        for sel in self:
            if (
                self.env.context.get("bypass_risk", False)
                or sel.company_id.allow_overrisk_invoice_validation
            ):
                return super().post()

Don't know if it's the best way to fix the issue.

Clarification and Enhancement Request for Financial Risk Security Groups

Hello,

We've observed an inconsistency regarding the visibility and editability of the "Financial Risk" tab within Odoo's billing and financial risk management functionalities. Specifically:

  1. Billing Users & Financial Risk Permissions: Billing users, without manager permissions in the financial risk security group, cannot view or edit the "Financial Risk" tab. However, granting them manager permissions allows approval of invoices exceeding the limit, despite not having access to view or configure the tab directly.

  2. Billing Managers & Access Restrictions: Billing managers can view the "Financial Risk" tab but are unable to edit it unless they have manager-level permissions in the financial risk security group.

  3. User Group Utility in Financial Risk: The user-level security group for financial risk appears to provide no functional access or editing permissions for the "Financial Risk" tab, which seems redundant as Odoo natively allows write permissions on the credit limit field.

This setup raises questions about the intended utility and differentiation of access levels, particularly for the user-level group in financial risk management. It seems there's an opportunity to clarify or enhance the role and permissions associated with these security groups to ensure a more intuitive and functional access control system.

Could we discuss potential adjustments or clarifications to these security group permissions to better align with user roles and operational needs?

@yajo My 5 minutes (2x) vídeo around this topic:
https://www.loom.com/share/c5e4b5298817425cac51be278079f50e?sid=3204edc3-e49a-40b1-94e3-7a554dcb51d6

My conclusion is:

  • Views should be managed with standard permission: billing, full accounting and accounting manager
  • Approve or not a sale or invoice which is blocked by exceded risk should be manager with a special security group as is in this moment with Financial Risk Manager

@moduon MT-4827 @yajo

[13.0] account_credit_control Error to render when send mail

When you try to send mail on selected lines a trace back is shown
Steps to reproduce

1 do a credit control run
2 go to generated lines and change state as to do
2 select lines to send mail, and try to send it

image

test it on run bot

tested on my side and got something similar, just for share

Fallo al renderizar la plantilla usando los valores {'format_date': <function MailTemplate._render_template.. at 0x7fecb5398730>, 'format_datetime': <function MailTemplate._render_template.. at 0x7fecb5430d08>, 'format_amount': <function MailTemplate._render_template.. at 0x7fecb44f29d8>, 'format_duration': <function MailTemplate._render_template.. at 0x7fecb44f22f0>, 'user': res.users(2,), 'ctx': {'lang': 'es_ES', 'tz': 'Europe/Madrid', 'uid': 2, 'allowed_company_ids': [1], 'active_id': 7, 'active_ids': [7], 'active_model': 'credit.control.communication', 'active_domain': [['id', 'in', [6, 7, 8, 10, 12, 13, 14, 9, 11]]], 'default_mass_mailing_name': False, 'default_mass_mailing_id': False, 'default_composition_mode': 'mass_post', 'default_model': 'credit.control.communication', 'default_res_id': 7, 'default_template_id': 38, 'custom_layout': None, 'tpl_partners_only': True}, 'object': credit.control.communication(7,)}

UndefinedError: 'odoo.api.credit.control.communication object' has no attribute 'get_contact_address'

@nbessi
@guewen

Migration to version 17.0

Todo

https://github.com/OCA/maintainer-tools/wiki/Migration-to-version-17.0

Modules to migrate

  • account_credit_control
  • account_credit_control_dunning_fees
  • account_financial_risk - By @Mat-moran - #347
  • account_invoice_overdue_reminder
  • account_payment_return_financial_risk
  • sale_financial_risk - By @sbiosca-s73 - #377
  • sale_financial_risk_info
  • stock_financial_risk

Missing module? Check https://github.com/OCA/maintainer-tools/wiki/%5BFAQ%5D-Missing-modules-in-migration-issue-list

Error installing the module

Module

account_credit_control

Describe the bug

malformed translation error

To Reproduce

version 13.0.2.3.1: The error occurs when installing the module

Steps to reproduce the behavior:

  1. Install the module "account_credit_control"

Expected behavior
Perform a complete and correct installation

Error 2
error 1

Migration to version 13.0

Todo

https://github.com/OCA/maintainer-tools/wiki/Migration-to-version-13.0

Modules to migrate

Missing module? Check https://github.com/OCA/maintainer-tools/wiki/%5BFAQ%5D-Missing-modules-in-migration-issue-list

[14.0]account_invoice_overdue_reminder : When i remove invoice from list in wizard, the residual become 0

Module

account_invoice_overdue_reminder

Describe the bug

When you use the reminder wizard in customers and delete a line from the invoice_ids field, the computed amount due of each line become 0
image
When i remove a line on invoice :
image

To Reproduce

Affected versions: 14.0

Steps to reproduce the behavior:

  1. Launch the action "Overdue Invoice Remind" in Invoicing/Customers/Overdue Invoice Remind
  2. Start the action
  3. Delete a line in the invoices list

Expected behavior
The residual amount should be computed normaly.

[16.0] account_invoice_overdue_reminder

After sending the first reminder, it is possible to manually add lines on the tab 'overdue reminder'. When I add a line fill in the reason and note I get an error on saving the record

error

Module

account_invoice_overdue_reminder

Error:
RPC_ERROR
Odoo Server Error
Traceback (most recent call last):
File "/odoo/src/odoo/odoo/http.py", line 1583, in _serve_db
return service_model.retrying(self._serve_ir_http, self.env)
File "/odoo/src/odoo/odoo/service/model.py", line 134, in retrying
result = func()
File "/odoo/src/odoo/odoo/http.py", line 1610, in _serve_ir_http
response = self.dispatcher.dispatch(rule.endpoint, args)
File "/odoo/src/odoo/odoo/http.py", line 1807, in dispatch
result = self.request.registry['ir.http']._dispatch(endpoint)
File "/odoo/src/odoo/addons/website/models/ir_http.py", line 235, in _dispatch
response = super()._dispatch(endpoint)
File "/odoo/src/odoo/odoo/addons/base/models/ir_http.py", line 154, in _dispatch
result = endpoint(**request.params)
File "/odoo/src/odoo/odoo/http.py", line 696, in route_wrapper
result = endpoint(self, *args, **params_ok)
File "/odoo/src/odoo/addons/web/controllers/dataset.py", line 42, in call_kw
return self._call_kw(model, method, args, kwargs)
File "/odoo/src/odoo/addons/web/controllers/dataset.py", line 33, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "/odoo/src/odoo/odoo/api.py", line 461, in call_kw
result = _call_kw_multi(method, model, args, kwargs)
File "/odoo/src/odoo/odoo/api.py", line 448, in _call_kw_multi
result = method(recs, *args, **kwargs)
File "/odoo/src/odoo/addons/account/models/account_move.py", line 2336, in onchange
return super().onchange(values, field_name, field_onchange)
File "/odoo/src/odoo/odoo/models.py", line 6513, in onchange
todo = [
File "/odoo/src/odoo/odoo/models.py", line 6516, in
if name not in done and snapshot0.has_changed(name)
File "/odoo/src/odoo/odoo/models.py", line 6299, in has_changed
return self[name] != record[name]
File "/odoo/src/odoo/odoo/models.py", line 5858, in getitem
return self._fields[key].get(self, type(self))
File "/odoo/src/odoo/odoo/fields.py", line 1157, in get
self.recompute(record)
File "/odoo/src/odoo/odoo/fields.py", line 1345, in recompute
self.compute_value(recs)
File "/odoo/src/odoo/odoo/fields.py", line 1367, in compute_value
records._compute_field_value(self)
File "/odoo/src/odoo/addons/mail/models/mail_thread.py", line 403, in _compute_field_value
return super()._compute_field_value(field)
File "/odoo/src/odoo/odoo/models.py", line 4193, in _compute_field_value
fields.determine(field.compute, self)
File "/odoo/src/odoo/odoo/fields.py", line 97, in determine
return needle(*args)
File "/odoo/custom/account_invoice_overdue_reminder/models/account_move.py", line 70, in _compute_overdue_reminder
move.overdue_reminder_last_date = all_dates and max(all_dates) or False
TypeError: '>' not supported between instances of 'bool' and 'datetime.date'

The above server error caused the following client error:
null

[15.0] Over-risk warning requires that user belongs to group: Administration/Access Rights

Module

sale_financial_risk

Describe the bug

When attempting to confirm a sale order with a customer with exceeded risk, a dialog box emerges informing that additional permissions are required.
"You are not allowed to access 'Models' (ir.model) records. This operation is allowed for the following groups: - Administration/Access Rights"
image

To Reproduce

Affected versions: V15

Steps to reproduce the behavior:

  1. Set a risk límit on a customer.
  2. Enter a sale quotation for that customer that causes over-risk.
  3. Try to confirm that quotation

Expected behavior
A dialog is shown informing you that the risk has been exceeded.

Additional context
Permissions on ir.model model has been changed from V15.
image

Migration to version 16.0

Todo

https://github.com/OCA/maintainer-tools/wiki/Migration-to-version-16.0

Modules to migrate

Missing module? Check https://github.com/OCA/maintainer-tools/wiki/%5BFAQ%5D-Missing-modules-in-migration-issue-list

[10.0] Travis is mis-configured

Travis is red on 10.0 branch, not because of the OCA modules it contains, but because of the environnement. Here is an extract of a pre-commit job on 10.0:

[INFO] This may take a few minutes...
An unexpected error has occurred: CalledProcessError: command: ('/home/travis/.cache/pre-commit/repoepo7_xo0/node_env-default/bin/node', '/home/travis/.cache/pre-commit/repoepo7_xo0/node_env-default/bin/npm', 'install', '--dev', '--prod', '--ignore-prepublish', '--no-progress', '--no-save')
return code: 1
expected return code: 0
stdout: (none)
stderr:
    npm WARN install Usage of the `--dev` option is deprecated. Use `--include=dev` instead.
    npm ERR! code ERESOLVE
    npm ERR! ERESOLVE unable to resolve dependency tree
    npm ERR! 
    npm ERR! While resolving: [email protected]
    npm ERR! Found: @angular/[email protected]
    npm ERR! node_modules/@angular/compiler
    npm ERR!   @angular/compiler@"8.2.13" from the root project
    npm ERR! 
    npm ERR! Could not resolve dependency:
    npm ERR! peer @angular/compiler@"^6.0.0 || ^7.0.0" from [email protected]
    npm ERR! node_modules/angular-estree-parser
    npm ERR!   angular-estree-parser@"1.1.5" from the root project
    npm ERR! 
    npm ERR! Fix the upstream dependency conflict, or retry
    npm ERR! this command with --force, or --legacy-peer-deps
    npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
    npm ERR! 
    npm ERR! See /home/travis/.npm/eresolve-report.txt for a full report
    npm ERR! A complete log of this run can be found in:
    npm ERR!     /home/travis/.npm/_logs/2022-02-14T14_23_46_407Z-debug-0.log
Check the log at /home/travis/.cache/pre-commit/pre-commit.log
The command "pre-commit run --all --show-diff-on-failure --verbose --color always" exited with 3.
cache.2
store build cache

travis_run_after_success: command not found
travis_run_after_failure: command not found
travis_run_after_script: command not found
travis_run_finish: command not found

Error de validacion

Module

Account Credit Control

Describe the bug

Las IDs externas no pueden contener espacios

To Reproduce

Affected versions:

Steps to reproduce the behavior:

  1. Download Version 14
  2. Install "Account Credit Control"

Expected behavior
The module will be installed successfully

Additional context
sql constraints exist, the problem is that the name "unique level" must not contain spaces, it must be "unique_level"
Captura

Multi-company support

Is this module ready for a multi-company implementation ? Where customers have different credit for different companies?

[12.0] account_financial_risk does not load translations correctly

Maybe Odoo12 has changed the method for load translations, I dont know, but with some changes, the translations load correctly. Tested with es.po

Examples:
_ to __ (double)
#: model:ir.model.fields,field_description:account_financial_risk.field_res_partner_move_line_ids
To
#: model:ir.model.fields,field_description:account_financial_risk.field_res_partner__move_line_ids

Or (model to model_terms)

#: model:ir.ui.view,arch_db:account_financial_risk.account_invoice_confirm_view

To

#: model_terms:ir.ui.view,arch_db:account_financial_risk.account_invoice_confirm_view

Thanks and best regards

send credit control by mail => Emailing Error

Hello

I am trying to send emails using the credit-control module. It creates a message in my outgoing queue that is later being send, so everything would be ok but unfortunately odoo is showing me an "Emailing error":

grafik

Is it somehow possible to send these mails without queuing? Or did I miss something setting this up?

account_invoice_overdue_reminder - requires admin rights to send mail

Module

account_invoice_overdue_reminder

Describe the bug

Cannot send overdue mail unless user has administrator rights

To Reproduce

Affected versions: 14.0

Steps to reproduce the behavior:

  1. Have an overdue invoice
  2. Go through the wizard forms
  3. 'Validate' will give an error about permissions

Expected behavior
Email should be sent, without having administrator level permissions.

Additional context
mail.mail model should be used with sudo() in this context, as it is everywhere else.

sale_financial_risk: partner_invoice_id issue 2

I do not understand why when you confirm a sales order, the amount goes to the Partner_id and not to the Partner_Invoice_id. When you create the invoice, this amount actually goes to the Partner-Invoice-id.

[RFC] Module account_invoice_overdue_reminder

From PR : #69
@alexis-via

Hello,
I propose to create new module maybe base_overdue_reminder for other module can used reminder (common class and function)
such as my pr: OCA/hr#870 inherited module account_invoice_overdue_reminder
and I thought manything can used common.
What do you think or any idea?

Thank you.

account_credit_control line communication relation

Hello,

I am questioning why the link between models 'credit.control.line' and 'credit.control.communication' is O2M since it is possible to execute several actions 'print' or 'send email' on the same 'credit.control.line' which each create a new 'credit.control.communication'.

If a new 'credit.control.communication' is created for a 'credit.control.line' already linked to one, the previous relation will be replaced by a relation between the 'credit.control.line' and the new 'credit.control.communication'.

Other than making old 'credit.control.communication' useless because not linked to any 'credit.control.line' anymore, this may have severer consequences:
When an email (generated from 'credit.control.communication') is sent we search on the communication the 'credit.control.line' in state 'queued' linked to it in order to change their state to 'sent'.
Now imagine that you take a 'credit.control.line', send it by email (which creates a first 'credit.control.communication'), then immediately print the line (which creates a second communication) while the email is queued and not yet actually sent.
Once the email is sent, odoo will look on the first 'credit.control.communication' for linked 'credit.control.line' and won't find any since the 'credit.control.line' is now linked to the second 'credit.control.communication'... Therefore the line will always remain in state 'queued' and never be set to 'sent' even though the email has been sent.

I believe a M2M relation would make more sense and solve this issue, but maybe there is a good reason behind this design choice ?

Migration to version 15.0

Todo

https://github.com/OCA/maintainer-tools/wiki/Migration-to-version-15.0

Modules to migrate

Missing module? Check https://github.com/OCA/maintainer-tools/wiki/%5BFAQ%5D-Missing-modules-in-migration-issue-list

Migration to version 12.0

Todo

https://github.com/OCA/maintainer-tools/wiki/Migration-to-version-12.0

Modules to migrate

[12.0] sale.order in done (lock) state

Hi,
Is it possible to make this modification?.
I think that modifying these lines could be solved.

  • sale_financial_risk/models/sale.py (line 72)

def _compute_risk_amount(self):
for line in self:
if line.state not in ('sale', 'done') and (
line.invoice_status != 'invoiced'):

line.risk_amount = 0.0
continue

  • sale_financial_risk/models/res_partner.py (line 24)

return self._get_risk_company_domain() + [
('state', 'in', ('sale', 'done')),
('commercial_partner_id', 'in', commercial_partners.ids),
]

In this way, a completed order would mean that your invoice status was invoiced

Thanks!

Warning when creating a Quotation

Right now, if you install the sale_financial_risk module, you get a warning when you try to confirm a quotatio,n if the client has exceeded the allowable risk (or this sale order would exceed it).

I think it would be nicer to have this warning upfront (as soon you create the quotation) so you don't waste resources trying to close a sale, that has to be renegotiated or has to be dropped completely because the partner has exhausted its credit limit.

A quick solution for this would be to extend the module so the implemented method which is called when a quotation is confirmed (action_confirm) is also called when you press the Send quotation by email (action_quotation_send) or you print the quotation (and print_quotation).

Is there any reason that discourages implementing this behavior?

Maybe, it should be configurable at company level so you can choose when to get the warning (at creation or at confirmation) and maybe, set different permissions, so commercials can ignore the warning when creation the quotation, but the confirmation of the sale has to be done by someone with appropriate permissions.

partner_risk_insurance on Sales

We need to manage risk insurance on sale orders.
During the creation of a new sale order, we need to display the amount covered by the insurance (amount covered - total of unpaid (invoices) - total orders not invoiced yet - total of the new current order).
Once the order is validated, this amount must be saved on the SO.

The question is:
Should we add this behavior into the existing partner_risk_insurance module? Or create a new one?

credit control queue job

Hello,

We need to integrate account_credit_control with queue job to generate a high number of credit control lines, and send a large volume of emails.

Our plan is to add a "Use queue jobs" flag on credit.control.run, so using the feature will be optional.

Is it acceptable / desirable to put this optional feature in the base module (which means a dependency on queue_job), or should we refactor the base module to allow for an extension module.

[15.0] account_financial_risk - Error in auto_post scheduled action: Expected singleton: res.company(1,2,3,4)

Odoo version

15.0

Module

account_financial_risk

Describe the bug

Scheduled Actions: Account; Post draft entries with auto_post set to True up to today fails with the following mensage:

ValueError: <class 'ValueError'>: "Expected singleton: res.company(1, 7, 6, 2, 3)" while evaluating
'model._autopost_draft_entries()'

To Reproduce

Affected versions:

Steps to reproduce the behavior:

  1. Create auto_post entries in more than one company
  2. Run the schedule action

Expected behavior
The scheduled action to run fine.

Additional context
In our instance we did the following fix in method _first_invoice_exception_msg:

Original code

    def _first_invoice_exception_msg(self):
        """
        Method used to return the first invoice with exception message.
        """
        ret = False, False
        if (
            self.env.context.get("bypass_risk", False)
            or self.company_id.allow_overrisk_invoice_validation
        ):
            return ret
        for invoice in self.filtered(lambda x: x.move_type == "out_invoice"):
            exception_msg = invoice.risk_exception_msg()
            if exception_msg:
                ret = invoice, exception_msg
                break
        return 

New code

    def _first_invoice_exception_msg(self):
        """
        Method used to return the first invoice with exception message.
        """
        ret = False, False
        if (
            self.env.context.get("bypass_risk", False)
        ):
            return ret
        for invoice in self.filtered(
            lambda x: x.move_type == "out_invoice" 
            and not x.company_id.allow_overrisk_invoice_validation
        ):
            exception_msg = invoice.risk_exception_msg()
            if exception_msg:
                ret = invoice, exception_msg
                break
        return 

[RFC][12.0] enhancement of sale_financial_risk

I'd like to propose a little enhancement related to the sale_financial_risk module.
It basically consists in adding:

  • a new state called Risk Exceeded to the sale order
  • a button called Bypass Risk, only visibile in state Risk Exceeded, to confirm the sale order

WDYT?

[12.0]Return to the letter channel while an email exists in the invoiced contact

Return to the letter channel while an email exists in the invoiced contact.

Module

OCA-credit-control

Describe the bug

After launching a "Run",
the channel assigned to the lines fallback to letter, even though an email address exists in the invoiced contact.
It would appear that the algorithm only takes into account the email address of the contact and not of the invoiced party.

To Reproduce

Version 12.0:

Steps to reproduce the behavior:

  1. Go to Invoicing
  2. In Credit control, configure your "Runs"
  3. Run channel action
  4. If exist email in partner, Communication Line is create
  5. If not existing email in partner, fallback to letter channel and no more communication line is create

Expected behavior
Take mail in invoice or partner invoice to keep email channel in result line of "Runs" and fallback in letter channel,
if not email existing in this two cases.

Additional context

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.