* Heavily refactor code for reusability
* Split all sources into independent modules
* Add more test coverage
* Add CRUD methods
* Add iterator execute return to roadmap
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.
The Odoo `_search` function performs a `sudo` on the first line of its
implementation, causing that the uid's wrapper (class BaseSuspendSecurityUid) is lost.
This is evidenced when a function with suspend security is called and in
its implementation needs the values of a 'one2many' field (it does a
`search` in another model without reading access) an Access Error is raised.
These 2 tests were checking the exact set of groups a user should have.
If these tests are ran in a database where a module is previously installed which adds more groups to the base role, these exact group sets would be inexact, although the behavior that is being tested was actually properly working.
With this patch, basically I'm testing if the user contains the groups from the roles, not the exact role set expected. It should work in integration scenarios.
@Tecnativa TT20468
* 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
* [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