On 04/02/14 19:37, Gmail - Iasmini wrote:
Hi,

In my module I changed the invoice_date field on invoice to required even if the status is draft. But, now, when I try to duplicate one invoice it says: The field "Invoice Date" on "Invoice" is required.

But this field is filled. Why this message? And how I fix it?


Because the copy method of invoices puts an empty value in "Invoice date" field:

        default.setdefault('invoice_date', None)

You could create a copy method in your module that calls the super() of this method and afterfills the "Invoice date", for example with today.

--
Jordi Esteve
Consultor Zikzakmedia SL
[email protected]
Mòbil 679 170 693

Zikzakmedia SL
Dr. Fleming, 28, baixos
08720 Vilafranca del Penedès
Tel 93 890 2108

Reply via email to