Welcome!

Share and discuss the best content and new marketing ideas, build your professional profile and become a better marketer together.

Sign up

You need to be registered to interact with the community.
This question has been flagged
1 Reply
7 Views

Hey Cyllo community! Having trouble setting default values for a computed field that uses digits and a One2many field. Any tips or examples on how to handle this?

Avatar
Discard

Here's a summary of how special field attributes in Odoo work, along with some examples to illustrate their use. This should help clarify how to use them effectively. Special field attributes in Odoo define behavior and constraints like precision (digits), default values, relations (One2many), automatic defaults (Date), and storage of computed fields. Field Type - Example - Purpose Float - digits=(10, 2) - Decimal precision Selection - default='draft' - Sets default choice One2many - 'example.line', 'example_id' - Defines child model and reverse relation Date - default=fields.Date.today - Uses today’s date automatically Computed Fields - store = True - Store in the database

Avatar
Discard

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!