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

[FW][FIX] [16.0] l10n_es_edi_tbai, sudo on company when creating TicketBAI chain sequence for the first time #163432

Conversation

fw-bot
Copy link
Contributor

@fw-bot fw-bot commented Apr 25, 2024

Description of the issue/feature this PR addresses:

Spain localization l10n_es_edi_tbai module, sudo on company when creating TicketBAI chain sequence for the first time to avoid raise of access security errors without Administration/Settings.

Current behavior before PR:

When creating the first invoice, TicketBAI chain sequence does not exists therefore it is created, if user does not belong to Administration/Settings group, an access error is raised and invoice is not posted. In the same time, a write operation is done in the company to set the value of the sequence on l10n_es_tbai_chain_sequence_id field, and writing in a company only is allowed for users that belongs to Administration/Settings.

Desired behavior after PR is merged:

We make a sudo in self (res.company) with a user with account permission but not Administration/Settings, no errors are raised, invoice is posted and TicketBAI XML file is created and posted to the agency.


I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr

Forward-Port-Of: #162433

… sequence for the first time.

Before this commit:

When creating the first invoice TicketBAI chain sequence does not exists therefore it is created, if user does not belong to Administration/Settings
group, an access error is raised and invoice is not posted. In the same time, a write operation is done in the company to set the value of the sequence
on l10n_es_tbai_chain_sequence_id field, and writing in a company only is allowed for users that belongs to Administration/Settings.

With this commit:

We make a sudo in self (res.company), no errors are raised, invoice is posted and TicketBAI XML file is created and posted to the agency.

X-original-commit: 55bb16a
@robodoo
Copy link
Contributor

robodoo commented Apr 25, 2024

@fw-bot
Copy link
Contributor Author

fw-bot commented Apr 25, 2024

This PR targets 17.0 and is part of the forward-port chain. Further PRs will be created up to master.

More info at https://github.com/odoo/odoo/wiki/Mergebot#forward-port

@robodoo robodoo added the forwardport This PR was created by @fw-bot label Apr 25, 2024
@C3POdoo C3POdoo added the RD research & development, internal work label Apr 25, 2024
@robodoo robodoo closed this in 6a90fee Apr 26, 2024
willylohws pushed a commit to willylohws/odoo that referenced this pull request May 1, 2024
… sequence for the first time.

Before this commit:

When creating the first invoice TicketBAI chain sequence does not exists therefore it is created, if user does not belong to Administration/Settings
group, an access error is raised and invoice is not posted. In the same time, a write operation is done in the company to set the value of the sequence
on l10n_es_tbai_chain_sequence_id field, and writing in a company only is allowed for users that belongs to Administration/Settings.

With this commit:

We make a sudo in self (res.company), no errors are raised, invoice is posted and TicketBAI XML file is created and posted to the agency.

closes odoo#163432

X-original-commit: 55bb16a
Signed-off-by: William André (wan) <wan@odoo.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
forwardport This PR was created by @fw-bot RD research & development, internal work
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants