This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import pandas as pd | |
| from dash import Dash, dash_table, dcc, html | |
| import plotly.express as px | |
| countries = [ | |
| { | |
| 'name': 'Egypt', | |
| 'imf_economy_classification': { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| id: match-specific-function | |
| language: python | |
| rule: | |
| kind: function_definition | |
| regex: def action_confirm | |
| inside: | |
| kind: block | |
| has: | |
| regex: sale.order |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $path = "file_list.csv" | |
| $csv = Import-Csv -Delimiter "," -path $path | |
| foreach($line in $csv) | |
| { | |
| $filenewname = ($line.name + "." + $line.format) | |
| Write-Host $filenewname | |
| rename-item -path $line.path -NewName $filenewname | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| xml_split -v -l 1 ./ir_model_fields_3.xml | |
| for name in $(ls | egrep -i 'ir_model_fields_3-*'); do | |
| sed -i -e '2i<odoo>\' $name | |
| sed -i -e '$a</odoo>\' $name | |
| done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| to install correct version of wkhtmltopdf for odoo | |
| https://github.com/wkhtmltopdf/packaging/issues/114#issuecomment-1118762067 | |
| https://github.com/wkhtmltopdf/packaging/files/8632951/wkhtmltox_0.12.5-1.jammy_amd64.zip | |
| https://github.com/wkhtmltopdf/packaging/files/8632973/wkhtmltox_0.12.1.4-1.jammy_amd64.zip |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
| { | |
| "folders": [ | |
| { | |
| "path": ".." | |
| }, | |
| { | |
| "path": "../../odoo_16" | |
| }, | |
| { | |
| "path": "../../enterprise_16" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| model = env['sale.order'] | |
| env.add_to_compute(model._fields['amount_total'], model.search([])) | |
| model.recompute() | |
| self.env.cr.commit() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| find . -name "*.pyc" -exec rm -f {} \; | |
| git ls-files --deleted | xargs git add | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sudo apt update && sudo apt upgrade -y | |
| sudo apt-get install adduser apt-transport-https build-essential ca-certificates calibre curl \ | |
| fonts-font-awesome fonts-inconsolata fonts-roboto-unhinted git gnupg-agent \ | |
| gsfonts init-system-helpers jing libbz2-dev libffi-dev libjpeg-dev libjs-underscore \ | |
| libldap2-dev liblzma-dev libncursesw5-dev libpq-dev libreadline-dev libsasl2-dev \ | |
| libsqlite3-dev libssl-dev libxml2-dev libxmlsec1-dev libxslt1-dev llvm lsb-base make \ | |
| postgresql postgresql-client python3-dev software-properties-common tk-dev wget xfonts-75dpi \ | |
| xz-utils zlib1g-dev |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # used to delete a view that contains a removed field | |
| delete from ir_ui_view where position('FIELD_NAME' in arch_db)>0; | |
| # in odoo 16 ir_ui_view becomes a jsonb | |
| delete from ir_ui_view where arch_db->>'en_US' ilike '%FIELD_NAME%' ; | |
| update ir_ui_view set active = FALSE where position('FIELD_NAME' in arch_db)>0; |
NewerOlder