How to set a very long text by default in a field in Odoo8?

0

Good morning,

I am working with the selection and recruitment module of odoo8 ... the problem is that I have a text that is too long (one page or so) and the bosses hate to be copying / pasting that text every time they make a new record ...

This is the following text:

"They tend to see the good side of things, they are optimistic about the possibilities that the future offers them, they find it easy to have a good time and they face with equanimity the ups and downs of existence. MODIFICATION they take their life in their hands and make things happen instead of being passively held in. They are diligently engaged in modifying their environment and influencing events so that they meet their needs and desires. elevated in INDIVIDUALISM are oriented to satisfy their own needs and desires, that is, they try to fully realize themselves in the first place, they care very little about the effect that their behavior may have on others, and tend to be both independent and self-centered .

They turn to others for encouragement and encouragement. Your friends and colleagues are for them a source of ideas and guidance, inspiration and energy; they help them maintain their self-esteem and comfort them with their presence. They derive their knowledge of the tangible and the concrete; they rely on direct experience and observable phenomena rather than on the use of inference and abstraction. The practical and the "real", the literal and the factual are what makes them feel comfortable and inspires confidence. They prefer to process knowledge through logic and analytical reasoning. Their decisions are based on dispassionate, impersonal and "objective" judgments and not on subjective emotions. They are very organized and predictable in their way of approaching life's experiences. They transform new knowledge by adapting it to what is already known and are careful, if not perfectionist, even when dealing with small details. Consequently, they are considered orderly, meticulous and efficient.

They look for stimulation, excitement and attention. They often react vividly to situations they witness, but their interest usually fades quickly. Frequents of high society, bright and friendly, can also be demanding and manipulative. People who score high on FIRMING tend to believe that they are more competent and talented than those around them. They are often ambitious, self-centered and self-confident, and they have no language. It is likely that others see them as arrogant and inconsiderate. People who score high in CONFORMISM are likely to be honest and have self-control. Their relationship with authority is respectful and cooperative, and they tend to act with formality and good manners in social situations. It is unlikely that they will reveal their personality or that they will act spontaneously. People who score high on CONTROL are energetic and often dominant and socially aggressive. They tend to see themselves as intrepid and competitive. For them, the kindness and the demonstrations of affection are signs of weakness, and therefore they avoid them, being obstinate and ambitious.

They turn to others for encouragement and encouragement. Your friends and colleagues are for them a source of ideas and guidance, inspiration and energy; they help them maintain their self-esteem and comfort them with their presence. They derive their knowledge of the tangible and the concrete; they rely on direct experience and observable phenomena rather than on the use of inference and abstraction. The practical and the "real", the literal and the factual are what makes them feel comfortable and inspires confidence. They prefer to process knowledge through logic and analytical reasoning. Their decisions are based on dispassionate, impersonal and "objective" judgments and not on subjective emotions. They are very organized and predictable in their way of approaching life's experiences. They transform new knowledge by adapting it to what is already known and are careful, if not perfectionist, even when dealing with small details. Consequently, they are considered orderly, meticulous and efficient. "

How can I put that full text as the default value in a text field of Odoo8?

    
asked by GioV 12.05.2017 в 18:58
source

1 answer

0

good afternoon,

I have already solved the problem and therefore I publish the solution

There are currently 2 ways to configure it 1) Through the user interface 2) In the code file, in this case hr_recruitment.py

1) Through the Odoo8 User Interface:

  • Activate developer mode
  • Open the form view and find the field to which you want to assign the default value.
  • From the developer mode, in the drop-down menu click on set defaults
  • In the drop-down list of the pop-up window, select your field and click on save defaults . You can optionally specify whether this default value should be just for you or for all users.
  • Alternatively, if you insist on having it in your python code, just choose a convenient way to store the long value (in a separate file throughout your custom module, or as a variable within your module, somewhere db, etc.) and then cancel the module, declaring the default value of the field

    long_text = """A very long text""" field_name = fields.Char(default=long_text)

        
    answered by 18.05.2017 / 19:28
    source