odoo / odoo

Odoo. Open Source Apps To Grow Your Business.
https://www.odoo.com
Other
38.74k stars 25.09k forks source link

[master l10n_latam_invoice_document] cant not search documents by l10n_latam_document_number #57900

Open celm1990 opened 4 years ago

celm1990 commented 4 years ago

Impacted versions: Cannot search documents by field l10n_latam_document_numberbecause field is not store. @zaoral @jjscarafia any reason for not set store=Trueon this field???

Please can you add store=True or implement searchfuncion for compute field to V14?

thanks for attention

Steps to reproduce:

Current behavior:

Expected behavior:

Video/Screenshot link (optional):

jjscarafia commented 4 years ago

Hi @celm1990 The reason of non storing is because till now it is not really needed and better avoid store=True if not needed. The document_number + prefix is stored on the "name" field, so normally we search and see "name" field.

Is there any use case where you want to use "l10n_latam_document_number" and not name?

In any case, a search function is not harmful, the only problem I see is that it may be difficult to implement because each localization and implement it's own logic to this fields.

jjscarafia commented 4 years ago

Just to let you know, odoo wants to split "l10n_latam_document_number" storing always in "name" and wants --> name for customer invoices --> ref supplier bills

I really don't like this approach. I just let you know so that you take into consideration this change and in case you have any feedback. https://github.com/odoo/odoo/pull/57768

celm1990 commented 4 years ago

Is there any use case where you want to use "l10n_latam_document_number" and not name?

In Ecuador for supplier electronic's documents we import txt file with document number(001-001-0123456789). search must be with operator '=' and not ilike. namestore with prefix(FC=Factura de compra) so name = FC-001-001-0123456789.

In any case, a search function is not harmful, the only problem I see is that it may be difficult to implement because each localization and implement it's own logic to this fields.

We create a new field to save document number without prefix xD but on master my wishlist for field l10n_latam_document_number as store=True