"Cédric Krier" <cedric.kr...@b2ck.com> ha escrit: >Hi, > >Last weeks, I had to work on a web application using Tryton as backend. >For some reasons, I did not pick up nereid which did not fit the >requirements. So I went for a light Flask application which resulted >into flask_tryton [1]. This solution was fast and worked fine for my >needs. > >But I had some backend needs that are quite generic for many web >applications. So I think we could try to define them to build generic >(web framework agnostic) modules for them. Is not Tryton about sharing >generic modules with large audience?
That makes sense for me. > >So I have already identified two of them for which I'm looking for your >comments (and I could publish a prototype). > > >- web_user I will prefer external_user as it can be used for other accesses not only web. (For example a mobile app) > > 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. > Such user could be linked with a Many2Many to parties to have the > possibility to store identity information. I think M2M is the more > flexible solution because it allow simple design like O2O or more > complex design where you could have users that behave for the same > company. > 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. And user permisions? Would be out of the scope of this module? > > FYI, nereid has a partial implementation of this model but with many > extra features that are not always needed and also some limitation > like the link to a company or to a single party etc. > But with the generic user I describe, I think it could be used by > nereid as basis model. That would be great! > >- web_shop_cart > > The idea of this module is about a generic simple webshop cart > implementation. I think the minimal needed fields will be: > > Cart: > - company > - owner: > just a char field to identify the user and so it could be > the email of the user but we should avoid direct link > because I think we should be allowed to use any > authentication mechanism and so it could be not stored in > Tryton. > - currency: could be the default company one? > - party: must be required for checkout > - invoice_address > - shipment_address > - state: draft;checked-out > - sale: a reference field to sale.sale or any other Model > - checkout_method: define what should be generated (similar to > the project_invoice design) > > Cart Line: > - product > - unit_price: could be tax included or excluded > - quantity > - unit > - amount: Function field > > So as you see, I think it is important that the cart is agnostic to > the tax included or excluded. It should be handle by the checkout > method that will create the sale order correctly or a B2C sale order > (as we talked at the TUB2013). > I'm not sure about the need of this module because: 1. The checkout process can be very diferent on every implementation, so maybe it's dificult to get a simple solution usefull for all of the diferent implementations. 2. That information is represented on the sale.sale and sale.line models. >[1] https://code.google.com/p/flask-tryton/ > >Thanks, -- Enviado desde mi teléfono Android con K-9 Mail. Disculpa mi brevedad