How to create widgets:
2022 m. spalio 24 d., pirmadienis
2022 m. spalio 21 d., penktadienis
Hiding view elements from specific view
Add context in view:
<field name="context">{ 'hide_field': 1}
</field>
Update attribute:
<xpath expr="//tree//field[@name='location_dest_id']" position="attributes">
<attribute name="invisible">context.get('hide_field')</attribute>
</xpath>
2022 m. spalio 18 d., antradienis
Odoo runing tests
Script path: /home/user/src/odoo15/odoo/odoo-bin
Pycharm config just for testing
-i module_name --log-level=test --test-enable --stop-after-init
Pycham config running project with tests:
-c ../conf/project_name.conf --dev=xml --update extention1,extention2 --test-enable
# This test should only be executed after all modules have been installed. @tagged('-at_install', 'post_install')
2022 m. spalio 13 d., ketvirtadienis
Connecting to psql remotely dbeaver
The server requested SCRAM-based authentication, but no password was provided.
Solution: Add progress password
$ sudo su - postgres
$ psql
ALTER USER "postgres" WITH PASSWORD 'password';
FATAL: no pg_hba.conf entry for host "xx.xx.xx.xxx", user "postgres", database "postgres", SSL on
How to solve this error on dbeaver:
Find out where is your hba file:
$ sudo -u postgres psql
postgres=# show hba_file;
/etc/postgresql/13/main/pg_hba.conf
# Add at bottom your eg: IP 111.111.11.11/21 trust
hostnossl all all 0.0.0.0/0 trust