[tryton-dev] Calling find method in scenario
Hello, I try to calling 'find' method in a scenario with this piece of code: Period = Model.get('account.period') period = Period.find(company.id) and when i running the scenario the followikg error appear File "/home/ccr/Technique/tryton/ate-dev/trytond/trytond/modules/account_asset/tests/scenario_account_asset.rst", line 143, in scenario_account_asset.rst Failed example: period = Period.find(company.id) Exception raised: Traceback (most recent call last): File "/usr/lib/python2.7/doctest.py", line 1315, in __run compileflags, 1) in test.globs File "", line 1, in period = Period.find(company.id) File "/home/ccr/Technique/tryton/ate-dev/proteus/proteus/__init__.py", line 765, in find cls._config.context) File "/home/ccr/Technique/tryton/ate-dev/proteus/proteus/config.py", line 172, in __call__ result = rpc.result(meth(*args, **kwargs)) File "/home/ccr/Technique/tryton/ate-dev/trytond/trytond/modules/account/period.py", line 227, in search args = args[:] TypeError: 'int' object has no attribute '__getitem__' it would seem that the method called is that of proteus and not that of the class Period. How to call that of the class? Regards. -- Christophe CRIER Adiczion - http://adiczion.com -- 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/17281a4a-08ef-9b13-53e7-b50a0c620673%40adiczion.net.
Re: [tryton-dev] Try and test a new module.
Le mardi 6 juin 2017, 10:36:24 Sergi Almacellas Abellana a écrit : > El 06/06/17 a les 10:08, Christophe ha escrit: > > Le mardi 6 juin 2017, 09:39:06 Sergi Almacellas Abellana a écrit : > >> El 06/06/17 a les 09:33, Christophe ha escrit: > >>> Hi, > >>> > >>> I would like to test the module 'account_budget' but I can not find > >>> where > >>> i can clone it ? > >>> Is there a 'how to' to retrieve the modules in test? > >> > >> I imagine you refer to the reviews ofhttps://bugs.tryton.org/issue6089 > >> > >> In order to get a review of a new module, you have to create an empty > >> mercurial repository and download the review to it. The commands will be: > >> > >> mkdir account_budget > >> cd account_budget > >> hg init . > >> hg review --fetch -i X > >> > >> where XX is the review id. > >> > >> Hope it helps. > > > > Thanks to your answer, but i cannot retrieve the code. The authentication > > proccess seems to be alright (a message in browser said 'The > > authentication > > flow has completed') but i have this error : > > > > Unable to fetch the patch: HTTP Error 404: Not Found > > > > and after some time this message appears : > > > > 1496736074772 addons.productaddonsERROR Request failed > > certificate checks: [Exception... "SSL is required and URI scheme is not > > https." nsresult: "0x8000 (NS_ERROR_UNEXPECTED)" location: "JS frame > > :: resource://gre/modules/CertUtils.jsm :: checkCert :: line 145" data: > > no] > > > > any idea ? > > Which host are you using as codereview? (see the review section of your > ~/.hgrc file) Thanks, sorry for the noise, A bad configuration of the server in this file. It works now. Regards -- Christophe -- 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/2328141.sLtFDX4yyG%40adz-ccr.
Re: [tryton-dev] Try and test a new module.
Le mardi 6 juin 2017, 09:39:06 Sergi Almacellas Abellana a écrit : > El 06/06/17 a les 09:33, Christophe ha escrit: > > Hi, > > > > I would like to test the module 'account_budget' but I can not find where > > i can clone it ? > > Is there a 'how to' to retrieve the modules in test? > > I imagine you refer to the reviews of https://bugs.tryton.org/issue6089 > > In order to get a review of a new module, you have to create an empty > mercurial repository and download the review to it. The commands will be: > > mkdir account_budget > cd account_budget > hg init . > hg review --fetch -i X > > where XX is the review id. > > Hope it helps. Thanks to your answer, but i cannot retrieve the code. The authentication proccess seems to be alright (a message in browser said 'The authentication flow has completed') but i have this error : Unable to fetch the patch: HTTP Error 404: Not Found and after some time this message appears : 1496736074772 addons.productaddonsERROR Request failed certificate checks: [Exception... "SSL is required and URI scheme is not https." nsresult: "0x8000 (NS_ERROR_UNEXPECTED)" location: "JS frame :: resource://gre/modules/CertUtils.jsm :: checkCert :: line 145" data: no] any idea ? Regards -- Christophe -- 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/2019795.KfI3jxbRPq%40adz-ccr.
[tryton-dev] Try and test a new module.
Hi, I would like to test the module 'account_budget' but I can not find where i can clone it ? Is there a 'how to' to retrieve the modules in test? Regards -- Christophe -- 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/6393229.hYz3uRPelz%40adz-ccr.
Re: [tryton-dev] 'Processing ...' don't disappear in web client (Tryton 4.3)
Le vendredi 28 avril 2017, 10:01:29 Cédric Krier a écrit : > On 2017-04-28 09:50, Christophe wrote: > > Le vendredi 28 avril 2017, 09:45:46 Sergi Almacellas Abellana a écrit : > > > El 28/04/17 a les 09:18, Christophe ha escrit: > > > > Le jeudi 27 avril 2017, 08:53:30 Cédric Krier a écrit : > > > >> On 2017-04-27 07:52, Christophe wrote: > > > >>> Le mardi 25 avril 2017, 10:47:38 Cédric Krier a écrit : > > > >>>> ... > > > >>>> Neither, you should not use minified version for debugging. > > > >>> > > > >>> Of course :-), how do I run the web client in normal mode? > > > >> > > > >> By building sao for dev: > > > >> $ grunt dev > > > > > > > > Thank, it is done. > > > > Now my error in console : > > > > > > > > TypeError: prm.resolve is not a function > > > > http://localhost:8000/dist/tryton-sao.js > > > > Line 6538 > > Indeed we need the corresponding line in sao source code or your > tryton-sao.js. > > > > Its seems a bug. Which sao version are you using? > > > > 4.3.0 > > Can you fill an issue on https://bugs.tryton.org/ it is a better place > to talk about bugs. Ok, it is done : https://bugs.tryton.org/issue6477 Regards -- Christophe -- 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/1835755.ANLSRoqx8B%40adz-ccr.
Re: [tryton-dev] 'Processing ...' don't disappear in web client (Tryton 4.3)
Le vendredi 28 avril 2017, 09:45:46 Sergi Almacellas Abellana a écrit : > El 28/04/17 a les 09:18, Christophe ha escrit: > > Le jeudi 27 avril 2017, 08:53:30 Cédric Krier a écrit : > >> On 2017-04-27 07:52, Christophe wrote: > >>> Le mardi 25 avril 2017, 10:47:38 Cédric Krier a écrit : > >>>> ... > >>>> Neither, you should not use minified version for debugging. > >>> > >>> Of course :-), how do I run the web client in normal mode? > >> > >> By building sao for dev: > >> $ grunt dev > > > > Thank, it is done. > > Now my error in console : > > > > TypeError: prm.resolve is not a function > > http://localhost:8000/dist/tryton-sao.js > > Line 6538 > > Its seems a bug. Which sao version are you using? 4.3.0 Regards -- Christophe -- 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/5602250.vhbHWh4DzF%40adz-ccr.
Re: [tryton-dev] 'Processing ...' don't disappear in web client (Tryton 4.3)
Le jeudi 27 avril 2017, 08:53:30 Cédric Krier a écrit : > On 2017-04-27 07:52, Christophe wrote: > > Le mardi 25 avril 2017, 10:47:38 Cédric Krier a écrit : > > > ... > > > Neither, you should not use minified version for debugging. > > > > Of course :-), how do I run the web client in normal mode? > > By building sao for dev: > > $ grunt dev Thank, it is done. Now my error in console : TypeError: prm.resolve is not a function http://localhost:8000/dist/tryton-sao.js Line 6538 Regards -- Christophe -- 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/1523353.2Y8kunTFfy%40adz-ccr.
Re: [tryton-dev] 'Processing ...' don't disappear in web client (Tryton 4.3)
Le mardi 25 avril 2017, 10:47:38 Cédric Krier a écrit : > ... > Neither, you should not use minified version for debugging. Of course :-), how do I run the web client in normal mode? Thanks -- Christophe -- 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/4547201.AhcoufTlzR%40adz-ccr.
Re: [tryton-dev] 'Processing ...' don't disappear in web client (Tryton 4.3)
Le mardi 25 avril 2017, 09:40:23 Cédric Krier a écrit : > This happens when an exception is raised in the JS. You should look at > the web console. Actually I have a mistake in the console, but it is not very clear to me : TypeError: d.resolve is not a function http://localhost:8000/dist/tryton-sao.min.js Line 7 And for you ? Regards -- Christophe -- 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/2877026.TKptNsVbmQ%40adz-ccr.
[tryton-dev] 'Processing ...' don't disappear in web client (Tryton 4.3)
Hello When I create a new record (in all object) the 'Processing ...' information does not disappear even when the record writing is ended. I don't see why this behavior, is there anybody has an idea ? Regards -- Christophe -- 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/3690696.zeA66rsKH4%40adz-ccr.
[tryton-dev] Using Tryton in Python3 dev
Hello, I'm doing some testing with flask_tryton and I have some questions about Tryton module integration in a Python3 development. My dev is written Python3 and I wonder what are the best practices for integrating 'flask_tryton' and 'tryton' as a module? Because every time I do it I have syntax or import errors. I saw in some 'issue' the use of the '2to3' utility, should I convert 'flask-tryton' with this utility? Do I still have to wait to write my dev using Tryton in Python3? Thank you for your remarks or advice. Regards -- Christophe -- 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/35563420.6p8HbmvEFD%40adz-ccr.
[tryton-dev] Re: Retrieving an issue I was working
Le samedi 29 octobre 2016, 03:48:29 rawdesignhamburg a écrit : > Am Freitag, 28. Oktober 2016 16:07:33 UTC+2 schrieb Christophe: > > Hello > > > > how to retrieve the current modifications of an issue following the loss > > of the > > working folder (I'm working on with hgreview) ? > > > > Thanks > > > > Regards. > > To use "hg review --fetch -i XX" you have to install hgreview and edit > ~/.hgrc > example: > > sudo pip install hgreview > > > content of ~/.hgrc: > [extensions] > hgnested = Thanks to all it works. Regards -- Christophe -- 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/1889583.VYnjShSkrc%40adz-ccr.
[tryton-dev] Retrieving an issue I was working
Hello how to retrieve the current modifications of an issue following the loss of the working folder (I'm working on with hgreview) ? Thanks Regards. -- Christophe -- 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/1662325.DXta2ZxvSB%40adz-ccr.
[tryton-dev] Syntax in views
Hi, It seems that the following syntax for the 'states' attribute doesn't work in 3.8 : I would have missed something ? Regards -- Christophe -- 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/5669665A.7%40adiczion.net.
Re: [tryton-dev] Stopping all developments on Tryton
Le 03/12/2015 11:33, Cédric Krier a écrit : On 2015-11-24 19:21, Cédric Krier wrote: Hi, I'm going to stop all the developments on Tryton as far as this issue is not fixed: https://bitbucket.org/hpk42/tox/issues/285/tox-220-breaks-some-toxini-config-files We have no more any CI working so we can not ensure that modifications don't break anything. The author of tox seems to not have enough time to fix the issue right now (but it seems he can be helped by purchasing support to his company). Or if someone has a way to hide the offending release of tox from devpi, I could implement it on the server. Until this is fixed and CI is back to normal, you must consider the repositories as frozen, just like before any release. Just a quick update on the situation. The foundation offered to buy support from the tox developer but the Foundation doesn't have enough for the expected required effort. So the developer will do what he can in the available time, the next week. So this means that the all Tryton development is still on hold for an undetermined time. Regards, Hi, How much is missing in order to purchase the service ? Regards -- Christophe http://adiczion.com -- 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/56601FA0.8090701%40adiczion.net.
[tryton-dev] Set language when init database.
Hi, when I init. an empty database with the following command: trytond -d --all the default language isn't set with the value in tryton's config file. Is there a way to set the default language when I init database. Regards. -- Christophe http://adiczion.com
Re: [tryton-dev] Get current value from class method.
Le 28/05/2015 18:00, Marc Murray a écrit : On Thu, 2015-05-28 at 11:55 +0200, Christophe (net) wrote: Le 28/05/2015 11:46, Cédric Krier a écrit : On 28 May 11:10, Christophe (net) wrote: Le 28/05/2015 10:34, Cédric Krier a écrit : On 28 May 10:18, Christophe (net) wrote: Hello, I try to find out when I create a new address on a party if this is the first or not. Depending on the answer it must set a boolean in the address object. I seek from the method of class 'default_name_of_field' has reached the values of current instance. There is a way to do that (I am in v3.0) ? It sounds strange because addresses are already ordered by the field sequence. And moreover using the default value will not work properly with concurrency. Bizarre, on my installation the sequence field of the object party.address is empty, I would forget something? Because it is done like that by design. The order is on (sequence, id). Ok, but to return to my original question, is it possible (and how) to reach the values of the instance from a class method? Is there an example somewhere ? If you know any other object-oriented programming language, you would understand why your question is strange. By definition, a classmethod is a method that runs at the level of the class object itself. Not an instance. As a result, there is no way to access instance attributes from a class method. I understand, but my question was not about the object-oriented languages and their possibility, but was around Tryton. There is in the context or elsewhere the opportunity to catch the current record when the method to set the default value is executed (and as the initialization method of default values is either '@staticmethod' or '@classmethod ...) From your description though, you may want to look into the on_change_* and on_change_with_* methods. They will allow you to access instance values. But, I think they'll only allow access to the fields specified in the @fields.depends descriptor or the depends attribute of the field. If I understand correctly, this is an action on the client triggers the 'on_change' not the server and not when assigning default values. I look at the trigger conditions of the on_change_with_* PS: tryton-dev@ is to discuss the development of Tryton, tryton@ is better place for such question. Ok, how to move the thread ? You can't, it will be for the next one. -- Christophe http://adiczion.com
[tryton-dev] Get current value from class method.
Hello, I try to find out when I create a new address on a party if this is the first or not. Depending on the answer it must set a boolean in the address object. I seek from the method of class 'default_name_of_field' has reached the values of current instance. There is a way to do that (I am in v3.0) ? Regards. -- Christophe http://adiczion.com
Re: [tryton-dev] Get current value from class method.
Le 28/05/2015 10:34, Cédric Krier a écrit : On 28 May 10:18, Christophe (net) wrote: Hello, I try to find out when I create a new address on a party if this is the first or not. Depending on the answer it must set a boolean in the address object. I seek from the method of class 'default_name_of_field' has reached the values of current instance. There is a way to do that (I am in v3.0) ? It sounds strange because addresses are already ordered by the field sequence. And moreover using the default value will not work properly with concurrency. Bizarre, on my installation the sequence field of the object party.address is empty, I would forget something? PS: tryton-dev@ is to discuss the development of Tryton, tryton@ is better place for such question. Ok, how to move the thread ? -- Christophe http://adiczion.com
Re: [tryton-dev] Get current value from class method.
Le 28/05/2015 11:46, Cédric Krier a écrit : On 28 May 11:10, Christophe (net) wrote: Le 28/05/2015 10:34, Cédric Krier a écrit : On 28 May 10:18, Christophe (net) wrote: Hello, I try to find out when I create a new address on a party if this is the first or not. Depending on the answer it must set a boolean in the address object. I seek from the method of class 'default_name_of_field' has reached the values of current instance. There is a way to do that (I am in v3.0) ? It sounds strange because addresses are already ordered by the field sequence. And moreover using the default value will not work properly with concurrency. Bizarre, on my installation the sequence field of the object party.address is empty, I would forget something? Because it is done like that by design. The order is on (sequence, id). Ok, but to return to my original question, is it possible (and how) to reach the values of the instance from a class method? Is there an example somewhere ? PS: tryton-dev@ is to discuss the development of Tryton, tryton@ is better place for such question. Ok, how to move the thread ? You can't, it will be for the next one. -- Christophe http://adiczion.com
Re: [tryton-dev] Get current value from class method.
Le 28/05/2015 12:30, Cédric Krier a écrit : On 28 May 11:55, Christophe (net) wrote: Le 28/05/2015 11:46, Cédric Krier a écrit : On 28 May 11:10, Christophe (net) wrote: Le 28/05/2015 10:34, Cédric Krier a écrit : On 28 May 10:18, Christophe (net) wrote: Hello, I try to find out when I create a new address on a party if this is the first or not. Depending on the answer it must set a boolean in the address object. I seek from the method of class 'default_name_of_field' has reached the values of current instance. There is a way to do that (I am in v3.0) ? It sounds strange because addresses are already ordered by the field sequence. And moreover using the default value will not work properly with concurrency. Bizarre, on my installation the sequence field of the object party.address is empty, I would forget something? Because it is done like that by design. The order is on (sequence, id). Ok, but to return to my original question, is it possible (and how) to reach the values of the instance from a class method? Is there an example somewhere ? I don't understand the question. Which instance? For example I would have to know the value (the current one) of the field 'party' from the method 'default_my_new_field of the object party.address. -- Christophe http://adiczion.com
[tryton-dev] Replace property field by function field
Hi, I need to override a property field by a function field. All seems all right but when i call the field my function isn't call. It seems that it is still the old definition that is called. Is it possible to make it in 3.4 ? Regards -- Christophe http://adiczion.com
Re: [tryton-dev] RFC: check stock quantity on sale
Hi, I think it's better to have an explicit option to avoid checking. Use different information (like suply delay) may not respond to the greatest possible number of cases. My 2 cents Regards Le 13/05/2015 17:46, Cédric Krier a écrit : Hi, I started a review for a new module sale_stock_quantity [1] See the description for a complete explaination of the behaviour. I have just one concern about a possible option to skip the check for some products. [1] https://bugs.tryton.org/issue4752 Thanks, -- Christophe http://adiczion.com
Re: [tryton-dev] RFC: check stock quantity on sale
Le 14/05/2015 09:00, Cédric Krier a écrit : On 14 May 08:29, Christophe (net) wrote: Le 13/05/2015 17:46, Cédric Krier a écrit : Hi, I started a review for a new module sale_stock_quantity [1] See the description for a complete explaination of the behaviour. I have just one concern about a possible option to skip the check for some products. I think it's better to have an explicit option to avoid checking. Use different information (like suply delay) may not respond to the greatest possible number of cases. And where will you put this option? for me on the object product.product -- Christophe http://adiczion.com
[tryton-dev] Question on translation
Hello, In a new module I defined a selection field whose elements are updated dynamically (by a method that returns tuples). I translate all fields in the module (including tuple of selection) but at the time of display in a view the list of items still desperately in English. Yet in the documentation states that the default selection fields are translatable. I have this problem in v3.0, v3.2, v3.4 (I have not tested on versions prior to v3.0). Has anyone ever encountered this trouble? Regards -- Christophe Adiczion (www.adiczion.com)
Re: [tryton-dev] Question on translation
Le 07/04/2015 20:12, Cédric Krier a écrit : On 07 Apr 19:49, Christophe (net) wrote: Le 07/04/2015 19:14, Cédric Krier a écrit : On 07 Apr 17:57, Christophe wrote: Hello, In a new module I defined a selection field whose elements are updated dynamically (by a method that returns tuples). I translate all fields in the module (including tuple of selection) but at the time of display in a view the list of items still desperately in English. Yet in the documentation states that the default selection fields are translatable. I have this problem in v3.0, v3.2, v3.4 (I have not tested on versions prior to v3.0). Has anyone ever encountered this trouble? If you are using a method to define the selection options, the method must manage itself the translation of the options. Ok, is there somewhere a sample to make that ? Usualy such data come from the database so you just have to use a translatable field. Sorry i don't understand your answer, i have the following code _PRICE_TYPE = [ ('t_inc', 'Tax included'), ('t_exc', 'Tax excluded'), ] class Sale(Workflow, ModelSQL, ModelView): __name__ = 'sale.sale' price_type = fields.Selection('get_price_type', 'Price type', required=True, states={ 'readonly': (Eval('state') != 'draft') | (Bool(Eval('lines'))), }, selection_change_with=['party', 'shop', 'shop_price_type', 'state'], depends=_DEPENDS, help='Type of price of this sale.') def get_price_type(self): return _PRICE_TYPE In fact the 'get_price_type' method isn't exactly like that but i have the same issue with this code, Where i need to put the 'translatable field' to make the items of price_type translated in the view. -- Christophe http://adiczion.com
Re: [tryton-dev] Price list with tax included
Le 29/12/2014 16:52, Cédric Krier a écrit : Hi, I'm trying to solve a problem for price with tax included. Generally, when companies work this way they store the price with tax included on the product for example (could be the list price field). So the problem is how to make it works on the current sale design. Here is my idea, we could create a new module sale_price_list_tax_included (name to be reworked) which will add a flag on the price list to announce it will return a unit price that should be considered as tax included. On the sale, when such price list is used, we reverse compute the unit price without tax using the tax on the line (for which the tax rule has been applied). Normally, if we have enough decimal on the unit price, it should always be possible to find such unit price. The number of decimal needed will depend on the rate of the taxes of course and the quantity sold. So if we change tryton's module to use a configuration parameter for the digits (instead of the hard coded 4), a good value could be defined for each company according to their use case. So what do you think about such module? Hi, I have work on a such module : https://gitorious.org/ate_modules/trytond-sale_b2bc, it is not perfect, there's still a problem with the price lists but it work and I use it with one of my customers. Regards -- Christophe http://adiczion.com
Re: [tryton-dev] Remove constrainte
Le 09/12/2014 09:09, Guillem Barba Domingo a écrit : El 05/12/2014 16:50, Christophe c...@adiczion.com mailto:c...@adiczion.com va escriure: Le 05/12/2014 16:16, Sergi Almacellas Abellana a écrit : El 05/12/14 a les 15:41, Christophe ha escrit: Hello, Is there a way to remove constrainte put by a required clause ? In details, I have a field that have a constrainte put by the required clause and i want to remove this constainte by overload of the class. it-is possible ? Yes, it's possible. You have to do the following things. 1. Update fields definition to set required to false. 2. Drop the not null constraint on the database. BTW: Can you tell us which is the field you want to remove the constraint? This will help us to prevent having to much constraints on base modules. I have made (1) for (2) i try with __register__ method but it don't work (or i have made a mistake) @classmethod def __register__(cls, module_name): super(Article, cls).__register__(module_name) TableHandler = backend.get('TableHandler') cursor = Transaction().cursor table = TableHandler(cursor, cls, module_name) table.not_null_action('content', action='remove') Have you set the required flag of field to False? It must to be set in __setup__() method No, I thought to overload the field by removing the flag 'required' was sufficient ... For BTW : I try to remove constrainte from 'content' field because in my overload this field is not necessary (it is replaced by another). PS : I also view the Cedric response and what I want to do is perhaps not be possible. It could be done, but it is in the good practices to don't do it... But sometimes it is the way. In you example, it seems content is not strictly required. The main module should remove this flag and, provably, protect some parts of the code that asumes this field is not empty... Or you have tp be careful with the code you use from parent module to don't get an error because content is empty. You say that you replaced content field for another. Which kind of field? Why don't use content? As I said in an issue on the github of nereid_cms (# 69), I think that writing an article with multimedia content in rst or markdown is complicated for a non-programmer, so I test an alternative. I'm thinking if it makes sense to fill content field in create method no avoid databases not null error. That's right, so I override the create method to do that, and now the original question is solved for me, but we can continue the thread for a better solution. Regards -- Christophe http://adiczion.com
[tryton-dev] Remove constrainte
Hello, Is there a way to remove constrainte put by a required clause ? In details, I have a field that have a constrainte put by the required clause and i want to remove this constainte by overload of the class. it-is possible ? Regards. -- Christophe CRIER Adiczion (www.adiczion.com)
Re: [tryton-dev] Remove constrainte
Le 05/12/2014 16:16, Sergi Almacellas Abellana a écrit : El 05/12/14 a les 15:41, Christophe ha escrit: Hello, Is there a way to remove constrainte put by a required clause ? In details, I have a field that have a constrainte put by the required clause and i want to remove this constainte by overload of the class. it-is possible ? Yes, it's possible. You have to do the following things. 1. Update fields definition to set required to false. 2. Drop the not null constraint on the database. BTW: Can you tell us which is the field you want to remove the constraint? This will help us to prevent having to much constraints on base modules. I have made (1) for (2) i try with __register__ method but it don't work (or i have made a mistake) @classmethod def __register__(cls, module_name): super(Article, cls).__register__(module_name) TableHandler = backend.get('TableHandler') cursor = Transaction().cursor table = TableHandler(cursor, cls, module_name) table.not_null_action('content', action='remove') For BTW : I try to remove constrainte from 'content' field because in my overload this field is not necessary (it is replaced by another). PS : I also view the Cedric response and what I want to do is perhaps not be possible. -- Christophe CRIER Adiczion (www.adiczion.com)
Re: [tryton-dev] Tax included in price for sale and invoice.
Le 20/01/2014 19:31, Cédric Krier a écrit : On 20 Jan 15:41, Christophe (net) wrote: Hi, I return to the subject of the sales price with tax included. I have carefully read the blue print and I have followed the discution with Cedric on TUB2013, the general idea had concensus was to define a object dedicated for these sales. If I agree with this idea, the implementation is heavy (many module to modify based on this new object: sale_pos, nereid, ...) , Those module will have to be adapted any way. Yes of course but the change will be less important. this weekend I decided to overload the Sale object and Invoice object to allow sales management with prices tax included. That's very unfortunate. Because it was clearly identify that the workflows were very different. For my needs the current workflow enough and I needed to go fast. This new module (sale_b2bc) depends on the module sale_shop from ZikZakmedia. In summary: - Adding a flag on products to indicate if the list_price is tax included This will break any module that rely on list_price being tax excluded. So it must be an other field. You're right, at first I needed to test the sales flow quickly for the rounding error so I made this choice, but I just changed it to add another field as you suggest. - Adding a choice to the store to indicate if sales can be made tax included, tax excluded or both - Adding an option to object Sale to indicate if price is tax included or not. What happens if changed after filled lines? After the first line this field is locked Why having such flag? As in any way, a unit price tax excluded should be computed, why not just put it on the sale line? I have to keep the possibility of sales in 2 modes it had seemed wise to leave the choice to the user. Currently I do not calculate the VAT but the total price of the line HT - Change the calculation of taxes on sale and invoice to add tax included possibility The reverse tax computation should be interresting. - Modification of invoice object to adding tax included calculation like sale. What is the point? Why would you want an invoice tax included? And what does it mean? Sometimes we need to make a invoice without a full sales flow, either with price with tax include or not - Modification of the generation of accounting entries The accounting should not be changed if you sale with tax included or not. it seems to me that the amount of accounting movements (credit or debit) is generated from the amount of the invoice line which in my case may be include tax or tax excluded what remains to be done - The integration with stock management : valuation movements and invoice creation from deliveries Don't understand this should have nothing to do with taxes. - Add the installation procedure for PyPI - Add unit tests - Add doc - And tests, tests and still test :-) You can find the repository of the dev version here: https://gitorious.org/ate_modules/trytond-sale_b2bc : branch dev_3.0 I doubt such module could be included. I understand this position and I repeat this module is just that until one of the official version. -- Christophe Adiczion
[tryton-dev] Tax included in price for sale and invoice.
Hi, I return to the subject of the sales price with tax included. I have carefully read the blue print and I have followed the discution with Cedric on TUB2013, the general idea had concensus was to define a object dedicated for these sales. If I agree with this idea, the implementation is heavy (many module to modify based on this new object: sale_pos, nereid, ...) , this weekend I decided to overload the Sale object and Invoice object to allow sales management with prices tax included. This new module (sale_b2bc) depends on the module sale_shop from ZikZakmedia. In summary: - Adding a flag on products to indicate if the list_price is tax included - Adding a choice to the store to indicate if sales can be made tax included, tax excluded or both - Adding an option to object Sale to indicate if price is tax included or not. - Change the calculation of taxes on sale and invoice to add tax included possibility - Modification of invoice object to adding tax included calculation like sale. - Modification of the generation of accounting entries what remains to be done - The integration with stock management : valuation movements and invoice creation from deliveries - Add the installation procedure for PyPI - Add unit tests - Add doc - And tests, tests and still test :-) You can find the repository of the dev version here: https://gitorious.org/ate_modules/trytond-sale_b2bc : branch dev_3.0 Regards -- Christophe Adiczion Tél : +33.6.65.59.39.68
Re: [tryton-dev] Tax included in price for sale and invoice.
Le 20/01/2014 19:11, Albert Cervera i Areny a écrit : 2014/1/20 Christophe (net) c...@adiczion.net: Hi, I return to the subject of the sales price with tax included. I have carefully read the blue print and I have followed the discution with Cedric on TUB2013, the general idea had concensus was to define a object dedicated for these sales. If I agree with this idea, the implementation is heavy (many module to modify based on this new object: sale_pos, nereid, ...) , this weekend I decided to overload the Sale object and Invoice object to allow sales management with prices tax included. This new module (sale_b2bc) depends on the module sale_shop from ZikZakmedia. In summary: - Adding a flag on products to indicate if the list_price is tax included - Adding a choice to the store to indicate if sales can be made tax included, tax excluded or both I'd separate the shop/store module from the tax included one. I think there's no need to depend on stores... I put this dependency because I needed to choose whether a store can make sales with taxe included or not, but this should be in a separate module. - Adding an option to object Sale to indicate if price is tax included or not. - Change the calculation of taxes on sale and invoice to add tax included possibility - Modification of invoice object to adding tax included calculation like sale. I think invoice should be done in a different module. Why, because if a sale is made with price with tax included invoice must also tax included ? By the way, did you take into account account_invoice_line_standalone? Not in this version this is my first writing ... It should not be possible to mix lines with tax included with lines with tax excluded in the same invoice. Of course :-) - Modification of the generation of accounting entries what remains to be done - The integration with stock management : valuation movements and invoice creation from deliveries - Add the installation procedure for PyPI - Add unit tests - Add doc - And tests, tests and still test :-) You can find the repository of the dev version here: https://gitorious.org/ate_modules/trytond-sale_b2bc : branch dev_3.0 I could not see the code. Just the .gitignore file... change the branch : dev_3.0 Note that Cédric preferred to have slightly different objects sharing a large common base for managing both types of sales on the grounds of: - Tax included/excluded was a very important information that made it not a very good option to have all fields at sale line and use ones or the others depending on a flag - The workflow of sales could be different Yes, I wrote this module until the official version because I needed it now, and to do some advance topic That means that maybe your proposal it is hard it will be included in Tryton as is, but I'm still very interested in it. I do not think this module has now its place in the official version but if it can help someone that is perfect -- Christophe Adiczion Tél : +33.6.65.59.39.68
Re: [tryton-dev] Tax included in price for sale and invoice.
Le 20/01/2014 20:31, Cédric Krier a écrit : On 20 Jan 19:34, Christophe (net) wrote: That means that maybe your proposal it is hard it will be included in Tryton as is, but I'm still very interested in it. I do not think this module has now its place in the official version but if it can help someone that is perfect So tryton-contrib is the right mailing list. Here is about Tryton development so everything is looked in the perspective of being included. I had not seen this list, ok, my next post will be there -- Christophe Adiczion
[tryton-dev] Nereid and the payment.
Hi I continue my tests with Nereid, I got to the payment stage and I'm a little confused, the module 'nereid_checkout' proposes a method '_process_payment' but empty and there is a module 'nereid_payment'. What should I use for this operation? Regards. -- Christophe Adiczion Tél : +33.6.65.59.39.68
Re: [tryton-dev] Design of product view.
Le 26/12/2013 19:04, Cédric Krier a écrit : On 26 Dec 18:37, Christophe wrote: Hi, I saw more modules overload form view products, and each uses the description field as the basis for overload (stock_product_location, nereid_catalog, ...) and this generate some conflict. It should not if done correctly. What do you think put this famous field 'description' in a tab directly in the original view of the module product so everyone can add tabs for those specific fields ? I don't think it is a good idea as description is on the template, it will require to have a tab inside the General tab of product. As you want, but without putting in tab the size for each field is becoming smaller (description, locations, attributes, boms, e-commerce (from nereid), ...) -- Christophe Adiczion Tél : +33.6.65.59.39.68
[tryton-dev] Internal shipments with 'lost found' location.
Hello, In 2.6 we could make an Internal Shipment with lost found location for destination. Since 2.8 the destination location is only of the type 'storage', and it's no more possible to made an internal shipment with lost found for destination. Is this possible to add 'lost_found' in domain of to_location of ShipmentInternal ? If not, how can we declare a loss / breakage without an inventory? Regard -- Christophe CRIER Adiczion (www.adiczion.com) Tél : +33.6.65.59.39.68
[tryton-dev] Presentation on TUB2013
Hello, I don't find in the web site the presentation showed in TUB2013 like previous unconference. Is there a place where i can found them ? Regards. -- Christophe CRIER Adiczion (www.adiczion.com) Tél : +33.6.65.59.39.68
[tryton-dev] Sale for b2c
Hello, On TUB2013 we are talking about sales for b2c business and prices with included taxes. On the wiki i have also found a blueprint on this subject from july 2012. I am very interested to work on, but I'm new in the Tryton ecosystem, so I asked a question which must be the next step on this? Regard -- Christophe CRIER Adiczion (www.adiczion.com)
Re: [tryton-dev] Small questions about Tryton and Nereid
Le 16/09/2013 04:55, Sharoon Thomas a écrit : The module adds a context_processor [8] to the nereid template context. This means that the function `menu_for` would be available anywhere/anytime in the template context and calling it would call the method `nereid.cms.menu.menu_for` [9]. The usage is explained in the doc string. Yes, I saw this information and I also find a very comprehensive example (for me) in the test function of the module. But my question was wearing rather the relationship between the object Menu and the object MenuItem. Specifically I can not building a custom menu with product category (that's OK) and MenuItem objects pointing to article category (my pb is here) or any other object. -- Christophe Adiczion
Re: [tryton-dev] Small questions about Tryton and Nereid
Le lundi 16 septembre 2013 18:55:41 UTC+2, raimonesteve a écrit : UndefinedError 'trytond.pool.nereid.website object' has no attribute 'menu' I don't have time to review source code demo. I check website and don't have attribute menu. What CMS tryton module use? Oops, I just re check list of requirements and I realize that I made a confusion between your CMS module and nereid-cms module. Sorry for the inconvenience and thank you for your answers.
Re: [tryton-dev] Small questions about Tryton and Nereid
Le dimanche 15 septembre 2013 12:53:56 UTC+2, raimonesteve a écrit : Nereid-flask repo example: https://github.com/zikzakmedia/nereid-demo You could review sourcecode Thank you for your reply, I saw your demo and i have testing it, but like as I said in the question I asked on github I have an error message on the menus when I test this demo: UndefinedError 'trytond.pool.nereid.website object' has no attribute 'menu' I have missed something, but I do not know what?
[tryton-dev] Small questions about Tryton and Nereid
I am being tested with Tryton and Nereid. The Nereid demo site online is very interesting. So I installed it all (Tryton, nereid, nereid-cms, nereid-catalog, nerieid-cart-b2c) and I test ... of course beginnings are shy and I have questions. The first is about the menus in Nereid CMS, how do we use the menuitems from jinja files? you have an example? and more generally, where I could find examples of different treatment possibility of urlmap. Thank you for any help Regards -- Christophe Adiczion