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
<record id="view_soila_soila_table_File_Import_Soila_form" model="ir.ui.view"> | |
<field name="name">soila file_import_soila form</field> | |
<field name="model">soila.file_import_soila</field> | |
<field name="arch" type="xml"> | |
<form> | |
<group name="group_header"> | |
<h3>Open / Import ...</h3> | |
</group> | |
<group name="group_top" col="4"> |
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
get_data: async function(context, method ="load_plot", model="plotly", frame="report_widget"){ | |
let self = this; | |
self.context = context; | |
let data = await rpc.query({ | |
model: `${context.app_id}.${frame}`, | |
method: `${model}_${method}`, | |
args: [{"context":self.context}] | |
}).then((data)=>{ | |
return data ? data : false; | |
}); |
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
operator_list = ['(',')','+','/'] | |
formula = "(aaaa+bbbbb)/ctttt" | |
fomula_dict = [] | |
aux_var = '' | |
ix = 0 | |
for elem in formula: | |
if elem in operator_list: | |
if aux_var: | |
fomula_dict.append({'type':'name', 'value':aux_var, 'index':ix}) | |
ix += 1 |
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
#Buscar todos los archivos js que contienen la palabra 'my_keyword'. | |
find . -name "*.js" -exec grep my_keyword {} + | |
#Reemplazar en todos los archivos js la palabra my_keyword por other_word | |
find . -name "*.js" -exec sed -i "s/my_keyword/other_word/" {} + |
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
from docx.oxml.ns import qn | |
from docx.oxml import OxmlElement | |
def set_cell_border(cell, **kwargs): | |
""" | |
Set cell`s border | |
Usage: | |
set_cell_border( | |
cell, | |
top={"sz": 12, "val": "single", "color": "#FF0000", "space": "0"}, |
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
// The Base64 string of a simple PDF file | |
var b64 = 'JVBERi0xLjUKJYCBgoMKMSAwIG9iago8PC9GaWx0ZXIvRmxhdGVEZWNvZGUvRmlyc3QgMTQxL04gMjAvTGVuZ3RoIDg0OC9UeXBlL09ialN0bT4+CnN0cmVhbQp4AZVVbW/iOBD+K/NtW1W9+CUvzmlVCcjCcl26CLjrnaJ88BIvGylglBip/fc347QUdku3SFEyjmfGjx/PMxbAQAIXKYTAYw4RSJlCDJFkkEAcKlAQpxGkoJgCziBVAjhHC0M4mXECHDPICF+YQ6YMeISmpIT4VTiPT5zgGDMkmINjqBISBJoqxi/mSxMGHz8G890397g1wWCcDe3GLdAWNJg/ts6sx5vvlrIzmAXZPTCaWdjROJvobTAuzcZV7jGgoICi/Ssz7bKpts42hIci+7o1fro/vbsfja5Geuf0urq5IQCL2U+JPj240dxpZ7r59wO8z3mSi0QVcZrHnBdJ6D8qyqVKIYriQin/p6C94PjM3UTHm5n+ezv8MrnqNZWur/u2LieLDjHNDqvaCBDKhxBa40AkfjRH2P+AZGEwdrqulr3NqjZILa2EEOBaJohMbz+bavXD4cGHSdDrprw9rPWqhRjxK79Uv28f8usYs1MknrGU3rHws3d6bV6D+rLNlx0eE04Oz6hKjVtC3zYPaQ9F8GmztGW1We1pu/58QNzC/r2p0MGAeC9pE+N0qZ0G0dXMVK9MS4VOA595gLO1Xb0HZHoeSJTeEcjsv+yvwaID+YzvnDKMVJ6GYZGwPGKsSEROtZekuRAClJSF6v74MsR6PVdU4vdoZwn1BnKboeZR7p1Jsn8yBXhqO/cB5sFlWxAHfNMJ4LGUlaYCI4piXDpJRRHMLOkTa3aqG1+XXdjMtHbXLE37JALqQ/R/r2jqZ/5wG7tEReTBNBsGC/Pgipubn7UjxaF2JH+ndkR4pB15oB15Ujtx6CNRO0J5xwPtHNN7WjYDu6NVgt |
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
modeBarButtonsToAdd:[{ | |
self: self, | |
name: 'Download plot as svg', | |
icon: Plotly.Icons.camera, | |
saveFile: function(name, type, data){ | |
if (data != null && navigator.msSaveBlob) | |
return navigator.msSaveBlob(new Blob([data], { type: type }), name); | |
var a = $("<a style='display: none;'/>"); | |
var url = window.URL.createObjectURL(new Blob([data], {type: type})); | |
a.attr("href", url); |
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
## after ranger quits, cd to the chosen directory. | |
ranger() { | |
tempfile='/tmp/chosendir' | |
/usr/bin/ranger --choosedir="$tempfile" "${@:-$(pwd)}" | |
test -f "$tempfile" && | |
if [ "$(cat -- "$tempfile")" != "$(echo -n `pwd`)" ]; then | |
cd -- "$(cat "$tempfile")" | |
fi | |
rm -f -- "$tempfile" | |
} |
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
delete FROM "public"."ir_attachment" WHERE "public"."ir_attachment"."store_fname" LIKE '%' |
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
def _autofit_table(self, table): | |
for ir, _row in enumerate(table.rows): | |
for ic, _cell in enumerate(_row.cells): | |
## | |
_c = table.rows[ir].cells[ic] | |
tc = _c._tc | |
tcPr = tc.get_or_add_tcPr() | |
tcW = tcPr.get_or_add_tcW() | |
tcW.type = 'auto' |
NewerOlder