Skip to content

[FIX] partner_*_archive_propagate: bug fixes and unit tests#8

Closed
ntsirintanis wants to merge 6 commits into
16.0from
16.0-partner_archive_fixes
Closed

[FIX] partner_*_archive_propagate: bug fixes and unit tests#8
ntsirintanis wants to merge 6 commits into
16.0from
16.0-partner_archive_fixes

Conversation

@ntsirintanis

Copy link
Copy Markdown

No description provided.

NL66278 added 2 commits May 27, 2026 12:46
Currently translated at 100.0% (4 of 4 strings)

Translation: partner-contact-16.0/partner-contact-16.0-partner_multi_relation_archive_propagate
Translate-URL: https://translation.odoo-community.org/projects/partner-contact-16-0/partner-contact-16-0-partner_multi_relation_archive_propagate/nl/
@NL66278

NL66278 commented May 28, 2026

Copy link
Copy Markdown

@ntsirintanis I cannot find anywhere in Odoo (or in OCA modules present for VluchtelingenWerk) any code to propagate archiving to children via action_archive.

Where did you find this?

openeyedev@laptop-ronald:src$ grep -nrI --exclude-dir=i18n "def action_archive("
odoo/addons/mrp/models/mrp_routing.py:109:    def action_archive(self):
odoo/addons/mrp/models/mrp_workcenter.py:274:    def action_archive(self):
odoo/addons/mrp/models/product.py:111:    def action_archive(self):
odoo/addons/mrp/models/product.py:405:    def action_archive(self):
odoo/addons/project/wizard/project_task_type_delete.py:27:    def action_archive(self):
odoo/addons/point_of_sale/models/account_journal.py:35:    def action_archive(self):
odoo/odoo/models.py:5088:    def action_archive(self):

@ntsirintanis

Copy link
Copy Markdown
Author

@ntsirintanis I cannot find anywhere in Odoo (or in OCA modules present for VluchtelingenWerk) any code to propagate archiving to children via action_archive.

Where did you find this?

openeyedev@laptop-ronald:src$ grep -nrI --exclude-dir=i18n "def action_archive("
odoo/addons/mrp/models/mrp_routing.py:109:    def action_archive(self):
odoo/addons/mrp/models/mrp_workcenter.py:274:    def action_archive(self):
odoo/addons/mrp/models/product.py:111:    def action_archive(self):
odoo/addons/mrp/models/product.py:405:    def action_archive(self):
odoo/addons/project/wizard/project_task_type_delete.py:27:    def action_archive(self):
odoo/addons/point_of_sale/models/account_journal.py:35:    def action_archive(self):
odoo/odoo/models.py:5088:    def action_archive(self):

Yes, I rushed for that comment. So the problem (which is really minor, but it should be tackled) is that this

https://github.com/OCA/OCB/blob/4e41279573a36bd53cf25bdfa11d172c7391b5ae/odoo/models.py#L5088

calls this

https://github.com/OCA/OCB/blob/4e41279573a36bd53cf25bdfa11d172c7391b5ae/odoo/models.py#L5082

which ultimately messes up with our propagation logic here:

but only when force_outside_ui = True. In these cases action_archive should not call toggle_active() but just write() directly. All these concern archiving via the gear menu, and nothing else

Currently translated at 100.0% (3 of 3 strings)

Translation: partner-contact-16.0/partner-contact-16.0-partner_middlename
Translate-URL: https://translation.odoo-community.org/projects/partner-contact-16-0/partner-contact-16-0-partner_middlename/nl/
@NL66278

NL66278 commented May 28, 2026

Copy link
Copy Markdown

@ntsirintanis OK, add explanation of Archive via action and Archive with Children button to USAGE section of README. If time, you might expand the usage with some commented screenshots as documentation.

mymage added 2 commits May 29, 2026 13:46
Currently translated at 100.0% (14 of 14 strings)

Translation: partner-contact-16.0/partner-contact-16.0-partner_multi_relation_function
Translate-URL: https://translation.odoo-community.org/projects/partner-contact-16-0/partner-contact-16-0-partner_multi_relation_function/it/
Currently translated at 100.0% (4 of 4 strings)

Translation: partner-contact-16.0/partner-contact-16.0-partner_multi_relation_archive_propagate
Translate-URL: https://translation.odoo-community.org/projects/partner-contact-16-0/partner-contact-16-0-partner_multi_relation_archive_propagate/it/
@ntsirintanis ntsirintanis force-pushed the 16.0-partner_archive_fixes branch from 99019b3 to 0d8b128 Compare June 1, 2026 10:48
@ntsirintanis

Copy link
Copy Markdown
Author

@NL66278 pre-commit fails for an unrelated reason. Let's see if we can get these merged then, and cherry-pick to 18.0

@ntsirintanis ntsirintanis force-pushed the 16.0-partner_archive_fixes branch from 0d8b128 to ada1d8b Compare June 2, 2026 07:08
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