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

[16.0][ADD] account_multi_foreign_vat #387

Closed

Conversation

ArnauCForgeFlow
Copy link

No description provided.

Copy link

@LoisRForgeFlow LoisRForgeFlow left a comment

Choose a reason for hiding this comment

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

Some comments


class AccountFiscalPosition(models.Model):

_inherit = "account.fiscal.position"

Choose a reason for hiding this comment

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

You are inheriting twice account.fiscal.position in tow different files. Can you move this extension to the file with the name of the model?

Copy link
Author

Choose a reason for hiding this comment

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

Sure, my bad

Comment on lines +29 to +36
if not checked_country_code and not record.country_id:
raise ValidationError(
_("The foreign VAT number is not correct.")
) from e

Choose a reason for hiding this comment

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

Copy link
Author

Choose a reason for hiding this comment

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

Yes

Comment on lines 14 to 29
similar_fpos_domain = [
("foreign_vat", "!=", False),
("country_id", "=", record.country_id.id),
("company_id", "=", record.company_id.id),
("id", "!=", record.id),
]
if record.state_ids:
similar_fpos_domain.append(
("state_ids", "in", record.state_ids.ids)
)

similar_fpos_count = self.env["account.fiscal.position"].search_count(
similar_fpos_domain
)
if similar_fpos_count:
pass

Choose a reason for hiding this comment

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

at the end this code is just skipping the full check, isn't it? Why dont you just return pass?

Copy link
Author

Choose a reason for hiding this comment

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

Yes, you are right

@@ -0,0 +1,41 @@
======================================
Account Multi Foreign VAT

Choose a reason for hiding this comment

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

README files in OCA are autogenerated from fragments, see https://github.com/OCA/maintainer-tools/tree/master/template/module/readme

Copy link
Author

Choose a reason for hiding this comment

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

Okay, I didn't know

@dreispt
Copy link
Member

dreispt commented Nov 28, 2023

Are requested changes done @LoisRForgeFlow ?

@JordiMForgeFlow JordiMForgeFlow force-pushed the 16.0-add-account_multi_foreign_vat branch from 6997b3f to b297be1 Compare January 13, 2024 06:04
Copy link

There hasn't been any activity on this pull request in the past 4 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 PR to never become stale, please ask a PSC member to apply the "no stale" label.

@github-actions github-actions bot added the stale PR/Issue without recent activity, it'll be soon closed automatically. label May 12, 2024
@github-actions github-actions bot closed this Jun 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale PR/Issue without recent activity, it'll be soon closed automatically.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants