Re: [tryton-dev] Permission for button wizards
On 10 Jul 08:52, Markus Bala wrote: > On Thu, Jul 10, 2014 at 3:19 AM, Cédric Krier wrote: > > > On 10 Jul 01:48, Markus Bala wrote: > > > On Thu, Jul 10, 2014 at 1:25 AM, Cédric Krier > > wrote: > > > > > > > On 09 Jul 19:14, Guillem Barba Domingo wrote: > > > > > You can set the allowed groups to a button. > > > > > Search "button" in *.xml of modules (not in view directory) and you > > will > > > > > find the solution. > > > > > > > > > > Today I realized that the button is not hidden but if you try to > > click on > > > > > it it raise an error. I tried it on "Force assign" button. > > > > > Why the button is not hidden? > > > > > > > > If you don't have access, the button is readonly: > > > > > > > > > > > > > > http://hg.tryton.org/trytond/file/62f1b9747e9f/trytond/model/modelview.py#l441 > > > > > > > > *File account_invoice/invoice.xml line233 - 271. * > > > > > http://hg.tryton.org/modules/account_invoice/file/09da725cfc13/invoice.xml#l233 > > > > > > It provide the access for the cancel, post, validate_invoice button. > > > But when I using the same method to give the "pay" button (can be find at > > > > > http://hg.tryton.org/modules/account_invoice/file/09da725cfc13/view/invoice_form.xml#l62 > > > ) > > > > > > It still give the readonly state. > > > > I don't understand. > > > > Below is the access i made for the "Pay" button: > > pay > > > id="invoice_pay_button_group_cashier"> > > > > > The result of the pay button, readonly. It sounds normal if you are not in the group 'account.group_cashier' which by the way doesn't exist in account module. -- Cédric Krier - B2CK SPRL Email/Jabber: cedric.kr...@b2ck.com Tel: +32 472 54 46 59 Website: http://www.b2ck.com/ pgps7X7sZdX5N.pgp Description: PGP signature
Re: [tryton-dev] Permission for button wizards
On Thu, Jul 10, 2014 at 3:19 AM, Cédric Krier wrote: > On 10 Jul 01:48, Markus Bala wrote: > > On Thu, Jul 10, 2014 at 1:25 AM, Cédric Krier > wrote: > > > > > On 09 Jul 19:14, Guillem Barba Domingo wrote: > > > > You can set the allowed groups to a button. > > > > Search "button" in *.xml of modules (not in view directory) and you > will > > > > find the solution. > > > > > > > > Today I realized that the button is not hidden but if you try to > click on > > > > it it raise an error. I tried it on "Force assign" button. > > > > Why the button is not hidden? > > > > > > If you don't have access, the button is readonly: > > > > > > > > > > http://hg.tryton.org/trytond/file/62f1b9747e9f/trytond/model/modelview.py#l441 > > > > > > *File account_invoice/invoice.xml line233 - 271. * > > > http://hg.tryton.org/modules/account_invoice/file/09da725cfc13/invoice.xml#l233 > > > > It provide the access for the cancel, post, validate_invoice button. > > But when I using the same method to give the "pay" button (can be find at > > > http://hg.tryton.org/modules/account_invoice/file/09da725cfc13/view/invoice_form.xml#l62 > > ) > > > > It still give the readonly state. > > I don't understand. > Below is the access i made for the "Pay" button: pay The result of the pay button, readonly. > > So is there any different for giving access normal button with the wizard > > button ( > > No. > > > -- > Cédric Krier - B2CK SPRL > Email/Jabber: cedric.kr...@b2ck.com > Tel: +32 472 54 46 59 > Website: http://www.b2ck.com/ >
Re: [tryton-dev] Easy path for new contributors
On 07 Jun 13:59, Udo Spallek wrote: > Hi, > > Fri, 06 Jun 2014 19:27:44 +0200 > Sergi Almacellas Abellana : > >I have seen in other open source projects that they mark easy issues > >in order to ease the introduction of newcomers to the project > >development, for example [1]. > >I wonder if this will be a good idea for the tryton community. Do you > >think this will be helpful? > >In order to make this happen, this are the required tasks to do: > >- Add some type of mechanism in roundup to mark easy tasks. > We could use Roundup Keywords. Done. > >- Add a new query in order to show them. > >- Modify the HowtoContribute page in order to show this changes. > >- Marking existing issues as easy issues (Maybe this is the most > >tedious task, but can me done progressively). > >Thoughts? > Why not! > > >[1] > >https://github.com/owncloud/core/issues?labels=Junior+Job&page=1&state=open > > Regards > Udo Spallek > -- Cédric Krier - B2CK SPRL Email/Jabber: cedric.kr...@b2ck.com Tel: +32 472 54 46 59 Website: http://www.b2ck.com/ pgp3iyhp8kFAe.pgp Description: PGP signature
Re: [tryton-dev] Permission for button wizards
On 10 Jul 01:48, Markus Bala wrote: > On Thu, Jul 10, 2014 at 1:25 AM, Cédric Krier wrote: > > > On 09 Jul 19:14, Guillem Barba Domingo wrote: > > > You can set the allowed groups to a button. > > > Search "button" in *.xml of modules (not in view directory) and you will > > > find the solution. > > > > > > Today I realized that the button is not hidden but if you try to click on > > > it it raise an error. I tried it on "Force assign" button. > > > Why the button is not hidden? > > > > If you don't have access, the button is readonly: > > > > > > http://hg.tryton.org/trytond/file/62f1b9747e9f/trytond/model/modelview.py#l441 > > > > *File account_invoice/invoice.xml line233 - 271. * > http://hg.tryton.org/modules/account_invoice/file/09da725cfc13/invoice.xml#l233 > > It provide the access for the cancel, post, validate_invoice button. > But when I using the same method to give the "pay" button (can be find at > http://hg.tryton.org/modules/account_invoice/file/09da725cfc13/view/invoice_form.xml#l62 > ) > > It still give the readonly state. I don't understand. > So is there any different for giving access normal button with the wizard > button ( No. -- Cédric Krier - B2CK SPRL Email/Jabber: cedric.kr...@b2ck.com Tel: +32 472 54 46 59 Website: http://www.b2ck.com/ pgpOiUadLa0Ho.pgp Description: PGP signature
Re: [tryton-dev] Some thoughts about web application development with Tryton
On 09 Jul 19:33, Udo Spallek wrote: > Sat, 4 Jan 2014 17:05:28 +0100 > Cédric Krier : > >The module should also provide an optional session mechanism where > >any web framework could be plugged on. The goal will be to have a > >shared via database session across multiple instance. > > Maybe we can marriage Tryton with beaker[2] whose sessions seem to be > supported by flask, django, pylons or pyramid applications. > [2] http://beaker.readthedocs.org I think if it is to use an external module so we should not force any module. The initial idea was to provide such mechanism via Tryton but indeed nothing really links the session to anything in Tryton. So I will be in favor of doing nothing. -- Cédric Krier - B2CK SPRL Email/Jabber: cedric.kr...@b2ck.com Tel: +32 472 54 46 59 Website: http://www.b2ck.com/ pgpFDsmXNSJXG.pgp Description: PGP signature
Re: [tryton-dev] Permission for button wizards
On Thu, Jul 10, 2014 at 1:25 AM, Cédric Krier wrote: > On 09 Jul 19:14, Guillem Barba Domingo wrote: > > You can set the allowed groups to a button. > > Search "button" in *.xml of modules (not in view directory) and you will > > find the solution. > > > > Today I realized that the button is not hidden but if you try to click on > > it it raise an error. I tried it on "Force assign" button. > > Why the button is not hidden? > > If you don't have access, the button is readonly: > > > http://hg.tryton.org/trytond/file/62f1b9747e9f/trytond/model/modelview.py#l441 > > *File account_invoice/invoice.xml line233 - 271. * http://hg.tryton.org/modules/account_invoice/file/09da725cfc13/invoice.xml#l233 It provide the access for the cancel, post, validate_invoice button. But when I using the same method to give the "pay" button (can be find at http://hg.tryton.org/modules/account_invoice/file/09da725cfc13/view/invoice_form.xml#l62 ) It still give the readonly state. So is there any different for giving access normal button with the wizard button ( http://hg.tryton.org/modules/account_invoice/file/09da725cfc13/invoice.py#l1372 )? @ModelView.button_action('account_invoice.wizard_pay') def pay(cls, invoices): pass > > I think it would be better UX, but I don't investigated if it's hard to > > impement. > > Are you sure you closed the client before testing new configuration > because views are cached by the client. > > -- > Cédric Krier - B2CK SPRL > Email/Jabber: cedric.kr...@b2ck.com > Tel: +32 472 54 46 59 > Website: http://www.b2ck.com/ >
Re: [tryton-dev] Some thoughts about web application development with Tryton
Sat, 4 Jan 2014 17:05:28 +0100 Cédric Krier : >- web_user >The idea of this module is about having a common minimal web user >definition/support. I think such user should be identify by just >their E-mail and that the module should provide a password >authentication. I also think having a way to validate user by >verifying email address is also a common need. yes, agree. An other common need is IMHO a password reset request, in case the password is lost. At least for verification we will rely on data coming from untrusted environments. To be sure it is not faked/manipulated we could use itsdangerous[1] to sign e.g. the email address with the password and/or another secret as key. [...] >The module should also provide an optional session mechanism where >any web framework could be plugged on. The goal will be to have a >shared via database session across multiple instance. Maybe we can marriage Tryton with beaker[2] whose sessions seem to be supported by flask, django, pylons or pyramid applications. [1] https://pythonhosted.org/itsdangerous [2] http://beaker.readthedocs.org Regards Udo Spallek -- _ virtual things Preisler & Spallek GbR München - Aachen Windeckstr. 77 81375 München Tel: +49 (89) 710 481 55 Fax: +49 (89) 710 481 56 i...@virtual-things.biz http://www.virtual-things.biz signature.asc Description: PGP signature
Re: [tryton-dev] Permission for button wizards
On 09 Jul 19:14, Guillem Barba Domingo wrote: > You can set the allowed groups to a button. > Search "button" in *.xml of modules (not in view directory) and you will > find the solution. > > Today I realized that the button is not hidden but if you try to click on > it it raise an error. I tried it on "Force assign" button. > Why the button is not hidden? If you don't have access, the button is readonly: http://hg.tryton.org/trytond/file/62f1b9747e9f/trytond/model/modelview.py#l441 > I think it would be better UX, but I don't investigated if it's hard to > impement. Are you sure you closed the client before testing new configuration because views are cached by the client. -- Cédric Krier - B2CK SPRL Email/Jabber: cedric.kr...@b2ck.com Tel: +32 472 54 46 59 Website: http://www.b2ck.com/ pgptxXEeSi1Q4.pgp Description: PGP signature
Re: [tryton-dev] Permission for button wizards
El 09/07/2014 9:27, "Cédric Krier" va escriure: > > On 08 Jul 18:29, Markus Bala wrote: > > > > > > 2. How to give access permission to buttons that call wizards? They aren't > > >> listed neither on button neither in wizard permission access. > > >> > > > > > > I supose the button get permissions from wizard (if user has permissions > > > over wizard can see the button). It make sense. > > > > >May I know how to give the permission over wizard? > > > > I created an a group called "group_cashier". The main purpose is to create > > invoice and pay invoice. > > I could find how to give the permission for "Pay" button which attached to > > the wizard "wizard_pay". > > Trying to give permission to the wizard as below script, but the pay > > button still disable. > > There is no access rule on wizard. You can set the allowed groups to a button. Search "button" in *.xml of modules (not in view directory) and you will find the solution. Today I realized that the button is not hidden but if you try to click on it it raise an error. I tried it on "Force assign" button. Why the button is not hidden? I think it would be better UX, but I don't investigated if it's hard to impement.
Re: [tryton-dev] flask-tryton: multiple databases
El 09/07/2014 9:26, "Albert Cervera i Areny" va escriure: > > 2014-07-09 5:47 GMT+02:00 Sharoon Thomas : > > > > On Jul 9, 2014, at 3:41 AM, Cédric Krier wrote: > > > > > On 08 Jul 14:14, marsupo...@gmail.com wrote: > > >> On Tuesday, July 8, 2014 10:15:29 PM UTC+2, Cédric Krier wrote: > > >>> > > >>> Developers work on what ever they want, they are not forced to work on > > >>> any specific topic. So nobody can tell what will be developed in Tryton > > >>> more than what is already done (and probably published as patch). So if > > >>> you are looking for a roadmap, you are at the wrong place. > > >>> > > >> > > >> I was not talking about a roadmap of new features but a roadmap (or todo > > >> list) of features to be removed (such as multi-database support). > > > > > > Something added or something removed, it is the same. It is an > > > improvement and they fail on the same workflow. > > > > > > > That being said, I am not sure that removing multiple-database support is > > a “improvement” that has wider acceptance. > > > > I personally feel its a step backward. Multi-database support has been a > > critical advantage of tryton and we use it for a variety of reasons from having a > > demo/playground database in the same environment for users to try things > > safely along with production database to having multi-tenant systems. > > > > From the previous discussion about the topic and the available information I > > don’t see why multi-database support should be removed. If creating and > > dropping databases is the issue, we should remove that instead. > > What I've read so far, dropping multi-database support has the > following advantages: > > - (...) > - Allows improving the usage of maps/paths with WSGI (don't know the details) > > On the other hand I don't personally see many problems with removing > the feature because: > > - (...) > - Multi-tenant systems should be easy to implement with other tools, > maybe the only issue is that you'll need some more resources because > you'll have several trytond processes but I guess you need that anyway > if you want to provide a decent service With the WSGI support and Circus (for example) have a multiprocess (to serve multiple databases) should be easy and more flexible and powerful to implement something like DB selection by subdomain.
Re: [tryton-dev] Mercurial workflow
On 09 Jul 10:32, Sergi Almacellas Abellana wrote: > El 09/07/14 01:06, Cédric Krier ha escrit: > >I would like to request a change in our current mercurial workflow. > >Sometimes, when we try to push we got a failure because we create a new > >head on the server. It happens generally because we forgot to update the > >repository before committing. > >For now, in such case, we just merge the heads locally and push the 2 new > >changesets. > >I find it doesn't generate a good history so I think it will be better > >to rebase the changeset we just did on top of the head. This will > >construct a more linear history which is quite close to reality and > >easier to read/search. > Completly agree with having cleaner history. > > > >Tip to rebase in such case: > > > > # hg rebase -r > Just for the record, rebase extension must be activated: > > http://mercurial.selenic.com/wiki/RebaseExtension Also if you work like me with one clone from hg.tryton.org and many local clone for parallel development, you should consider setting publish to False on you repositories: http://mercurial.selenic.com/wiki/Phases#Publishing_Repository Tips: you can put it in your ~/.hgrc -- Cédric Krier - B2CK SPRL Email/Jabber: cedric.kr...@b2ck.com Tel: +32 472 54 46 59 Website: http://www.b2ck.com/ pgpmN6iiMpfh4.pgp Description: PGP signature
Re: [tryton-dev] Mercurial workflow
El 09/07/14 01:06, Cédric Krier ha escrit: I would like to request a change in our current mercurial workflow. Sometimes, when we try to push we got a failure because we create a new head on the server. It happens generally because we forgot to update the repository before committing. For now, in such case, we just merge the heads locally and push the 2 new changesets. I find it doesn't generate a good history so I think it will be better to rebase the changeset we just did on top of the head. This will construct a more linear history which is quite close to reality and easier to read/search. Completly agree with having cleaner history. Tip to rebase in such case: # hg rebase -r Just for the record, rebase extension must be activated: http://mercurial.selenic.com/wiki/RebaseExtension -- Sergi Almacellas Abellana www.koolpi.com Twitter: @pokoli_srk
Re: [tryton-dev] flask-tryton: multiple databases
On 09 Jul 09:17, Sharoon Thomas wrote: > > On Jul 9, 2014, at 3:41 AM, Cédric Krier wrote: > > > On 08 Jul 14:14, marsupo...@gmail.com wrote: > >> On Tuesday, July 8, 2014 10:15:29 PM UTC+2, Cédric Krier wrote: > >>> > >>> Developers work on what ever they want, they are not forced to work on > >>> any specific topic. So nobody can tell what will be developed in Tryton > >>> more than what is already done (and probably published as patch). So if > >>> you are looking for a roadmap, you are at the wrong place. > >>> > >> > >> I was not talking about a roadmap of new features but a roadmap (or todo > >> list) of features to be removed (such as multi-database support). > > > > Something added or something removed, it is the same. It is an > > improvement and they fail on the same workflow. > > > > That being said, I am not sure that removing multiple-database support is > a “improvement” that has wider acceptance. It is in the core developpers (the people who maintains that shit). > I personally feel its a step backward. Multi-database support has been a > critical advantage of tryton and we use it for a variety of reasons from > having a > demo/playground database in the same environment for users to try things > safely along with production database to having multi-tenant systems. You think it is safety but it is not at all. You don't playground on the production server if you don't want problems. Let's just imagine, you use the same trytond instance for production and some testing. Your testing is going crazy and eat all the CPU or is blocking on some IO then your production is stopped. > From the previous discussion about the topic and the available information I > don’t see why multi-database support should be removed. If creating and > dropping databases is the issue, we should remove that instead. It is the all concept the problem. Also it prevents to have trytond to scale correctly, to have more features (see previous post) etc. -- Cédric Krier - B2CK SPRL Email/Jabber: cedric.kr...@b2ck.com Tel: +32 472 54 46 59 Website: http://www.b2ck.com/ pgpRa5P70P5o2.pgp Description: PGP signature
Re: [tryton-dev] Permission for button wizards
On 08 Jul 18:29, Markus Bala wrote: > On Thursday, 3 October 2013 00:57:32 UTC+8, Guillem Barba wrote: > > > > 2013/10/2 Josias Pérez > > > > >> Hi, > >> > >> I'm working for a POS module on tryton. > >> > >> At the moment, have 2 question: > >> > >> 1. We create a group called Team Sales, that can access to Sales and > >> Sales Lines, but we want that they can't view some fields (specially > >> related to cost_price). We can hide on fields permission, but at the same > >> time, they need to create stock moves, that requiere to read cost_price. > >> The question is how to hide the field (cost_price) only in the view, but > >> still can read for create the stock moves. They can't see the stock moves, > >> only create that. > >> > > > > define an 'states' attribute that set 'invisible' the field if user is not > > in the required fields: > > field_name = fields.XXX(..., states={ > > 'invisible': Not(Eval('groups', []).contains(Id('MODULE', > > 'GROUP_XML_ID'))), > > }) > > > > > > 2. How to give access permission to buttons that call wizards? They aren't > >> listed neither on button neither in wizard permission access. > >> > > > > I supose the button get permissions from wizard (if user has permissions > > over wizard can see the button). It make sense. > > >May I know how to give the permission over wizard? > > I created an a group called "group_cashier". The main purpose is to create > invoice and pay invoice. > I could find how to give the permission for "Pay" button which attached to > the wizard "wizard_pay". > Trying to give permission to the wizard as below script, but the pay > button still disable. There is no access rule on wizard. -- Cédric Krier - B2CK SPRL Email/Jabber: cedric.kr...@b2ck.com Tel: +32 472 54 46 59 Website: http://www.b2ck.com/ pgp8mSwa6yDEp.pgp Description: PGP signature
Re: [tryton-dev] flask-tryton: multiple databases
2014-07-09 5:47 GMT+02:00 Sharoon Thomas : > > > On Jul 9, 2014, at 3:41 AM, Cédric Krier wrote: > > > On 08 Jul 14:14, marsupo...@gmail.com wrote: > >> On Tuesday, July 8, 2014 10:15:29 PM UTC+2, Cédric Krier wrote: > >>> > >>> Developers work on what ever they want, they are not forced to work on > >>> any specific topic. So nobody can tell what will be developed in Tryton > >>> more than what is already done (and probably published as patch). So if > >>> you are looking for a roadmap, you are at the wrong place. > >>> > >> > >> I was not talking about a roadmap of new features but a roadmap (or todo > >> list) of features to be removed (such as multi-database support). > > > > Something added or something removed, it is the same. It is an > > improvement and they fail on the same workflow. > > > > That being said, I am not sure that removing multiple-database support is > a “improvement” that has wider acceptance. > > I personally feel its a step backward. Multi-database support has been a > critical advantage of tryton and we use it for a variety of reasons from > having a > demo/playground database in the same environment for users to try things > safely along with production database to having multi-tenant systems. > > From the previous discussion about the topic and the available information I > don’t see why multi-database support should be removed. If creating and > dropping databases is the issue, we should remove that instead. What I've read so far, dropping multi-database support has the following advantages: - Can solve a security issue (details not available for those without access to security issues) - Allows creating new field types in modules - Allows adding new protocols in modules - Simplifies the code base - Allows improving the usage of maps/paths with WSGI (don't know the details) On the other hand I don't personally see many problems with removing the feature because: - Tryton client has profiles which make it easy for the user to change from one server to another, so demo/playground database should not be a problem, I think - Multi-tenant systems should be easy to implement with other tools, maybe the only issue is that you'll need some more resources because you'll have several trytond processes but I guess you need that anyway if you want to provide a decent service Also, as you already said, database management can be removed because: - It means we have to deal with some issues with Tryton locking template1 and disallowing the creation of new databases - Dumping/restoring databases does not scale > > My 2¢ > > Thanks & Regards > > > Sharoon Thomas > CEO & Chief Software Architect > Openlabs Technologies & Consulting (P) Limited > > w: http://www.openlabs.co.in > m: +1 813.793.6736 (OPEN) Extn. 200 > t: @sharoonthomas > > - We win when our customers win > -- Albert Cervera i Areny Tel. 93 553 18 03 @albertnan www.NaN-tic.com