Before, postgres configuration was hardcoded. This worked OK for OCA's CI infrastructure, but failed in any other out there that had different defaults.
There's no need to hardcode it; Odoo already must have Postgres connection settings, so let's use those instead. This will make tests testable across different CI infrastructures.
base_external_dbsource 12.0.1.0.1
[UPD] Update base_external_dbsource.pot
Update translation files
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.
Translation: server-backend-12.0/server-backend-12.0-base_external_dbsource
Translate-URL: https://translation.odoo-community.org/projects/server-backend-12-0/server-backend-12-0-base_external_dbsource/
[UPD] Update base_external_dbsource.pot
Update translation files
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.
Translation: server-backend-12.0/server-backend-12.0-base_external_dbsource
Translate-URL: https://translation.odoo-community.org/projects/server-backend-12-0/server-backend-12-0-base_external_dbsource/
* Heavily refactor code for reusability
* Split all sources into independent modules
* Add more test coverage
* Add CRUD methods
* Add iterator execute return to roadmap
OCA Transbot updated translations from Transifex
* Migration of base_external_dbsource to odoo 9.0
* Fixing test error
* Moving test from yaml to python
* Fixing pylint error in test class
* Placeholder added to connection string text zone
* improving test coverage
OCA Transbot updated translations from Transifex
Cached methods should never return recordsets, which are tied to
specific context, env, cursor, uid. Instead, they should return IDs
which, later, can be browsed in the current context.
With this change _usable_rules() cached method is now returing ids instead
of a recordset, and also the _match_find method is properly browsing the
results ids of the cached method.
Includes:
- Normal migration steps.
- Usage of brand new `_inherit = "base"` in Odoo 10, which implies
removing a lot of monkey-patching code.
- Log a warning when multiple matches are found.
* Fix wrong README format.
* [FIX][base_import_match] Avoid UnicodeEncodeError.
When the model or field you chose was translated and had some non-ascii
character, you got an error like this: `UnicodeEncodeError: 'ascii' codec can't
encode character u'\xed' in position 15: ordinal not in range(128)`.
Now, using unicode strings, that won't happen again.
* Do not require a hidden field.
* Further unicode protection, add ondelete clause.
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.