Skip to content

[18.0][MIG] account_payment_mode_default_account#1488

Open
RicardCForgeFlow wants to merge 11 commits intoOCA:18.0from
ForgeFlow:18.0-mig-account_payment_mode_default_account
Open

[18.0][MIG] account_payment_mode_default_account#1488
RicardCForgeFlow wants to merge 11 commits intoOCA:18.0from
ForgeFlow:18.0-mig-account_payment_mode_default_account

Conversation

@RicardCForgeFlow
Copy link
Copy Markdown
Contributor

Migration of #1358

@RicardCForgeFlow RicardCForgeFlow force-pushed the 18.0-mig-account_payment_mode_default_account branch from 65a1c9c to a21e369 Compare July 25, 2025 09:56
Comment on lines +99 to +101
account_common.AccountTestInvoicingCommon.collect_company_accounting_data = classmethod(
_patched_collect_company_accounting_data
)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

could you explain why is this needed?

)


class TestAccountPaymentModeDefaultAccount(TransactionCase):
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

you can try using BaseCommon class to inherit for the test instead of TransactionCase

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The problem is here:

One option could be to do a PR to account_payment_order to use BaseCommon there. What do you think is cleaner, a patch in this module or changing account_payment_order

class AccountChartTemplate(models.AbstractModel):
_inherit = "account.chart.template"

def generate_properties(self, acc_template_ref, company):
Copy link
Copy Markdown
Contributor

@JordiMForgeFlow JordiMForgeFlow Jul 31, 2025

Choose a reason for hiding this comment

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

this method does not exist anymore in v18, could you check if it needs to be changed to something else? It may be _get_property_accounts()


def uninstall_hook(cr, registry):
env = api.Environment(cr, SUPERUSER_ID, {})
fields_mapping = [
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

odoo is not using ir.property anymore, but the company dependent fields are stored in the DB as jsonb to keep the values for the different companies. Therefore, you still need the hooks, but simply they should now be managing the filling of data directly in the field of the res.partner table

@RicardCForgeFlow RicardCForgeFlow marked this pull request as draft August 4, 2025 14:31
@RicardCForgeFlow RicardCForgeFlow force-pushed the 18.0-mig-account_payment_mode_default_account branch 3 times, most recently from d6b436e to 37341d1 Compare August 5, 2025 08:34
Comment thread account_payment_mode_default_account/models/fields.py
Comment thread account_payment_mode_default_account/models/fields.py
@RicardCForgeFlow RicardCForgeFlow force-pushed the 18.0-mig-account_payment_mode_default_account branch from 37341d1 to 3e01396 Compare September 8, 2025 13:41
@RicardCForgeFlow RicardCForgeFlow marked this pull request as ready for review September 8, 2025 13:42
@RicardCForgeFlow RicardCForgeFlow force-pushed the 18.0-mig-account_payment_mode_default_account branch from 3e01396 to 3e8483a Compare September 8, 2025 13:59
@github-actions
Copy link
Copy Markdown

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 Jan 11, 2026
@RicardCForgeFlow RicardCForgeFlow force-pushed the 18.0-mig-account_payment_mode_default_account branch 2 times, most recently from 8546508 to 51bb123 Compare January 12, 2026 12:30
@RicardCForgeFlow RicardCForgeFlow force-pushed the 18.0-mig-account_payment_mode_default_account branch from 51bb123 to 4b980d9 Compare January 12, 2026 12:58
@github-actions github-actions Bot removed the stale PR/Issue without recent activity, it'll be soon closed automatically. label Jan 18, 2026
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.

6 participants