[tryton-dev] Request testing for a new module Purchase_requisition

2016-09-14 Thread Maxime Richez
Hi, I'm working on a new module proposal : Purchase_requisition https://discuss.tryton.org/t/purchase-requisition/47/1 https://bugs.tryton.org/issue5657 I would like to have feedback on it. Thanks, -- You received this message because you are subscribed to the Google Groups "tryton-d

[tryton-dev] Re: Postpone for one week release 4.2

2016-10-24 Thread Maxime Richez
Le dimanche 23 octobre 2016 19:05:03 UTC+2, Cédric Krier a écrit : > > Hi, > > With the #TUB2016 code sprint, there are still some patches waiting to > be included. I would like to give one extra week to finish and include > them. This means that we need to postpone the release that was planne

[tryton-dev] hgnested

2017-01-25 Thread Maxime Richez
Hi, I'm wondering if it could be possible to add an option on hgnested to force to keep going on in case of error ? Little explanation : I'm working on tryton at work and at home on the same computer. Some of my modules are developed only for work and hosted in a private repository at work. B

[tryton-dev] Using property (tryton 4.2) on domain field

2017-06-20 Thread Maxime Richez
Hi, Here's my small problem in Tryton 4.2, i want to filter products on a specific product category. I define those category as a property in a configuration. My code is here: https://pastebin.com/wDF8qGtX So in my main class (PrinterModel), i define a function field on product category to ge

Re: [tryton-dev] Using property (tryton 4.2) on domain field

2017-06-20 Thread Maxime Richez
> > Why using a Property field? > > The only way to store a value in configuration, no ? And it allows to choose an existing product category. > Only field of a model can be evaluated by PYSON. > There is the PYSON.Id but it will require that you create the category > in XML. > I'll try

Re: [tryton-dev] Using property (tryton 4.2) on domain field

2017-06-20 Thread Maxime Richez
> > I agree with Cedric here. Specially if you want to use it on a domain. Let > me explain: > > If you store it on the configuration, changing the value on the > configuration may invalidate all the existing records domain. Creating a > static category with xml records will prevent it. > >

Re: [tryton-dev] Using property (tryton 4.2) on domain field

2017-06-20 Thread Maxime Richez
> > > No, any field can be stored on configuration but usually it is a > Property/MultiValue because it depends on the company. > > Ok, i didn't know , as you said, in the code, it's usually Property/Multivalue... -- You received this message because you are subscribed to the Google Groups

[tryton-dev] Help on Pyson Statement

2017-11-24 Thread Maxime Richez
Hi, We are looking to define a specific rule on a button (Models-> Models Access -> Buttons). Rule would be : 2 users needs to validate button if amount is greater than a specific value. We try this expression : [["total_amount", ">", 500]] This is not working. What should be the correct expres

Re: [tryton-dev] Help on Pyson Statement

2017-11-24 Thread Maxime Richez
> You have some examples in the test suite: > > http://hg.tryton.org/trytond/file/34073513c887/trytond/tests/test_modelview.py#l194 > > Have you tried?: > > Eval('self', {}).get('total_amount', 0) > 500 > > Hope it helps. Thanks but we are testing from the tryton client, and expression is not

Re: [tryton-dev] Help on Pyson Statement

2017-11-24 Thread Maxime Richez
> > I will create an issue in order to fix it. > Done: https://bugs.tryton.org/issue6964 > > It will be great if you can test it :) > Ok; tested ! Easier with the widget :-) -- You received this message because you are subscribed to the Google Groups "tryton-dev" group. To view this discussi

[tryton-dev] Advices or good practices when developping multiple custom modules...

2017-12-12 Thread Maxime Richez
During TUL2017, i could see the structure of Jurassic Fruit website using tryton. All the content was in one directory with the customization of the different modules in sub-directories... Could we have a small example of such structure and what should be written in tryton.cfg, __init__.py file

Re: [tryton-dev] Advices or good practices when developping multiple custom modules...

2017-12-12 Thread Maxime Richez
Thanks! -- 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/d8845aff-6a72-4583-a76c-73fb90e0ce87%40googlegroups.com.

[tryton-dev] Re: 80 cols on XML file

2017-12-21 Thread Maxime Richez
+1 -- 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/ca655c26-7634-4097-ac72-38e706df3630%40googlegroups.com.

[tryton-dev] Adding a sequence on an existing field

2018-01-31 Thread Maxime Richez
Hi, Some questions and explanations of something i thought easy to realize... I decide to create a custom module to add a sequence on an existing field. In my case, it concerns stock_lot module. There's a field "number" (type char, required=true) that i need to be "sequenced". So in my module,

Re: [tryton-dev] Adding a sequence on an existing field

2018-01-31 Thread Maxime Richez
> I believe there is a generic need to create lot numbers with a sequence > defined. Indeed nantic has a module which allows to configure the > sequence based on the product or on the category [1]. > > I will be very happy if we find a generic solution that can be part of > tryton. Indeed my solu

Re: [tryton-dev] Adding a sequence on an existing field

2018-01-31 Thread Maxime Richez
> Use a test like this: > > if not values.get('number'): > … Ok, working > The constraint on removing "NOT NULL" only by the original module is > there on purpose because once a field is required all depending code > will not manage the case if it is empty. So we must ensure that th

Re: [tryton-dev] Adding a sequence on an existing field

2018-01-31 Thread Maxime Richez
> I think the problem is: > > cls.number.states['readonly'] = True > > Try to remove required states that is not True (and/or invisible in case that > you like not show it) > Not working because unchanged in the database, but also risky like Cédric said... so i just changed my test ;-) Thanks

Re: [tryton-dev] Adding images in reports

2018-02-19 Thread Maxime Richez
> import barcode > > from barcode.writer import ImageWriter > > > class Product: > > barcode = fields.Function(fields.Binary("Barcode", > > states={ > > 'invisible': ~Eval('barcode'), > > }), > > 'get_barcode') > > > >

Re: [tryton-dev] Adding images in reports

2018-02-19 Thread Maxime Richez
> Hi, > > I try your code to generate a barcode on a report. > I had to install "Pillow" (pip install Pillow) to avoid an NoneType error. > How display this new field 'barcode' inside LibreOffice writer ? I try to add > a frame but don't know how to link my binary field and relatorio > document

[tryton-dev] Add a conditional page break inside report

2018-03-02 Thread Maxime Richez
Hello, Does anyone knows a define a conditional page break inside a report ? We need to print a page as a "big label" and if i select multiple records, each record should fill exactly one page. And if i print only one record, i don't want an empty blank page after the printed page. Same problem

Re: [tryton-dev] Add a conditional page break inside report

2018-03-02 Thread Maxime Richez
> We have some custom modules that need the same behaviour and we > implemented it by surrounding the page break with the following if > condition: > > if test="records and record != records[-1]" > /if > > This will add a page break for all pages except the last one. > > Hope it helps. Workin

[tryton-dev] Good practice: Function Field naming ?

2018-04-26 Thread Maxime Richez
Hi, I'm adding function fields from model purchase in model purchase_line : party, currency, purchase_date,... Wondering if it's better to name those fields with a prefix : purchase_party, purchase_currency,... but purchase_date is already prefixed... Should i define a global dictionary of map

[tryton-dev] Ordering function field depending of the "parent" of an origin field

2018-05-02 Thread Maxime Richez
Hi, Here are some explanations before the questions: The Purchase_Request could have as origin a PurchaseRequisition_Line which is depending of a PurchaseRequisition. I'm adding some function fields on my PurchaseRequest: those fields are employee and number from PurchaseRequisition. But then, i

Re: [tryton-dev] Ordering function field depending of the "parent" of an origin field

2018-05-04 Thread Maxime Richez
> It will be easier to have the full traceback. https://pastebin.com/Derb7cna Client traceback: https://pastebin.com/XkDAZt2V Did i proceed correctly to join tables? -- You received this message because you are subscribed to the Google Groups "tryton-dev" group. To view this discussion on th

Re: [tryton-dev] Ordering function field depending of the "parent" of an origin field

2018-05-04 Thread Maxime Richez
> > The value for 'requisition' should again be a dictionary with a None key > etc. Ok that solves the tuple error :-) Now, my error is about the correct column for sorting : https://pastebin.com/q3MvMtEc How to specify sort on the correct column "c.employee" instead of "b.employee"? -- You

Re: [tryton-dev] Ordering function field depending of the "parent" of an origin field

2018-05-04 Thread Maxime Richez
> How to specify sort on the correct column "c.employee" instead of > "b.employee"? In the convert_order method in fields.py, it's using: table, _ = tables[None] but in my case it should use table, _ = tables['requisition'] to use the correct column for the order ??? -- You received this mess

Re: [tryton-dev] Ordering function field depending of the "parent" of an origin field

2018-05-04 Thread Maxime Richez
> So pass the right dictionary to convert_order Understood :-) Here's a working example: https://pastebin.com/BHVTQ6qR Thanks for your help ! -- You received this message because you are subscribed to the Google Groups "tryton-dev" group. To view this discussion on the web visit https://gro

[tryton-dev] Re: Add party name to a list of orderlines

2018-05-17 Thread Maxime Richez
Le mercredi 16 mai 2018 19:52:14 UTC+2, edbo@gmail.com a écrit : > Last weekend we finally migrated from OpenERP v5 to Tryton and are already > happy with the system. However during working with Tryton colleagues > discovered some issues which are not available in Tryton (yet). So we decided

[tryton-dev] Updating form_relate title

2018-05-22 Thread Maxime Richez
{"language":"en","employee.rec_name":"Maxime Richez","locale":{"date":"%m/%d/%Y","thousands_sep":",","grouping":[3,3,0],"decimal_point":"."},"language_direction":"

Re: [tryton-dev] Updating form_relate title

2018-05-23 Thread Maxime Richez
> I think the RPC call to get the rec_name should use the action_ctx. > Added an issue: https://bugs.tryton.org/issue7454 -- 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/msgi

[tryton-dev] Re: Sort by function fields

2018-07-09 Thread Maxime Richez
Here's the same question with some examples: https://groups.google.com/d/topic/tryton/rpbeK9n9xC4/discussion -- 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/f6