Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
1 Odpowiedz
7684 Widoki

Hello

In my bespoke system, I like to have a hyperlink on issues to a forum question if applicable. Open ERP does not seem to provide the field or link function.

Awatar
Odrzuć
Najlepsza odpowiedź

You need to add a Custom Field to Project Issues.

First, log in as Administrator and make sure the Technical Features are enabled. In the Settings menu:

  • Go to Users, find and open "Administrator", and in the Access Rightstab checkTechnical Features`.

Second, create the custom field in the database:

  • Go to Technical -> Database Structure, find and edit the "Project Issue" model
  • At the bottom of the Fields tab, "Add an Item"
  • Create the new field:
    • Name: x_url
    • Field Label: Hyperlink
    • Field Type: char
    • Size 200
    • Save & Close the "Create Fields" dialog
  • "Save" the Project Issue changes

Finally, add the field to the form:

  • Go to Technical -> User Interface, find and edit the "Project Issue Tracker Form"
  • In the Architecture text, find and replace:

                    <group groups="base.group_user">
                        <field name="user_id"/>
    

with

                    <group groups="base.group_user">
                        <field name="x_url" widget="url"/>
                        <field name="user_id"/>

And it's done. Now go to Project Issues and you'll see the new field available.

For fields that are not URLs just remove the "widget=...". Just write: <field name="my_field_name"/>. See all attributes a field can have inn the official docs.

Awatar
Odrzuć
Autor

Fantastic, thanks a lot. That showed me a little that its nice and open and can be changed.

Autor

How do I add fields that are not url fields and have them appear with a larger box (like description). Set type to char size 400 or text. But what should the widget be in xml architecture for this type of field? <field name="x_url" widget="url"/>

For fields that are not URLs just remove the "widget=...". Just write: &lt;field name="my_field_name"/&gt;. - just added this to the answer.

Autor

Daniel, thanks. How can I however increase the size of the data entry field?

Changing the field's size in the Database Structure should be enough. I chose 200, but you can change that to whatever size.

Autor

Sorry I meant on the form view rather than in the database structure

In the form you only need to tell where you want to place the field, and optionally add some display attributes, such as the widget to use. The size and type is defined in the database structure. If for some reason the size change isn't taking effect, try restarting the OpenERP server.

Powiązane posty Odpowiedzi Widoki Czynność
2
paź 23
1564
0
paź 21
1781
0
sie 15
2964
3
cze 15
7907
1
mar 15
6365