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

Can someone explain to me how to add new fields to the Journal Entry I currently use.

I would like to add 3 custom fields to this Journal Entry to show on the JE screens and in a template I use for importing.

Thanks

Awatar
Odrzuć
Najlepsza odpowiedź

Hello @Help, 

You can simply created and add field by using studio. Please note that the fields added by studio are limited to database. So, if you change the database then you have to repeat the same process.


Steps to add fields using studio customization are as follows.


1: Click on 'Toggle Studio' button as displayed in the below screenshot. (You may need to activate studio if the module is not installed in your database)

2: Drag and drop the field into the view.

3: Fill the required details.

4: Hit the close button and you're good to go.


Kindly refer below screenshots for better understanding.


Feel free to contact us for further assistance

Hope this answer helps you.

Thanks & Regards,
Email:  odoo@aktivsoftware.com     

Skype: kalpeshmaheshwari

Awatar
Odrzuć
Autor Najlepsza odpowiedź

I don't think I fully understand, I'm try to add custom fields to my ODOO subscription. Is this code only for your own copy of ODOO that runs on your own server.

If not how and where is this code entered.? I use PHP?

Thanks

Awatar
Odrzuć

If you are using odoo Enterprise version you can use odoo studio module to create new field.
check the newly updated answer

Najlepsza odpowiedź

Hi,
Try this code

PYTHON
from odoo import models, fields

class AccountMove(models.Model):
    _inherit = 'account.move'

    custom_field = fields.Char(string="Custom Field")

XML:


<odoo>
    <data>
<record id="view_account_move_form_inherited" model="ir.ui.view">
<field name="name">account.move.form.inherited</field>
<field name="model">account.move</field>
            <field name="inherit_id" ref="account.view_move_form">
            <field name="arch" type="xml">
                <field name="ref" position="after">
                    <field name="custom_field"/>
                </field>
            </field>
        </record>
    </data>
</odoo>



Hope it helps

Awatar
Odrzuć
Najlepsza odpowiedź

Hi 

You can inherit the 'account. move' model and add these fields in it 

class AccountMove(models. Model):

​_inherit = 'account.move'


​field_1 = fields.Char(string="Field Name")

add it to the inherited view of the account. move and place it in the appropriate position.


add fields using odoo studio 

Odoo Studio


Regards



Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
2
lip 25
1477
0
sty 24
1448
1
lis 23
1730
1
wrz 23
2409
2
maj 25
2637