Skip to content

Comments

Apply changes of various PRs #4

Open
tarteo wants to merge 1020 commits intoacsone:18.0-mig-subscription_ocafrom
tarteo:18.0-mig-subscription_oca
Open

Apply changes of various PRs #4
tarteo wants to merge 1020 commits intoacsone:18.0-mig-subscription_ocafrom
tarteo:18.0-mig-subscription_oca

Conversation

@tarteo
Copy link

@tarteo tarteo commented May 22, 2025

No description provided.


<data noupdate="1">
<record id="subscription_stage_draft" model="sale.subscription.stage">
<!-- <field eval="True" name="active"/> -->

Choose a reason for hiding this comment

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

Please remove if useless

</record>

<record id="subscription_stage_in_progress" model="sale.subscription.stage">
<!-- <field eval="True" name="active"/> -->

Choose a reason for hiding this comment

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

Same here

</record>

<record id="subscription_stage_closed" model="sale.subscription.stage">
<!-- <field eval="True" name="active"/> -->

Choose a reason for hiding this comment

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

Same here

</data>

<record id="close_reason_expensive" model="sale.subscription.close.reason">
<!-- <field eval="True" name="active"/> -->

Choose a reason for hiding this comment

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

Same here

</record>

<record id="close_reason_requirement" model="sale.subscription.close.reason">
<!-- <field eval="True" name="active"/> -->

Choose a reason for hiding this comment

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

Same here

</record>

<record id="close_reason_use" model="sale.subscription.close.reason">
<!-- <field eval="True" name="active"/> -->

Choose a reason for hiding this comment

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

Same here

</record>

<record id="close_reason_other" model="sale.subscription.close.reason">
<!-- <field eval="True" name="active"/> -->

Choose a reason for hiding this comment

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

Same here

action = self.env["ir.actions.act_window"]._for_xml_id(
"subscription_oca.sale_subscription_action"
)
action["domain"] = [("id", "=", self.subscription_id.id)]

Choose a reason for hiding this comment

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

I suppose the goal is to display the related form view.
You can use:
return self.subscription_id.get_formview_action()

today = date.today()
for subscription in self.search([]):
for subscription in self.search([], order="recurring_next_date asc"):
subscription = subscription.with_company(subscription.company_id)

Choose a reason for hiding this comment

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

Good catch 💪

closed_stage = self.env["sale.subscription.stage"].search(
[("type", "=", "post")], limit=1
)
self.close_reason_id = close_reason_id

Choose a reason for hiding this comment

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

self.write({
    "close_reason_id": close_reason_id,
    "stage_id": closed_stage.id,
})

@acsonefho
Copy link

Thank you @tarteo for your contribution 💪 Just minor changes 🙏

@tobiaszehntner
Copy link

@tarteo we have to abandon our migration PR because we no longer need it and don't have the time. Feel free to apply the requested changes and create your own PR to 18, I think we're pretty close.

@tarteo
Copy link
Author

tarteo commented May 23, 2025

Alright, well nonetheless thanks for your review and time! I'll apply your suggestions when I'll create a new PR. Have a nice weekend!

@tarteo tarteo force-pushed the 18.0-mig-subscription_oca branch 2 times, most recently from 105954a to 996eb61 Compare May 27, 2025 09:48
sbejaoui and others added 20 commits July 24, 2025 16:27
[UPD] Update product_contract_variable_quantity.pot

[UPD] README.rst
Currently translated at 100.0% (7 of 7 strings)

Translation: contract-12.0/contract-12.0-product_contract_variable_quantity
Translate-URL: https://translation.odoo-community.org/projects/contract-12-0/contract-12-0-product_contract_variable_quantity/it/
Currently translated at 100.0% (7 of 7 strings)

Translation: contract-12.0/contract-12.0-product_contract_variable_quantity
Translate-URL: https://translation.odoo-community.org/projects/contract-12-0/contract-12-0-product_contract_variable_quantity/pt_BR/
Currently translated at 100.0% (7 of 7 strings)

Translation: contract-12.0/contract-12.0-product_contract_variable_quantity
Translate-URL: https://translation.odoo-community.org/projects/contract-12-0/contract-12-0-product_contract_variable_quantity/pt/
Currently translated at 100.0% (7 of 7 strings)

Translation: contract-12.0/contract-12.0-product_contract_variable_quantity
Translate-URL: https://translation.odoo-community.org/projects/contract-12-0/contract-12-0-product_contract_variable_quantity/pt/
Currently translated at 100.0% (7 of 7 strings)

Translation: contract-12.0/contract-12.0-product_contract_variable_quantity
Translate-URL: https://translation.odoo-community.org/projects/contract-12-0/contract-12-0-product_contract_variable_quantity/pt_BR/
Currently translated at 100.0% (7 of 7 strings)

Translation: contract-12.0/contract-12.0-product_contract_variable_quantity
Translate-URL: https://translation.odoo-community.org/projects/contract-12-0/contract-12-0-product_contract_variable_quantity/fr/
@tarteo tarteo force-pushed the 18.0-mig-subscription_oca branch 2 times, most recently from baad433 to 150c702 Compare September 17, 2025 11:39
carlos-domatix and others added 27 commits September 17, 2025 13:52
Currently translated at 95.7% (159 of 166 strings)

Translation: contract-16.0/contract-16.0-subscription_oca
Translate-URL: https://translation.odoo-community.org/projects/contract-16-0/contract-16-0-subscription_oca/nl/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: contract-17.0/contract-17.0-subscription_oca
Translate-URL: https://translation.odoo-community.org/projects/contract-17-0/contract-17-0-subscription_oca/
Currently translated at 100.0% (163 of 163 strings)

Translation: contract-17.0/contract-17.0-subscription_oca
Translate-URL: https://translation.odoo-community.org/projects/contract-17-0/contract-17-0-subscription_oca/it/
Currently translated at 92.6% (151 of 163 strings)

Translation: contract-17.0/contract-17.0-subscription_oca
Translate-URL: https://translation.odoo-community.org/projects/contract-17-0/contract-17-0-subscription_oca/fi/

Added translation using Weblate (Finnish)
Currently translated at 61.3% (100 of 163 strings)

Translation: contract-17.0/contract-17.0-subscription_oca
Translate-URL: https://translation.odoo-community.org/projects/contract-17-0/contract-17-0-subscription_oca/tr/

Translated using Weblate (Turkish)

Currently translated at 58.8% (96 of 163 strings)

Translation: contract-17.0/contract-17.0-subscription_oca
Translate-URL: https://translation.odoo-community.org/projects/contract-17-0/contract-17-0-subscription_oca/tr/

Added translation using Weblate (Turkish)
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: contract-17.0/contract-17.0-subscription_oca
Translate-URL: https://translation.odoo-community.org/projects/contract-17-0/contract-17-0-subscription_oca/
Currently translated at 100.0% (164 of 164 strings)

Translation: contract-17.0/contract-17.0-subscription_oca
Translate-URL: https://translation.odoo-community.org/projects/contract-17-0/contract-17-0-subscription_oca/it/
Currently translated at 100.0% (164 of 164 strings)

Translation: contract-17.0/contract-17.0-subscription_oca
Translate-URL: https://translation.odoo-community.org/projects/contract-17-0/contract-17-0-subscription_oca/tr/
[IMP] subscription_oca: Use read_group for subscription count

Apply changes of OCA#1058

Apply changes of OCA#1224

Apply changes of OCA#1210

Apply changes of OCA#1167

subscription_oca: use get_formview_action

Fix close_reason_id visibility

Apply suggestions from review

Add "odoo 18"-like icon
@tarteo tarteo force-pushed the 18.0-mig-subscription_oca branch from 150c702 to 54f1d93 Compare September 17, 2025 11:52
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.