Skip to Content
मेन्यू
This question has been flagged
1 Reply
1141 Views

Hi everyone,

I'm developing my custom module, and everything works fine until I try to inherit from res.partner.

As soon as I attempt to inherit from res.partner, the build tests fail immediately with errors, as shown here

However, when I update my module directly from Odoo.sh, the new field appears correctly in the res.partner model. But if I push my code, the resulting build test are failing (red status).

Here is my res_partner.py file:


from odoo import models, fields class ResPartner(models.Model): _inherit = 'res.partner' x_octave_create_date = fields.Date( string="Date de création (Octave)" ) x_octave_write_date = fields.Date( string="Date de modification (Octave)" )

And my __manifest__.py file contains:


'depends': ['base', 'contacts'],

Am I doing something wrong?

If I inherit another model, I don't have this issue.

Any ideas on what might be causing this?

Thanks in advance for your help!

Avatar
Discard

Hello Félicien  

I tried to do this in my local machine and it worked just fine

Please share with us the error you get and the whole code

Best Answer

Hi,

The issue you're facing is related to the depends declaration in your module's __manifest__.py. The res.partner model is defined in the base module, not in contacts, so if you're only inheriting res.partner to add custom fields and not using any additional views, menus, or features from the contacts module, there's no need to include contacts in the depends list. In fact, adding unnecessary dependencies like contacts can cause problems during Odoo.sh builds, especially if those modules introduce extra views, fields, or constraints that conflict during testing. Since the contacts module itself already depends on base, including base alone is sufficient for accessing and extending res.partner. Removing contacts from your dependencies can resolve build errors and simplify your module’s dependencies.


Please refer to the code below:

In manifest:


'depends': ['base'],


Hope it helps.

Avatar
Discard
Related Posts Replies Views Activity
4
मार्च 24
3328
1
अक्तू॰ 23
5302
0
सित॰ 23
1740
0
अप्रैल 23
1792
1
जून 22
6516