Commit Graph

15 Commits (03b4657f53115d40ea0142e204bafb273147e5e6)

Author SHA1 Message Date
Pedro M. Baeza dea48a328a [FIX] base_comment_template: Consider multi-company and partners
In a multi-company context, if you put a template with company_id set,
this template is trying to be assigned to any document, no matter which
company it belongs, as it runs in a sudo environment, or at least, you
can have several companies seen at the same time.

We add the company discriminant for avoiding this problem.

Furthermore, the previous code was adding a domain where the right
part may be `False` with the operator `in`, provoking an unexpected
behavior in the search.

This has been fixed stating directly the expected domain.

TT42591
2023-04-17 21:10:00 +02:00
João Marques 47ed1ea795 [FIX] base_comment_template: Filter domain correctly
1. Safe eval domain before checking if it is defined. This makes [] be "False" on the first check, and provides the proper use case for when the domain is empty
2. Use filtered_domain in record instead of a search in self. When on a compute, we are on a NewId context, so the search would always fail

TT29309
2021-05-25 11:26:33 +02:00
Pedro M. Baeza 5d73e93c19 [FIX] base_comment_template: Incorrect m2m column names + script + avoid FK constraint
- The name of the columns were swapped, so better to fix it for avoiding
  mistakes due to this.
- Migration script for detecting the condition and swap column names.
- On v12 > v13 migration, include JOINs for avoiding FK constraint,
  which `ON CONFLICT` clause doesn't protect.
2021-05-15 16:58:39 +02:00
Víctor Martínez 49a6955303 [IMP] base_comment_template: Refactor code and convert to Many2Many 2021-05-04 08:04:32 +02:00
Víctor Martínez 4f7c5bfa60 [IMP] base_comment_template: Add function to get_comment_template records 2021-04-08 14:34:41 +02:00
Carlos Roca c021cae969 [IMP] base_comment_template: Improved sentences on fields 2021-02-10 10:14:37 +01:00
teodoralexandru@nexterp.ro aed03521e2 [IMP] base_comment_template: Code refactorization 2021-02-09 09:06:22 +01:00
Mihai Fekete a7d9d189c4 [MIG] [13.0] Migrate base_comment_template from account_invoic_reporting. 2021-02-09 09:06:00 +01:00
Mihai Fekete 01354d0498 [IMP] base_comment_template: black, isort, prettier 2021-02-09 09:06:00 +01:00
Pedro M. Baeza 3a99194ede [FIX] base_comment_template: Make field truly company dependent
Previous field declaration was incorrect due to a typo, leading to non applying the
company dependent features.

Now everything is correct and the migration scripts care of moving data properly.
2021-02-09 09:06:00 +01:00
Ivan Todorovich 91c38cb852 [IMP] base_comment_template multi company rules
[IMP] Move comment_template_id from account_invoice_comment_template and make it company_dependant

[IMP] base_comment_template: Add test
2021-02-09 09:06:00 +01:00
Raf Ven 9fb9be3c35 [MIG] base_comment_template: Migration to 12.0 2021-02-09 09:06:00 +01:00
xavierjimenez e9c5502ad6 [MIG] base_comment_template: Migration to 11.0 2021-02-09 09:06:00 +01:00
Cedric Le Brouster 6faeafc02a [MIG] base_comment_template, invoice_comment_template: Migration to 10.0
Port modules base_comment_template and invoice_comment_template to V10
2021-02-09 09:06:00 +01:00
leNeo 56a9780994 [MIG] base_comment_template to 9.0 2021-02-09 09:06:00 +01:00