Commit Graph

8 Commits (45258f6a4e29e3f9d7ebef3b1adcf34b66e41e4a)

Author SHA1 Message Date
Florian da Costa 45258f6a4e [FIX] autovacuum_message_attachment : fix inheriting_model feature 2024-04-09 18:04:12 +02:00
Florian da Costa 4f42cf895d [IMP] Allow to delete attachment without res_model
But allow it only if a file pattern is set, to avoid deleting all orphan attachments are some are auto-generated by Odoo
2023-12-28 16:39:40 +01:00
Akim Juillerat 1e19a4b6dd Add selection of attachments through inheriting model
Selection of attachments through inheriting model can be useful if
we want to purge attachments that are extended through another
model.

For example, shipping.label (from base_delivery_carrier_label)
inherits from ir.attachment but the attachment itself is linked to
the stock.picking model.
By using inheriting_model defined to shipping.label and setting
model_ids to stock.picking, we can safely select the attachments
linked to stock.pickings that are shipping labels and avoid deleting
any picking list or delivery note reports.
2023-11-28 12:27:14 +01:00
Akim Juillerat cb68657b8a Improve building of domain through osv.expression 2023-11-28 12:27:14 +01:00
Enric Tobella 7af9600631 [IMP] autovacuum_message_attachment: black, isort, prettier 2023-11-28 12:27:14 +01:00
Enric Tobella df5830a8c2 [FIX] autovacuum_message_attachment: The field name cannot be used as it is already present in other models 2023-11-28 12:27:14 +01:00
Enric Tobella 17c0e7dcc4 [REF] autovacuum_message_attachment: Improve the way we manage domains 2023-11-28 12:27:14 +01:00
Florian da Costa f9e56058e2 Add possibility to delete attachments 2023-11-28 12:23:23 +01:00