Commit Graph

355 Commits

Author SHA1 Message Date
Jairo Llopis
ff92667288 base_import_match: Add conditionals to fields when importing.
This patch allows to import res.partner records by VAT when is_company==True by default.
2023-03-22 15:22:51 +01:00
Jairo Llopis
2fb7932ff1 base_import_match: Import deduplicator.
By default, when importing data (like CSV import) with the ``base_import``
module, Odoo follows this rule:

1. If you import the XMLID of a record, make an **update**.
2. If you do not, **create** a new record.

This module allows you to set additional rules to match if a given import is an
update or a new record.

This is useful when you need to sync heterogeneous databases, and the field you
use to match records in those databases with Odoo's is not the XMLID but the
name, VAT, email, etc.

After installing this module, the import logic will be changed to:

1. If you import the XMLID of a record, make an **update**.
2. If you do not:
   1. If there are import match rules for the model you are importing:
       1. Discard the rules that require fields you are not importing.
       2. Traverse the remaining rules one by one in order to find a match in
          the database.
          1. If one match is found:
             1. Stop traversing the rest of valid rules.
             2. **Update** that record.
          2. If zero or multiple matches are found:
             1. Continue with the next rule.
          3. If all rules are exhausted and no single match is found:
             1. **Create** a new record.
   2. If there are no match rules for your model:
      1. **Create** a new record.
2023-03-22 15:22:51 +01:00
beau sebastien
dd34c2e8a0 Merge pull request #206 from akretion/16-copier-update
UPD copier config
2023-03-03 15:32:55 +01:00
David Beal
e9032aa39f UPD copier config 2023-03-03 15:17:42 +01:00
ntsirintanis
14666c8c5b [MIG] base_external_system: Migration to 16.0 2023-02-07 12:26:29 +01:00
OCA-git-bot
b330ddba76 [UPD] README.rst 2023-02-06 16:29:30 +01:00
oca-ci
209dc609b4 [UPD] Update base_external_system.pot 2023-02-06 16:29:30 +01:00
Cesar Andres Sanchez
4c7a0f9184 [MIG] base_external_system: Migration to 15.0 2023-02-06 16:29:30 +01:00
Cesar Andres Sanchez
f7012c4576 [IMP] base_external_system: black, isort, prettier 2023-02-06 16:29:30 +01:00
Ronald Portier
748345c0b2 [FIX] base_external_system. Solve test error.
Testing fingerprint, with ignore_finger_print set to False, caused an error, because it would first set
ignore_fingerprint to False, then validate, never getting to actually setting the fingerprint, causing the
following stacktrace:
Traceback (most recent call last):

  File "/home/travis/build/OCA/server-backend/base_external_system/tests/test_external_system.py", line 28, in test_check_fingerprint_allowed

    self.record.write({"ignore_fingerprint": False, "fingerprint": "Data"})

  File "/home/travis/odoo-13.0/odoo/models.py", line 3573, in write

    fields[0].determine_inverse(real_recs)

  File "/home/travis/odoo-13.0/odoo/fields.py", line 1122, in determine_inverse

    self.inverse(records)

  File "/home/travis/odoo-13.0/odoo/fields.py", line 594, in _inverse_related

    target[field.name] = record_value[record]

  File "/home/travis/odoo-13.0/odoo/models.py", line 5629, in __setitem__

    return self._fields[key].__set__(self, value)

  File "/home/travis/odoo-13.0/odoo/fields.py", line 1087, in __set__

    records.write({self.name: write_value})

  File "/home/travis/odoo-13.0/odoo/models.py", line 3568, in write

    real_recs._validate_fields(set(vals) - set(inverse_fields))

  File "/home/travis/odoo-13.0/odoo/models.py", line 1176, in _validate_fields

    check(self)
2023-02-06 16:29:30 +01:00
Ronald Portier
5f08203852 [FIX] base_external_system. Correct file modes. 2023-02-06 16:29:30 +01:00
Ronald Portier
fcd6afbc9d [MIG] base_external_system Migration to 13.0 2023-02-06 16:29:30 +01:00
Ronald Portier
9297e48691 [IMP] : black, isort, prettier 2023-02-06 16:29:30 +01:00
Alexandre Díaz
e9296fe02c [MIG] base_external_system: Migration to 12.0 2023-02-06 16:29:30 +01:00
Dave Lasley
c3f9c89ff6 [MIG] base_external_system: Upgrade to v11
* Perform standard v11 migration
2023-02-06 16:29:30 +01:00
Dave Lasley
f3e3a2d6fa [IMP] base_external_system: Add create bypass
* In cases of deep inheritance, it may be required to create an adapter directly. Add an override in the create via the env context to support this.
* Add default system type if creating from an interface
* Fix interface assignment during creation in adapter
2023-02-06 16:29:30 +01:00
Dave Lasley
c6b750c5f7 [ADD] base_external_system: Implement interface/adapter (#993)
* [ADD] base_external_system: Implement interface/adapter for external systems

* base_external_system: Fix OS model, add inherits, add validate

* base_external_system: Usability and private key pass

* base_external_system: Use contextmanager in adapter client

* base_external_system: Move contextmanager to interface

* base_external_system: Include contextmanager on adapter and system

* base_external_system: Unify client

* Use password widget for password field

* Add tests & security

* Fix lint

* Add plaintext note
2023-02-06 16:29:30 +01:00
ferran-73
7dcd35caf2 [MIG] base_global_discount: 16.0 2023-01-27 08:50:18 +01:00
Weblate
ea3edcac6f Update translation files
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: server-backend-16.0/server-backend-16.0-base_user_role_history
Translate-URL: https://translation.odoo-community.org/projects/server-backend-16-0/server-backend-16-0-base_user_role_history/
2023-01-26 12:08:41 +00:00
Weblate
dce74a1a4c Update translation files
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: server-backend-16.0/server-backend-16.0-base_user_role
Translate-URL: https://translation.odoo-community.org/projects/server-backend-16-0/server-backend-16-0-base_user_role/
2023-01-26 11:42:11 +00:00
OCA-git-bot
6beaaa9151 [ADD] setup.py 2023-01-26 11:42:02 +00:00
OCA-git-bot
2f0e9b4839 [UPD] README.rst 2023-01-26 11:42:02 +00:00
OCA-git-bot
1e0af9aea8 [UPD] addons table in README.md 2023-01-26 11:42:01 +00:00
oca-ci
9841152136 [UPD] Update base_user_role_history.pot 2023-01-26 11:38:22 +00:00
oca-ci
65f8bd5052 [UPD] Update base_user_role.pot 2023-01-26 11:38:21 +00:00
OCA-git-bot
235228a60b Merge PR #186 into 16.0
Signed-off-by sebalix
2023-01-26 11:36:23 +00:00
Arnaud Pineux
842fca200f [MIG] base_user_role_history: Migration to 16.0 2023-01-24 09:59:01 +01:00
Ana Suárez
c0ecb18e51 Translated using Weblate (Spanish)
Currently translated at 100.0% (29 of 29 strings)

Translation: server-backend-13.0/server-backend-13.0-base_user_role_history
Translate-URL: https://translation.odoo-community.org/projects/server-backend-13-0/server-backend-13-0-base_user_role_history/es/
2023-01-24 09:12:12 +01:00
Ana Suárez
4f0f5cde7d Added translation using Weblate (Spanish) 2023-01-24 09:12:06 +01:00
OCA-git-bot
9a4c1eb744 [UPD] README.rst 2023-01-24 09:12:00 +01:00
oca-travis
df21cb484f [UPD] Update base_user_role_history.pot 2023-01-24 09:11:54 +01:00
Benoit Aimont
0a2d1def56 [FIX] base_user_role_history - prettier xml plugin 2023-01-24 09:11:48 +01:00
Benoit Aimont
5bf6cab02e [MIG] base_user_role_history: Migration to 13.0 2023-01-24 09:11:42 +01:00
Benoit Aimont
c3cd270067 [IMP] base_user_role_history: black, isort 2023-01-24 09:11:36 +01:00
OCA-git-bot
e0ffc2c3cd [ADD] icon.png 2023-01-24 09:11:30 +01:00
OCA-git-bot
9b52525f4a [UPD] README.rst 2023-01-24 09:11:24 +01:00
oca-travis
3ac853f052 [UPD] Update base_user_role_history.pot 2023-01-24 09:11:19 +01:00
Benoit Aimont
e42a8e29ca [12.0][MIG] base_user_role_history - migration from 9.0 to 12.0 2023-01-24 09:11:13 +01:00
Benoit Aimont
41c0290f94 [9.0][ADD] - base_user_role_history 2023-01-24 09:11:06 +01:00
ferran-73
f800171d05 [IMP] base_global_discount: black, isort, prettier 2022-12-29 09:31:34 +01:00
OCA-git-bot
fd70315d0a [UPD] README.rst 2022-12-29 09:12:39 +01:00
oca-ci
8c7a9d38c6 [UPD] Update base_global_discount.pot 2022-12-29 09:12:39 +01:00
Kiril Vangelovski
219ce37c06 [MIG] base_global_discount: Migration to 15.0 2022-12-29 09:12:39 +01:00
OCA-git-bot
290032447d [UPD] README.rst 2022-12-29 09:12:39 +01:00
oca-travis
a05e74ff6c [UPD] Update base_global_discount.pot 2022-12-29 09:12:39 +01:00
Omar (Comunitea)
4f6d02ebfe [MIG] base_global_discount: Migration to 14.0 2022-12-29 09:12:39 +01:00
OCA-git-bot
7bb699fd66 base_global_discount 13.0.2.0.0
Update translation files

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

Translation: server-backend-13.0/server-backend-13.0-base_global_discount
Translate-URL: https://translation.odoo-community.org/projects/server-backend-13-0/server-backend-13-0-base_global_discount/
2022-12-29 09:12:39 +01:00
david
20b56674bc [IMP] base_global_discount: add specific security group
This way, it will be easier to decide who can set discount or not. The
current group scope is too broad.

[UPD] Update base_global_discount.pot
2022-12-29 09:12:39 +01:00
Cas Vissers
aee312663f Translated using Weblate (Dutch)
Currently translated at 100.0% (20 of 20 strings)

Translation: server-backend-13.0/server-backend-13.0-base_global_discount
Translate-URL: https://translation.odoo-community.org/projects/server-backend-13-0/server-backend-13-0-base_global_discount/nl_NL/
2022-12-29 09:12:39 +01:00
Cas Vissers
1e48dcc729 Added translation using Weblate (Dutch) 2022-12-29 09:12:39 +01:00