Skip to Content
Menu
This question has been flagged
6 Replies
1829 Views


Goodnight,

I added a related field in account_invoice with a custom domain, but I see this is not reflected. what can be missing?

domain="[('parent_id','!=',False)]"

Thank you,

odoo11 release

Cheers.

class AccountInvoice(models.Model):

    _inherit = "account.invoice"

     partner_id = fields.Many2one(

                            'res.partner', 

                            string='Partner',

                            change_default=True,

                            readonly=True,

                            states={'draft': [('readonly', False)]},

                            track_visibility='always',

                            domain="[('parent_id','!=',False)]")



Avatar
Discard

Are you sure you've imported this python file in the __init__ file? Are you sure you have a dependency set to the accounting module in your __manifest__.py file?

Author

the module is already installed. the server is being restarted and the module is being updated.

Did you solved this yet?

Best Answer

is your module installed?    

Avatar
Discard
Author

Hello, if the module is already installed.

Best Answer

You have to restart the Odoo server, update apps list  and upgrade the app/module for the changes to take effect.

Avatar
Discard
Author

hello, reboot, update, and still not working. I'm not sure why.