Re: [tryton] Add field to product
Hello, Is there a way to add a custom field to the product template using a new module? Did you try creating a class inheriting from Template which _name would be product.template ? I think it should make your model replace the default one. Jean -- tryton@googlegroups.com mailing list
Re: [tryton] Re: Form validation in a wizard (v2.2)
Thanks Jean for your help. I can't test this because I'm still using version 2.2, do you have a similar solution for 2.2 ? I am sorry, I started tryton on version 2.3-2.4 so I do not know how wizards work in 2.2... Good luck then ! Jean CAVALLO -- tryton@googlegroups.com mailing list
Re: [tryton] Re: Auto Id
Why do you want another auto increment field when you already have the id column ? He may be talking of something more like a sequence generator (Administration = Sequence) ? Jean CAVALLO -- tryton@googlegroups.com mailing list
Re: [tryton] Re: Form validation in a wizard (v2.2)
Ok I upgraded to v2.4 and did what you proposed. But i get the same problem as in v2.2 which is that self.raise_user_error causes stops execution and the wizard window is closed on the client... In fact my problem boils down to: how can I display a user message without stoping execution ? Well, I had this particular problem and had to use a workaround as it is not yet possible to do exactly that. The best way I came up with is what I suggested earlier : You use a button that points to a StateTransition in which you do your validation, then raise_user_error the message you want. When doing that, the client will stay on the latest displayed view, so it should be what need. There is no way yet to display a message with the possibility to resume execution, as the code you might want to resume is on the server when the message displaying is on the client. raise_user_warning sort of emulates that : when used, if the user clicks on 'Continue', it will re-execute the previously executed code then skip the warning. So even though it looks like execution did not stop, it did. You could talk to the tryton heads for more info, and do not hesitate to ask if my solution is not clear enough. Jean CAVALLO -- tryton@googlegroups.com mailing list
Re: [tryton] Install Tryton 2.4 Running from sources
1) on step Take a look at /etc/mercurial/hgrc.d/hgnested.rc, how to activate the extension., I'm seeing no indication in that file on how to activate the extension, other than, uncomment the following lines: # [extensions] No need for that, you really just need to uncomment in order to activate the extension. For your second point, I run a custom install of tryton on fedora, so someone else should answer you. Jean -- -- tryton@googlegroups.com mailing list
Re: [tryton] Creating this search doman
Here's the current domain that I have: What is the problem with this domain ? (error, does not work as intended...) Jean -- -- tryton@googlegroups.com mailing list
Re: [tryton] Use tryton as a framework
BTW, in my original message that has been lost, I also asked if there was a way to create a database from command line ? The -d option on the server (trytond) command should allow you to do so. You also can use proteus, which is a tool that directly connects to the tryton server and allows you to do almost everything you would do with the client, and create dbs http://hg.tryton.org/tryton-tools/file/bec1fddd9996/tryton_demo.py Jean -- -- tryton@googlegroups.com mailing list
Re: [tryton] dont show stack trace on exceptions
I think you are looking for this : https://github.com/openlabs/trytond-sentry Le lun. 6 juil. 2015 23:05, Mariano Ramon marianog.ra...@gmail.com a écrit : is there anyway to customize runtime errors that show the python exception and use a catch all with a more user friendly message?
Re: [tryton] Disabling creation/deletion on One2Many fields
2015-07-30 16:30 GMT+02:00 Sergi Almacellas Abellana se...@koolpi.com: There is some way to implement it without restricting create/delete access to sale.line model? I had this problem, and solved it by patching the client to hide the toolbar with an option to set in the view definition. I would be delighted if you found another solution ! Jean Cavallo *Coopengo*
Re: [tryton] Empty Party Address created with Proteus and Bypass Error.
2016-05-29 12:45 GMT+02:00 PhiJ <novap...@gmail.com>: > *You try to bypass an access rule. Document type: ir.sequence* > How I should give permissions to my user to avoid this error? > Also, you must be extra careful on rights management for sequences since there are special rights on sequence types that do not appear in group management screens. Jean Cavallo *Coopengo* -- You received this message because you are subscribed to the Google Groups "tryton" group. To view this discussion on the web visit https://groups.google.com/d/msgid/tryton/CAAc4%2BPYcODH%3DuhgkL_xxGbO_n0yPb11tTny3cZ1LbXDGxzt7-g%40mail.gmail.com.
Re: [tryton] Search
2016-05-13 15:26 GMT+02:00 piyush agrawal <piyush08ro...@gmail.com>: > JSON String : > *{"method":"model.party.party.search_read","params":[5,"c3eb5b0501c3430d97387f25a4d0ff24",[["rec_name","like","P"]],0,20,[],[],{"limit":20,"domain":[["rec_name","like","P"]],"offset":0,"order":[],"fields":[]}]}* > Be careful ! [["rec_name", "like", "P"]] means [["rec_name", "=", "P"]] try [["rec_name", "like", "P%"]] for instance Jean Cavallo *Coopengo* -- You received this message because you are subscribed to the Google Groups "tryton" group. To view this discussion on the web visit https://groups.google.com/d/msgid/tryton/CAAc4%2BPaqEF09UozjPHUEmC3zq9W--gR0FGwhbhwRV4TeoUdqQA%40mail.gmail.com.
Re: [tryton] Tryton client hung up when trying to send PDF to email and open automatically the same report
2016-08-04 17:27 GMT+02:00 Fabián <fabia...@gmail.com>: > - Many times Tryton hang up. Seems as it happens in the process when > convert ODT to PDF. In server I see there a lot of processes in background. > I put a few of them [2]. When processes are hang up, it is no possible to > pay any invoice because of the problem. We have had this problem for some time, and used the following approach : - Start a standalone unoconv server process - Patch trytond to connect to this running instance using pipe Also, which version of office are you using ? We had a rather old instance running which used LibreOffice version 3.5.4, and upgrading to 4.X made a huge difference (still some crashes, but not nearly as much as before). Finally, you should check the child process error code (in the actual call to unoconv), it contains the actual openoffice error code, which may help you find the root cause. See : https://github.com/coopengo/trytond/blob/master/trytond/report/report.py#L258 Jean Cavallo *Coopengo* -- You received this message because you are subscribed to the Google Groups "tryton" group. To view this discussion on the web visit https://groups.google.com/d/msgid/tryton/CAAc4%2BPZN047rQJrfEH90LTCDjFi2g-S_qcvOCkDphr9p17ewPg%40mail.gmail.com.
Re: [tryton] Tryton client hung up when trying to send PDF to email and open automatically the same report
2016-09-19 10:18 GMT+02:00 Cédric Krier <cedric.kr...@b2ck.com>: > > 2016-08-04 17:27 GMT+02:00 Fabián <fabia...@gmail.com>: > > - Patch trytond to connect to this running instance using pipe > > The patch to replace wait by communicate is interesting as there is a > warning in the doc: > https://docs.python.org/2.6/library/subprocess.html#subprocess.Popen.wait > > And the logger for bad returncode also. > > The close_fds should only be set on non-Windows OS. > > > See : > > https://github.com/coopengo/trytond/blob/master/trytond/ > report/report.py#L258 > > A patch will be welcomed. We use the "--no-launch" flag in our command line, and we manually have to start a unoconv process apart from the trytond process, so this would be some sort of "breaking" change in the way the server start is handled. Our deployment stack automatically handles restarting the unoconv process when it crashes (it still happens randomly), but I do not see how we could integrate it directly in the trytond server. Jean Cavallo *Coopengo* -- You received this message because you are subscribed to the Google Groups "tryton" group. To view this discussion on the web visit https://groups.google.com/d/msgid/tryton/CAAc4%2BPbL9%3Doz_dsPNapy3ntDFc4fcoDn2eNJQ%2B5XBZH3anuAxQ%40mail.gmail.com.
Re: [tryton] Netiquette: (was: Daily Cash Closing/hand over by Cash Clerk at Cash counter)
2016-09-23 17:44 GMT+02:00 Mathias Behrle <mbeh...@m9s.biz>: > > But no problem to add it on the mailing list pages. > > I will do it for English and French one, please administrator of other > > languages do the same. > > You are completely missing the point about "...first be reached a broader > agreement" and "consensus". The decision was made some time ago, so we should stick with it. https://groups.google.com/forum/?hl=en#!topic/tryton/-IA9TLq5qag Jean Cavallo *Coopengo* -- You received this message because you are subscribed to the Google Groups "tryton" group. To view this discussion on the web visit https://groups.google.com/d/msgid/tryton/CAAc4%2BPYRR3M0-7o5A004CAe36733TgNBfiUxNSaTKKhwNAmXjQ%40mail.gmail.com.
Re: [tryton] Re: Multiple Tryton server with one back-end DB
Hi, > Is it possible to have multiple Tryton server running on same or different machines but connecting to same database? This might help load balance and achieve high availability by putting tryton server behind proxy > server! Can also help overcome single-core limitation of Python! You *will* have cache problems, because default cache is in memory, so resets may not be triggered in all server instances. Consider using https://bitbucket.org/pokoli/redis-tryton to solve this. We are using multiple tryton instances with an nginx server, so I can confirm it works. Jean Cavallo *Coopengo* -- You received this message because you are subscribed to the Google Groups "tryton" group. To view this discussion on the web visit https://groups.google.com/d/msgid/tryton/CAAc4%2BPbAXeNbWa6h7YEqKO-b1_kEAuZgYm1njVzGA6dbR__Y%2BA%40mail.gmail.com.
Re: [tryton] Sorting the searched records
Hi, 2017-07-03 7:43 GMT+02:00 Khurram Shahzad <min2gr...@gmail.com>: > roundings = PatientRounding.search([ > ('name', '=', self.name), > ], order=[('evaluation_start', 'DESC')]) > What's the printed output of calling the search with the query=True parameter ? Jean Cavallo *Coopengo* -- You received this message because you are subscribed to the Google Groups "tryton" group. To view this discussion on the web visit https://groups.google.com/d/msgid/tryton/CAAc4%2BPakLWD5TVfvoJKTAm6bXx0X01VeRS%2BZme0P%2BLfjoqqCtA%40mail.gmail.com.
Re: [tryton] User is able to select values from read only Selection List
2017-05-26 9:31 GMT+02:00 Khurram Shahzad <min2gr...@gmail.com>: > I've tested on linux client on latest trunk and I can not reproduce it. >> Which SO and tryton version are you using? >> > > Tryton client 3.8.4 running on Ubuntu 16.10 & 16.04. Although Tryton > client 3.8.10 running on Windows 10 does not have this issue. > I've noticed (but could not reproduce at the time) that sometimes the client incorrectly shows a field as readonly (so it is "greyed out") but it still accepts inputs. I've seen it a few times and I am confident it was not supposed to be readonly at the time, so this could be a display bug that would make the field look like it is readonly when it is not. Saw it on Tryton 4.2 Ubuntu 16.10, no consistent reproductibility so far Jean Cavallo *Coopengo* -- You received this message because you are subscribed to the Google Groups "tryton" group. To view this discussion on the web visit https://groups.google.com/d/msgid/tryton/CAAc4%2BPakHTSJ1diBpKcZExxS6wk%3DKCJpsCgvQpG36HOh1CgzVw%40mail.gmail.com.
Re: [tryton-dev] Active Record the next step
Well, the patch is huuuge :) +1, I'm on it but I will need a few days to go through everything. Jean -- tryton-dev@googlegroups.com mailing list
Re: [tryton-dev] Active Record the next step
I tried to have a look at everything, though as a tryton newcommer I admit that I could not understand perfectly. Maybe you should upgrade a simple (or dummy) module and make a before-after comparison ? I saw bits of it in a few (mostly) test classes, but it often is renaming _name, removing _description and adding @staticmethod / @classmethod everywhere. No need yet for a review. It is more about the design. I like this design. It looks and feels cleaner and easier to use. One little question anyway : * Return objects instead of id's in create, search, etc. in trytond/tests/tests_wizard.py, + group_a_id = self.group.create({ + 'name': 'Group A', + })Which one is right ? Jean CAVALLO -- tryton-dev@googlegroups.com mailing list
Re: [tryton-dev] Active Record the next step
Maybe you should upgrade a simple (or dummy) module and make a before-after comparison ? I saw bits of it in a few (mostly) test classes, but it often is renaming _name, removing _description and adding @staticmethod / @classmethod everywhere. There are modules: ir, res and webdav. I meant something simpler, those are rather core modules. For instance the country or currency module. PS: Be careful, gmail has a poor html2text converter so prefer to post in plain text on mailing list (see how it looks weird). My mistake, I won't do it again. -- tryton-dev@googlegroups.com mailing list
Re: [tryton-dev] New Reference widget
Everyone, I talked with cedric about this, and we would really need some feedback on this so that we can design the solution that would be the more useful for all. If you encountered this problem before, your solution to it would be interesting as well, as we do not want to develop something that can already be done through some out-of-the-box thinking... Thank you. Jean CAVALLO -- tryton-dev@googlegroups.com mailing list
[tryton-dev] Wizard session forwarding
Hi all, I am looking for a way to access a wizard's session from within a One2Many field defined on one of the wizard's StateView. I want to initialize some data on the list's elements and need to look for data in the previous states of the wizard. Any idea ? Jean CAVALLO -- tryton-dev@googlegroups.com mailing list
Re: [tryton-dev] Wizard session forwarding
I am looking for a way to access a wizard's session from within a One2Many field defined on one of the wizard's StateView. I want to initialize some data on the list's elements and need to look for data in the previous states of the wizard. Use the default_state method. Well, I used this when I wanted to init basic type fields or Many2Ones. I would like a way to init new records of a One2Many, so I need code that will be called everytime I click on the New icon of the State's One2Many field. Jean CAVALLO -- tryton-dev@googlegroups.com mailing list
Re: [tryton-dev] Wizard session forwarding
Well, I used this when I wanted to init basic type fields or Many2Ones. I would like a way to init new records of a One2Many, so I need code that will be called everytime I click on the New icon of the State's One2Many field. It is default_field methods of the target. I know that, but how can I access the wizard's session from here ? Jean CAVALLO -- tryton-dev@googlegroups.com mailing list
Re: [tryton-dev] Wizard session forwarding
I know that, but how can I access the wizard's session from here ? You can not. Sorry for going back on this subject, but I consider it a problem. When using wizards, you got an access to the session almost everywhere, it should be possible to access it in state classes default methods. Wouldn't it be possible to add the session to the Transaction context or something like that ? Jean CAVALLO -- tryton-dev@googlegroups.com mailing list
Re: [tryton-dev] Wizard session forwarding
Wouldn't it be possible to add the session to the Transaction context or something like that ? You can still put the session id in the wizard view and use it in the context of the one2many. Thank you for that, one last question if I may : In terms of performance, is it better to serialize the session and transmit it over the network or use just the id and create an extra db access ? Btw, I still think it would be more consistent to have some kind of embedded way to access the session in this particular case. Jean CAVALLO -- tryton-dev@googlegroups.com mailing list
[tryton-dev] Enable Ctrl + Space on selection-like Dict entries (issue 809002)
Reviewers: , Description: Enable Ctrl + Space on selection-like Dict entries Safer get_values and lambdas. issue3163 Please review this at http://codereview.tryton.org/809002/ Affected files: M tryton/gui/window/view_form/view/form_gtk/dictionary.py Index: tryton/gui/window/view_form/view/form_gtk/dictionary.py === --- a/tryton/gui/window/view_form/view/form_gtk/dictionary.py +++ b/tryton/gui/window/view_form/view/form_gtk/dictionary.py @@ -81,11 +81,12 @@ widget.child.props.activates_default = True widget.child.connect('changed', self.parent_widget.send_modified) widget.child.connect('focus-out-event', -lambda w, e: self.parent_widget._focus_out()) +lambda *a: self.parent_widget._focus_out()) widget.child.connect('activate', -lambda w, e: self.parent_widget._focus_out()) +lambda *a: self.parent_widget._focus_out()) widget.connect('notify::active', -lambda w, e: self.parent_widget._focus_out()) +lambda *a: self.parent_widget._focus_out()) +widget.child.connect('key_press_event', self.sig_key_press) # setting completion and selection model = gtk.ListStore(gobject.TYPE_STRING) @@ -111,7 +112,16 @@ def get_value(self): text = self.widget.child.get_text() -return self._selection[text] +value = None +if text: +for txt, val in self._selection.items(): +if not val: +continue +if txt[:len(text)].lower() == text.lower(): +value = val +if len(txt) == len(text): +break +return value def set_value(self, value): values = dict(self.definition['selection']) @@ -120,6 +130,12 @@ def set_readonly(self, readonly): self.widget.set_sensitive(not readonly) +def sig_key_press(self, widget, event): +if event.type == gtk.gdk.KEY_PRESS \ +and event.state gtk.gdk.CONTROL_MASK \ +and event.keyval == gtk.keysyms.space: +self.widget.popup() + class DictIntegerEntry(DictEntry): expand = False
[tryton-dev] Selection widget of Dict fields should test if the value is in the list (issue 810002)
Reviewers: , Description: Selection widget of Dict fields should test if the value is in the list Please review this at http://codereview.tryton.org/810002/ Affected files: M tryton/gui/window/view_form/view/form_gtk/dictionary.py Index: tryton/gui/window/view_form/view/form_gtk/dictionary.py === --- a/tryton/gui/window/view_form/view/form_gtk/dictionary.py +++ b/tryton/gui/window/view_form/view/form_gtk/dictionary.py @@ -111,7 +111,16 @@ def get_value(self): text = self.widget.child.get_text() -return self._selection[text] +value = None +if text: +for txt, val in self._selection.items(): +if not val: +continue +if txt[:len(text)].lower() == text.lower(): +value = val +if len(txt) == len(text): +break +return value def set_value(self, value): values = dict(self.definition['selection'])
[tryton-dev] Safer lambda declaration (issue 827004)
Reviewers: , Please review this at http://codereview.tryton.org/827004/ Affected files: M tryton/gui/window/view_form/view/form_gtk/dictionary.py Index: tryton/gui/window/view_form/view/form_gtk/dictionary.py === --- a/tryton/gui/window/view_form/view/form_gtk/dictionary.py +++ b/tryton/gui/window/view_form/view/form_gtk/dictionary.py @@ -81,11 +81,11 @@ widget.child.props.activates_default = True widget.child.connect('changed', self.parent_widget.send_modified) widget.child.connect('focus-out-event', -lambda w, e: self.parent_widget._focus_out()) +lambda *a: self.parent_widget._focus_out()) widget.child.connect('activate', -lambda w, e: self.parent_widget._focus_out()) +lambda *a: self.parent_widget._focus_out()) widget.connect('notify::active', -lambda w, e: self.parent_widget._focus_out()) +lambda *a: self.parent_widget._focus_out()) widget.child.connect('key_press_event', self.sig_key_press) # setting completion and selection
[tryton-dev] tryton: Do not filter ids if group is None (issue3183) (issue 832002)
Reviewers: , Please review this at http://codereview.tryton.org/832002/ Affected files: M tryton/gui/window/view_form/screen/screen.py Index: tryton/gui/window/view_form/screen/screen.py === --- a/tryton/gui/window/view_form/screen/screen.py +++ b/tryton/gui/window/view_form/screen/screen.py @@ -174,7 +174,8 @@ domain = self.search_value self.screen_container.set_text(self.domain_parser.string(domain)) else: -domain = [('id', 'in', [x.id for x in self.group])] +if self.group: +domain = [('id', 'in', [x.id for x in self.group])] if domain: if self.domain:
Re: [tryton-dev] Colors of fields
2015-07-04 8:58 GMT+02:00 Cédric Krier cedric.kr...@b2ck.com: - the colors are not custumizable and so they could not work on some thèmes. Wouldn't it be better to make it configurable someway ? Our user will really feel the loss of colors as a loss of functionality of the client. 2015-07-04 10:49 GMT+02:00 Jordi Esteve jest...@zikzakmedia.com: The blue color and switching to red if the field is not filled is intuitive and clear for most people, the asterisk is not intuitive (needs a previous explanation), so I suggest adding a * without removing current behaviour. Agreed Jean Cavallo *Coopengo*
Re: [tryton-dev] Colors of fields and feedback for current interface
2015-07-05 9:41 GMT+02:00 Cédric Krier cedric.kr...@b2ck.com: I think the info which currently just says 'Invalid form' will need to be improved to give the name of the field with error and also I think we can give a explaination for: - required is simple: Field is required - domain invalid: Field must follow: domain parsed (only if we can parse it otherwise: Field is not valid for domain) Love this ! Jean Cavallo *Coopengo*
Re: [tryton-dev] Colors of fields
2015-07-07 0:50 GMT+02:00 Albert Cervera i Areny alb...@nan-tic.com: So here is a screenshot of such invalid form with missing required field and wrong value because of domain. I think it is really an improvement because now we explain to the user what is wrong and experienced user can still anticipate required fields. I agree it is a very good improvement. Indeed it looks rather good, and is very informative ! Jean Cavallo *Coopengo*
Re: [tryton-fr] Listes fields.selection imbriquées
Le 29 juillet 2015 11:16, Pascal Obstetar pascal.obste...@gmail.com a écrit : C'est nickel avec ce champ function ! Par contre comment faire avec ...vrai relation Many2One. Qu'entends-tu par là Cédric ? En fait, utiliser une string pour faire correspondre deux instances n'est pas idéal. La solution serait que le modèle Code ait un M2O vers un autre modèle Code Category qui contiendrait le champ name. Cette solution permet de garantir l'intégrité de façon plus sûre qu'avec des champs Char Jean Cavallo *Coopengo*
Re: [tryton-fr] Affichage du code tiers à la création du tiers
Le 11 août 2015 12:19, Pascal Obstetar pascal.obste...@gmail.com a écrit : Donc je voudrais récupérer à la création d'un nouveau PointSession le numéro de typeinv avec la fonction default_typeinv mais point.exit.typeinv.id est faux et self ne fonctionne pas avec la fonction default ? Le plus simple est de faire un on_change_point, qui met à jour le champs typeinv. Jean Cavallo *Coopengo*
Re: [tryton-fr] Affichage du code tiers à la création du tiers
Le 11 août 2015 12:31, Pascal Obstetar pascal.obste...@gmail.com a écrit : Le plus simple est de faire un on_change_point, qui met à jour le champs typeinv. Et tu mets quoi dans le on_change_point ? @fields.depends('point', 'typeinv') def on_change_point(self): self.typeinv = self.point.exite.typeinv.id if self.point else None Jean Cavallo *Coopengo*
Re: [tryton-fr] Aide développement module
Le 16 juillet 2015 11:40, Maxime Richez maxime.ric...@gmail.com a écrit : Bonjour, BIenvenue ! Est-il possible de rendre des lignes invisible dans un form_view en fonction d'un état? (avec un champs booleen et un eval readonly cela semble automatique) De quels type de lignes s'agit-il ? Un champs One2Many / Many2Many ? L'état est-il global ou bien ligne par ligne ? Jean Cavallo *Coopengo*
Re: [tryton-fr] Bouton Add non actif dans un wizard
2015-07-16 17:45 GMT+02:00 Pascal Obstetar pascal.obste...@gmail.com: J'ai le code ci-dessous, tous les boutons sont actifs sauf le bouton Add qui ne réagit pas. Ai-je omis quelque chose dans le Statetransition() ? Le bouton est bien cliquable ? Si c'est le cas, c'est que la transition ne retourne pas de nouvel état. La méthode transition_add doit retourner le nom de l'état suivant. Jean Cavallo *Coopengo*
Re: [tryton-fr] Renvoyer la ligne active dans un champ one2many
2015-07-12 11:46 GMT+02:00 Pascal Obstetar pascal.obste...@gmail.com: comment renvoyer la ligne sélectionnée d'emplacement dans Lignes = Stations.browse(Transaction().context.get('active_ids')) ? Ce n'est pas possible à ma connaissance. Dans quel contexte avez-vous besoin de cette information ? Jean Cavallo *Coopengo*
Re: [tryton-fr] Renvoyer la ligne active dans un champ one2many
Le 13 juillet 2015 09:14, Pascal Obstetar pascal.obste...@gmail.com a écrit : Je dois mettre à jour les données emplacement en sélection ceux contenu dans la station ! Quel est le déclencheur ? Jean Cavallo *Coopengo*
Re: [tryton-fr] Syntaxe inapproprié pour un domain ?
Le 25 août 2015 18:13, Pascal Obstetar pascal.obste...@gmail.com a écrit : Mais le domain ne prend en compte que Reptilia pas Amphibia. Où se trouve l'erreur de syntaxe ? Il faut utilise In Jean Cavallo *Coopengo*
Re: [tryton-fr] Syntaxe inapproprié pour un domain ?
Le 26 août 2015 08:07, Pascal Obstetar pascal.obste...@gmail.com a écrit : Donc je suppose que tu veux écrire: domain=[('classe', '=', If(Eval('listesessioncompartiment_typinv', 0) == 88, 'Reptilia', 'Amphibia'))] Non ce que je veux écrire : si listesessioncompartiement_typinv = 88 alors classe in ('Reptilia', 'Amphibia') Dans ce cas, essaie : domain=If(Eval('listesessioncompartiment_typinv', 0) == 88, [('classe', 'in', ('Reptilia', 'Amphibia')], []) Jean Cavallo *Coopengo*
Re: [tryton-fr] Syntaxe inapproprié pour un domain ?
Le 26 août 2015 11:31, Pascal Obstetar pascal.obste...@gmail.com a écrit : domain=[('classe', 'in', If(Eval('listesessioncompartiment_typinv', 0) == 88, ['Reptilia','Amphibia']))] le serveur me met une erreur de type ! If prend trois paramètres : If(condition, valeur si True, valeur si False) Jean Cavallo *Coopengo*
Re: [tryton-dev] Multiple level view inheritance
2015-09-29 11:36 GMT+02:00 Cédric Krier <cedric.kr...@b2ck.com>: > There was a mechanism for inherit from different model so I think it > still work if you don't set a model on the view. But some tests will be > needed to ensure this behaviour. > I assume you would be talking about this : http://hg.tryton.org/trytond/file/42c13797c1de/trytond/model/modelview.py#l277 The "pool.get" part cannot handle an empty model. I may take a look at this later. Thanks for your answer. Jean Cavallo *Coopengo*
[tryton-dev] Multiple level view inheritance
Hi all, I would like to override a view, and be able to use the modified version, without actually modifying the main view. I think I remember it to be possible, but I cannot manage to find how. I tried using an intermediate view : V3 inherits from V2 inherits from V1 But V3 modification were not used. I found a way to achieve the desired behaviour by modifying fields_view_get on ModelView, but I would like to be sure that it is not already possible before submitting a feature / review. Jean Cavallo *Coopengo*
Re: [tryton-fr] Valeur par défaut d'un champ one2many
Le 23 septembre 2015 15:57, Pascal Obstetar <pascal.obste...@gmail.com> a écrit : > @staticmethod > def default_sale_terms(): > if Transaction().user == 0: > return [] > return [('id', 'in', [45,46])] > return [45, 46] Jean Cavallo *Coopengo*
Re: [tryton-dev] New __init__ style
2016-08-24 13:15 GMT+02:00 Sergi Almacellas Abellana <se...@koolpi.com>: > I find that it has three advantages: >> >> - remove the "import *" >> - remove collision risk about class name >> - show which python file comes a class >> >> What do you think? >> > > It thing is a very good improvement, especially third point as knowing the > python file from which the class becomes very usefull for modules with a > lot of python files. +1 Jean Cavallo *Coopengo* -- You received this message because you are subscribed to the Google Groups "tryton-dev" group. To view this discussion on the web visit https://groups.google.com/d/msgid/tryton-dev/CAAc4%2BPYNmApsFwSq4AQuudn_Mz5S6xEqF-mdMy1_-s8Xhi%3DQvg%40mail.gmail.com.
Re: [tryton-dev] Stateless Trytond
2016-11-15 16:02 GMT+01:00 Mikhail Savushkin <kul...@gmail.com>: > As long as we're talking about millions of DBs, this straightforward > approach wont work. Maybe another approach could be to group the pools per module combinations ? i.e. the pool for DB1 which has the same installed modules than DB2 has could be the same one. I do not think there are that many "usable" combinations, and you could probably make it work. You could also dispatch on different servers depending on the installed modules on the target DB, you would just have to maintain a cache on your load balancer to match db_name / server. Jean Cavallo *Coopengo* -- You received this message because you are subscribed to the Google Groups "tryton-dev" group. To view this discussion on the web visit https://groups.google.com/d/msgid/tryton-dev/CAAc4%2BPaG5s71Zzi14BDAXNUKtOEYygf_ytp4q%2BKYQdX2Rv3scA%40mail.gmail.com.
Re: [tryton-dev] Stateless Trytond
2016-11-15 13:19 GMT+01:00 Cédric Krier <cedric.kr...@b2ck.com>: > On 2016-11-15 03:14, Mikhail Savushkin wrote: > > Now we have another blocker on the road - the Pool building process is > too > > long to be fired on every request. And we cant afford collecting Pools > for > > all of the DBs in memory, since it will eat all the available memory > pretty > > quick. > > Do you have measures for that? > I would be interested as well to get some metrics ! How many DBs are you talking about ? > > So we have an idea: rewrite a small part of the pool.py module, so > > that it will build only the currently needed classes for the particular > > request, i.e. patch the "Pool.get()" method mostly. And throw the data > away > > after request. So, we hope that building only a small part of all the > > classes out there will cut the building time a lot, and will allow us to > do > > so on each request without significant response time lags. > > Some requests may require to access many classes in such case it will > not be very efficient to build the class on the fly. > Also to build a class, you need to query the database to know which > modules are activated and build the dependency graph, so this will > generate a lot of queries. A hybrid solution could maybe be to select some "core" models that will always be loaded in memory (typically all ir / res models), and load the others on demand. But I agree with Cedric that I am not sure the gain would be that interesting even in the best case scenario (i.e. only one or two models to build). Jean Cavallo *Coopengo* -- You received this message because you are subscribed to the Google Groups "tryton-dev" group. To view this discussion on the web visit https://groups.google.com/d/msgid/tryton-dev/CAAc4%2BPbPCaCPwPiqfcH7OO1F-NkOSTooepL40CKcm0xfhxRh-Q%40mail.gmail.com.
Re: [tryton-fr] Nouveau sur Tryton
Le 6 mars 2017 à 17:08, Camille <cam.reym...@gmail.com> a écrit : > Et cet après-midi, après un redémarrage pfff... Disparus les stocks, les > achats, les ventes... > Je me doute bien que je dois avoir un méchant problème de config quelque > part, mais je pleure quand même ! > Il est possible également possible que l'utilisateur avec lequel vous vous êtes connecté ne soit pas rattaché à la même compagnie que la première fois. Jean Cavallo *Coopengo* -- Vous recevez ce message, car vous êtes abonné au groupe Google Groupes tryton-fr. Cette discussion peut être lue sur le Web à l'adresse https://groups.google.com/d/msgid/tryton-fr/CAAc4%2BPZOjpymy_SxaTQ9Vjf%2BJBDwhrHOhTbZnhuOWtqCo0zroQ%40mail.gmail.com.
Re: [tryton-fr] Surcharge d'un champ
Bonjour, Les modifications de champs doivent être faites dans le "__setup__" de la classe. (ex: http://hg.tryton.org/modules/account_payment_sepa/file/tip/payment.py#l101) En revanche, essayer d'enlever ce domaine me semble dangereux. Jean Cavallo *Coopengo* -- Vous recevez ce message, car vous êtes abonné au groupe Google Groupes tryton-fr. Cette discussion peut être lue sur le Web à l'adresse https://groups.google.com/d/msgid/tryton-fr/CAAc4%2BPY89psK8PeujxFF%3DXRSovaYbLmBE14tvFn2Hv_tWaih1w%40mail.gmail.com.
Re: [tryton-dev] Sync pool between process
Hi Sergi, 2017-08-28 12:14 GMT+02:00 Sergi Almacellas Abellana <se...@koolpi.com>: > Currently there is a weird behavior if new modules are installed when > running multiple instances of trytond (as separate process). The problem is > that only one process has the updated pool definition and the other process > will fail with a KeyError when try to get the new created models. > We got around this problem by using redis to communicate the information accross trytond instances : https://github.com/coopengo/trytond/blob/master/trytond/iwc.py https://github.com/coopengo/trytond/blob/master/trytond/pool.py#L109 Jean Cavallo *Coopengo* -- You received this message because you are subscribed to the Google Groups "tryton-dev" group. To view this discussion on the web visit https://groups.google.com/d/msgid/tryton-dev/CAAc4%2BPbdijjC7_76sPmc706i7DBCqrT6MPsGBCJGxZAwGWspJA%40mail.gmail.com.