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

[14.0][mis_builder_cash_flow_forecast_contract] The Company and the Company of the Account must be the same. #91

Open
WesleyOliveira98 opened this issue Jan 23, 2025 · 0 comments

Comments

@WesleyOliveira98
Copy link
Contributor

Modules

mis_builder_cash_flow_forecast_contract
mis_builder_cash_flow_forecast_purchase
mis_builder_cash_flow_forecast_sale
mis_builder_cash_flow_forecast_sale_invoice_plan

Describe the bug
Error when trying to create mis_builder_cash_flow_forecast lines with cron, even when the company and account company are the same

Error:

Exception:odoo.exceptions.ValidationError
Traceback (most recent call last):
  File "/opt/odoo/auto/addons/queue_job/controllers/main.py", line 110, in runjob
    self._try_perform_job(env, job)
  File "/opt/odoo/auto/addons/queue_job/controllers/main.py", line 37, in _try_perform_job
    job.perform()
  File "/opt/odoo/auto/addons/queue_job/job.py", line 525, in perform
    self.result = self.func(*tuple(self.args), **self.kwargs)
  File "/opt/odoo/auto/addons/mis_builder_cash_flow_forecast_purchase/models/purchase_order.py", line 239, in _generate_mis_cash_flow_forecast_lines
    return self.env["mis.cash_flow.forecast_line"].create(values)
  File "<decorator-gen-66>", line 2, in create
  File "/opt/odoo/custom/src/odoo/odoo/api.py", line 353, in _model_create_multi
    return create(self, arg)
  File "/opt/odoo/custom/src/odoo/odoo/addons/base/models/ir_fields.py", line 534, in create
    recs = super().create(vals_list)
  File "<decorator-gen-15>", line 2, in create
  File "/opt/odoo/custom/src/odoo/odoo/api.py", line 353, in _model_create_multi
    return create(self, arg)
  File "/opt/odoo/custom/src/odoo/odoo/models.py", line 3899, in create
    records = self._create(data_list)
  File "/opt/odoo/custom/src/odoo/odoo/models.py", line 4072, in _create
    records._validate_fields(name for data in data_list for name in data['stored'])
  File "/opt/odoo/custom/src/odoo/odoo/models.py", line 1277, in _validate_fields
    check(self)
  File "/opt/odoo/auto/addons/mis_builder_cash_flow/models/mis_cash_flow_forecast_line.py", line 44, in _check_company_id_account_id
    raise ValidationError(
odoo.exceptions.ValidationError: The Company and the Company of the Account must be the same.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant