Skip to content

Instantly share code, notes, and snippets.

View legalsylvain's full-sized avatar

Sylvain LE GAL legalsylvain

View GitHub Profile
web_chatter_camera : https://github.com/OCA/web/pull/3479 PR : 6:21 AM
https://github.com/OCA/web/pull/3479/changes/d2faa894df27597418bb524612fb951a0a74851a : 6:21 AM
web_apply_field_style : https://github.com/OCA/web/pull/3478 : 6:18 AM
https://github.com/OCA/web/pull/3478/changes/55af633a2055a193ca0f469c4d49cc9c767039a3 : 6:18 AM
web_advanced_search : https://github.com/OCA/web/pull/3477 : 6:17 AM
https://github.com/OCA/web/pull/3477/changes/85e5f7addac2377f7a7ee7bb60fcf54b4ca1eda4 : 6:17 AM
web_action_conditionable : https://github.com/OCA/web/pull/3476 : 6:08 AM
@legalsylvain
legalsylvain / repo-maintainer-conf-parser.py
Created December 18, 2023 19:59
repo-maintainer-conf parser
import yaml
import os
from selenium import webdriver
import urllib
members_dict = {}
representatives_dict = {}
contributors_dict = {}
@legalsylvain
legalsylvain / gist:9f54eadadeb06e9ef6b13afaee49fb8d
Created November 10, 2021 10:19
stock-picking-batch + l10n-it-stock-ddt
RPC_ERROR
Odoo Server Error
Traceback (most recent call last):
File "/home/odoo/src/odoo/15.0/odoo/tools/convert.py", line 680, in _tag_root
f(rec)
File "/home/odoo/src/odoo/15.0/odoo/tools/convert.py", line 583, in _tag_record
record = model._load_records([data], self.mode == 'update')
File "/home/odoo/src/odoo/15.0/odoo/models.py", line 4398, in _load_records
records = self._load_records_create([data['values'] for data in to_create])
File "/home/odoo/src/odoo/15.0/odoo/models.py", line 4327, in _load_records_create
<record id="issuer_1" model="meal.voucher.issuer">
<field name="name">Chèque Déjeuner</field>
<field name="commercial_name">Up Déjeuner</field>
</record>
<record id="issuer_2" model="meal.voucher.issuer">
<field name="name">Edenred France</field>
<field name="commercial_name">Ticket Restaurant</field>
</record>
### Odoo Commands
run_odoo_12 () {
cmd="sudo su odoo12 -c './env/bin/python3 ./src/odoo/odoo-bin -c ./odoo.cfg $@'";
eval "$cmd";
}
run_odoo_8 () {
cmd="sudo su odoo8 -c './env/bin/python2 ./src/odoo/openerp-server -c ./odoo.cfg $@'";
eval "$cmd";
}
# Firefox Addons
## https://addons.mozilla.org/fr/firefox/addon/ublock-origin/
## https://addons.mozilla.org/fr/firefox/addon/odoo-debug/
## https://addons.mozilla.org/fr/firefox/addon/disconnect/
## https://addons.mozilla.org/en-US/firefox/addon/nimbus-screenshot/
# Installation of sublim Text
sudo apt-get install apt-transport-https ca-certificates curl software-properties-common -y
curl -fsSL https://download.sublimetext.com/sublimehq-pub.gpg | sudo apt-key add -
sudo add-apt-repository "deb https://download.sublimetext.com/ apt/stable/"
server {
listen 443;
server_name ERP.MY_DOMAIN.TLD;
# Time Out
proxy_connect_timeout 60000;
proxy_send_timeout 60000;
proxy_read_timeout 60000;
send_timeout 60000;
keepalive_timeout 60000;
# Multi Action
<act_window id="base.action_partner_mass_mail"
name="[TITLE]"
src_model="my.src.model"
res_model="my.target.model.wizard"
view_mode="form"
multi="True"
target="new"
key2="client_action_multi"
For a many2many field, a list of tuples is expected. Here is the list of tuple that are accepted, with the corresponding semantics
(0, 0, { values }) link to a new record that needs to be created with the given values dictionary
(1, ID, { values }) update the linked record with id = ID (write values on it)
(2, ID) remove and delete the linked record with id = ID (calls unlink on ID, that will delete the object completely, and the link to it as well)

Squatch

git rebase -i NOM_BRANCH~[X]

pick C1 s C2 pick C3 ... pick CX

-> merge C2 et C1