Odoo Help

1

0
3 Answers
2
Jaakko Komulainen
20.05.14, 05:14

You can set it in xml by inheriting the original view and setting the required attribute of a field.

<field name="property_account_position" position="attributes">

    <attribute name="required">True</attribute>

</field>

 

1 Comment
NIKHIL KRISHNAN
13.07.16, 00:06

if we inheriting this original view, is necessary use the <xpath>?

2
Jérôme Thériault
03.04.17, 16:01
  • Go into the view in developper mode.

  • In the debug menu, select edit view

  • In the dialog, select "Inherited views" and click Add new. This creates a new inherited view in the database, so you don't need to develope a whole module.

  • Give it a name you'll recognize. Could be anything but for uniformity, I suggest you follow what other views do.

  • Set the inheritance mode to Extension View

  • In the architecture field, enter what you'd normally enter in a XML view file. See below for an example:

<data>

<field name="street" position="attributes">

  <attribute name="required">True</attribute>

</field>

</data>

Ask a Question
Writer
Keep Informed
1 follower(s)
About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

Register
Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now