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][IMP] account_reconcile_oca: Add auto-reconcile compatibility (Example: Rule to match invoices/bills) #762

Open
wants to merge 2 commits into
base: 16.0
Choose a base branch
from

Conversation

victoralmau
Copy link
Member

Add auto-reconcile compatibility (Example: Rule to match invoices/bills)

Please @pedrobaeza and @chienandalu can you review it?

@Tecnativa TT52146

@OCA-git-bot
Copy link
Contributor

Hi @etobella,
some modules you are maintaining are being modified, check this out!

@victoralmau victoralmau force-pushed the 16.0-imp-account_reconcile_oca-TT52146 branch from 52b89e6 to 839e42d Compare December 10, 2024 16:48
@@ -745,6 +754,7 @@ def create(self, mvals):
models = self.env["account.reconcile.model"].search(
[
("rule_type", "in", ["invoice_matching", "writeoff_suggestion"]),
("company_id", "in", result.mapped("company_id").ids),
Copy link
Member

Choose a reason for hiding this comment

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

With relation fields, no need to put mapped:

Suggested change
("company_id", "in", result.mapped("company_id").ids),
("company_id", "in", result.company_id.ids),

@@ -10,6 +10,16 @@ class TestReconciliationWidget(TestAccountReconciliationCommon):
@classmethod
def setUpClass(cls, chart_template_ref=None):
super().setUpClass(chart_template_ref=chart_template_ref)
# Auto-disable reconciliation model created automatically with
# generate_account_reconcile_model() to avoid side effects in tests
cls.invoice_matching_model = cls.env["account.reconcile.model"].search(
Copy link
Member

Choose a reason for hiding this comment

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

If it can be more than one, the variable name is not correct

@@ -999,6 +999,7 @@ def test_partner_name_with_parent(self):
)

self.invoice_matching_model.active = True
self.invoice_matching_model.match_text_location_label = False
Copy link
Member

Choose a reason for hiding this comment

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

Why a separated commit just for this?

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

Successfully merging this pull request may close these issues.

3 participants