-
Notifications
You must be signed in to change notification settings - Fork 25
/
Copy pathaeroo.txt
80 lines (60 loc) · 2.38 KB
/
aeroo.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
setLang(o.partner_id.lang or 'en_US')
getLang()=="fr_FR" and u"Contact acheteur" or u"Order contact"
Pour afficher un champ sélection :
o.state and get_selection_item(o, 'state')
où 'state' est le champ sélection
Pour afficher la date :
formatLang(time.strftime('%Y-%m-%d'), date=True)
avec l'heure :
NE MARCHE PAS : formatLang(time.strftime('%Y-%m-%d %H-%M-%S'), date_time=True)
autres args de formatLang :
formatLang(self, value, digits=None, date=False, date_time=False, grouping=True, monetary=False, dp=False, currency_obj=False)
Affiche un montant avec devise :
formatLang(o.amount_untaxed, currency_obj=o.currency_id)
Affiche un montant avec précision décimale :
formatLang(o.amount_untaxed, dp='Account')
Détecter le nom du rapport :
if test="report_xml.report_name=='sale.proforma'"
Affiche le name_get:
get_name(l.product_id) # Permet d'afficher les options des variantes
for each=""
/for
if test=""
/if
choose
when test=""
/when
when test=""
otherwize
/otherwise
/choose
Saut de page avant fin de boucle for :
Menu Format->Paragraph : Onglet Enchainement (Text Flow) : Insérer : Type = Page ; Position = Après (select "Breaks" = insert page after)
Pour code barre ou image :
Cadre, onglet "option" : mettre dans le champ "Nom" :
image: asimage(company.logo or False, size_x=80, size_y=80, hold_ratio=True)
image: asimage(pack.get_128_barcode(thickness=2), 0)
ou
image: barcode(l.prodlot_id and l.prodlot_id.name or '0', code_type='code128', height=25)
'code128' ou 'code39' ou 'ean13'
ATTENTION, si on veut mettre 2 x le même code barre dans un rapport, comme il faut que chaque cadre ait un nom unique, il faut changer légèrement la formulation de l'appel de fonction barcode()
Autre solution : utiliser une police code barre type "code128.ttf" et la mettre sur le serveur dans /usr/local/share/fonts et redémarrer le libreoffice qui tourne en tâche de fond
Bloc addresse en v7
Bloc addresse en v8:
if test='o.partner_id.parent_id'
o.partner_id.parent_id.name
/if
o.partner_id.name
display_address(o.partner_id)
=======================================
Tableur
-------
Pour mettre une balise : insérer un Hyperlien de type Web/Internet
- ciable : python://balise
- Texte : si on veut, on peut mettre un texte + lisible, par exemple la balise sans python://
Balises testées :
python://if test="o.msds"
python:///if
python://for each="c in o.fragrance_ids"
c.substance_id.name
python:///for