Se rendre au contenu
Odoo Menu
  • Se connecter
  • Essai gratuit
  • Applications
    Finance
    • Comptabilité
    • Facturation
    • Notes de frais
    • Feuilles de calcul (BI)
    • Documents
    • Signature
    Ventes
    • CRM
    • Ventes
    • PdV Boutique
    • PdV Restaurant
    • Abonnements
    • Location
    Sites web
    • Site Web
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Chaîne d'approvisionnement
    • Inventaire
    • Fabrication
    • PLM
    • Achats
    • Maintenance
    • Qualité
    Ressources Humaines
    • Employés
    • Recrutement
    • Congés
    • Évaluations
    • Recommandations
    • Parc automobile
    Marketing
    • Marketing Social
    • E-mail Marketing
    • SMS Marketing
    • Événements
    • Marketing Automation
    • Sondages
    Services
    • Projet
    • Feuilles de temps
    • Services sur Site
    • Assistance
    • Planification
    • Rendez-vous
    Productivité
    • Discussion
    • Intelligence artificielle
    • Internet des Objets
    • VoIP
    • Connaissances
    • WhatsApp
    Applications tierces Odoo Studio Plateforme Cloud d'Odoo
  • Industries
    Commerce de détail
    • Librairie
    • Magasin de vêtements
    • Magasin de meubles
    • Supermarché
    • Quincaillerie
    • Magasin de jouets
    Restauration & Hôtellerie
    • Bar et Pub
    • Restaurant
    • Fast-food
    • Maison d’hôtes
    • Distributeur de boissons
    • Hôtel
    Immobilier
    • Agence immobilière
    • Cabinet d'architecture
    • Construction
    • Gestion immobilière
    • Jardinage
    • Association de copropriétaires
    Consultance
    • Cabinet d'expertise comptable
    • Partenaire Odoo
    • Agence Marketing
    • Cabinet d'avocats
    • Aquisition de talents
    • Audit & Certification
    Fabrication
    • Textile
    • Métal
    • Meubles
    • Alimentation
    • Brasserie
    • Cadeaux d'entreprise
    Santé & Fitness
    • Club de sports
    • Opticien
    • Salle de fitness
    • Praticiens bien-être
    • Pharmacie
    • Salon de coiffure
    Commerce
    • Homme à tout faire
    • Matériel informatique & support
    • Systèmes photovoltaïques
    • Cordonnier
    • Services de nettoyage
    • Services CVC
    Autres
    • Organisation à but non lucratif
    • Agence environnementale
    • Location de panneaux d'affichage
    • Photographie
    • Leasing de vélos
    • Revendeur de logiciel
    Parcourir toutes les industries
  • Communauté
    Apprenez
    • Tutoriels
    • Documentation
    • Certifications
    • Formation
    • Blog
    • Podcast
    Renforcer l'éducation
    • Programme éducatif
    • Business Game Scale-Up!
    • Rendez-nous visite
    Obtenir le logiciel
    • Téléchargement
    • Comparez les éditions
    • Versions
    Collaborer
    • Github
    • Forum
    • Événements
    • Traductions
    • Devenir partenaire
    • Services pour partenaires
    • Enregistrer votre cabinet comptable
    Nos Services
    • Trouver un partenaire
    • Trouver un comptable
    • Rencontrer un conseiller
    • Services de mise en œuvre
    • Références clients
    • Assistance
    • Mises à niveau
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Obtenir une démonstration
  • Tarification
  • Aide
Vous devez être inscrit pour interagir avec la communauté.
Toutes les publications Personnes Badges
Étiquettes (Voir toutl)
odoo accounting v14 pos v15
À propos de ce forum
Vous devez être inscrit pour interagir avec la communauté.
Toutes les publications Personnes Badges
Étiquettes (Voir toutl)
odoo accounting v14 pos v15
À propos de ce forum
Aide

ValueError: ("Can't load unknown file type %s.", 'models/shift_model.py')

S'inscrire

Recevez une notification lorsqu'il y a de l'activité sur ce poste

Cette question a été signalée
odoo12
1 Répondre
6870 Vues
Avatar
lisa

Hi,

I am trying to create a module that extends hr_payroll odoo12. When I install the module extension I get this error.

Error:
Odoo Server Error

Traceback (most recent call last):
File "/home/viscar/odoo12/odoo/http.py", line 656, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/home/viscar/odoo12/odoo/http.py", line 314, in _handle_exception
raise pycompat.reraise(type(exception), exception, sys.exc_info()[2])
File "/home/viscar/odoo12/odoo/tools/pycompat.py", line 87, in reraise
raise value
File "/home/viscar/odoo12/odoo/http.py", line 698, in dispatch
result = self._call_function(**self.params)
File "/home/viscar/odoo12/odoo/http.py", line 346, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/home/viscar/odoo12/odoo/service/model.py", line 97, in wrapper
return f(dbname, *args, **kwargs)
File "/home/viscar/odoo12/odoo/http.py", line 339, in checked_call
result = self.endpoint(*a, **kw)
File "/home/viscar/odoo12/odoo/http.py", line 941, in __call__
return self.method(*args, **kw)
File "/home/viscar/odoo12/odoo/http.py", line 519, in response_wrap
response = f(*args, **kw)
File "/home/viscar/odoo12/addons/web/controllers/main.py", line 966, in call_button
action = self._call_kw(model, method, args, {})
File "/home/viscar/odoo12/addons/web/controllers/main.py", line 954, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "/home/viscar/odoo12/odoo/api.py", line 749, in call_kw
return _call_kw_multi(method, model, args, kwargs)
File "/home/viscar/odoo12/odoo/api.py", line 736, in _call_kw_multi
result = method(recs, *args, **kwargs)
File "<decorator-gen-61>", line 2, in button_immediate_install
File "/home/viscar/odoo12/odoo/addons/base/models/ir_module.py", line 74, in check_and_log
return method(self, *args, **kwargs)
File "/home/viscar/odoo12/odoo/addons/base/models/ir_module.py", line 445, in button_immediate_install
return self._button_immediate_function(type(self).button_install)
File "/home/viscar/odoo12/odoo/addons/base/models/ir_module.py", line 561, in _button_immediate_function
modules.registry.Registry.new(self._cr.dbname, update_module=True)
File "/home/viscar/odoo12/odoo/modules/registry.py", line 86, in new
odoo.modules.load_modules(registry._db, force_demo, status, update_module)
File "/home/viscar/odoo12/odoo/modules/loading.py", line 421, in load_modules
loaded_modules, update_module, models_to_check)
File "/home/viscar/odoo12/odoo/modules/loading.py", line 313, in load_marked_modules
perform_checks=perform_checks, models_to_check=models_to_check
File "/home/viscar/odoo12/odoo/modules/loading.py", line 222, in load_module_graph
load_data(cr, idref, mode, kind='data', package=package, report=report)
File "/home/viscar/odoo12/odoo/modules/loading.py", line 68, in load_data
tools.convert_file(cr, package.name, filename, idref, mode, noupdate, kind, report)
File "/home/viscar/odoo12/odoo/tools/convert.py", line 806, in convert_file
raise ValueError("Can't load unknown file type %s.", filename)
ValueError: ("Can't load unknown file type %s.", 'models/shift_model.py')


1
Avatar
Ignorer
lisa
Auteur

Here is my __manifest__.py

{'name': 'Shift Allowance',

'version': '12.0.1.0.0',

'summary': 'Calculates shift allowance for external empoloyees',

'category': 'Tools',

'author': 'Eliza ',

'depends': ['base'],

'external_dependencies': {"python": ['numpy']},

'data': ['models/shift_model.py', 'views/shift_views.xml'],

'installable': True,

'application': False,

'auto_install': False,

}

I have an init within models, and alongside manifest with imports just as recommended.

lisa
Auteur

Here is the shift_model.py

# -*- coding: utf-8 -*-

from odoo import models, fields, api

import numpy as np

class ShiftAllowance(models.Model):

# _name ='shift.allowance'

_description = 'Shift Allowance'

_inherit = 'hr.contract'

# field types working shifts

BasicPayRate = fields.Integer(default=0)

WeekdayDay = fields.Integer(default=0)

WeekdayNight = fields.Integer(default=0)

WeekendDay = fields.Integer(default=0)

WeekendNight = fields.Integer(default=0)

ShiftAllowance = fields.Float()

@api.multi

def userDetails(self):

"""

This function prompts the user for input variables and

returns a dictionary of said varibales

"""

# picks data provided by user and saves it in a dict.

# A dictionary to hold the input variables

work_details = {}

current_user = self.env.user.user_id.id

if current_user:

# work_details["weekdayDay"] = int(self.env['hr.contract.weekdayDay'])

work_details["weekdayDay"] = int(self.weekdayDay)

work_details["weekdayNight"] = int(self.weekdayNight)

work_details["weekendDay"] = int(self.weekendDay)

work_details["weekendNight"] = int(self.weekendNight)

return work_details

# ,WeekdayDay, WeekdayNight, WeekendDay, WeekendNight

# import pdb; pdb.set_trace()

@api.multi

def basic_pay_rate(self):

# picks the basic pay rate as provided by the user

basic_rate = int(self.BasicPayRate)

return basic_rate

# create two arrays weekday and weekend

@api.multi

def shiftWorked(self, work_details):

# Get user work details first

# weekdayShift

WDS = np.array([work_details["weekdayDay"], work_details["weekdayNight"]]).reshape(2, 1)

# WeekendShift

WES = np.array([work_details["weekendDay"], work_details["weekendNight"]]).reshape(2, 1)

# print (WDS,WES)

return WDS, WES

@api.multi

def matrix(self, WDS, WES):

# Get shifts worked

WDS, WES = shiftWorked()

# our constant matrix

OurMatrix = np.array([[1, 9, 2], [7, 0, 5]])

# multiply it by our weekday shifts

WDMatrix = OurMatrix * WDS

# Get the total for the weekdays

WDTotal = WDMatrix.sum(axis=0)

# multiply it by our weekend shifts

WEMatrix = OurMatrix * WES

# Get the total for the weekends

WETotal = WEMatrix.sum(axis=0)

return WDTotal, WETotal

@api.multi

def ratesCalc(self, WDTotal, WETotal):

# Get shift totals

WDTotal, WETotal = matrix()

# our weekday rates

WDRates = np.array([22/100, 0/100, 15/100])

# our weekend rates

WERates = np.array([27/100, 10/100, 20/100])

# multiply weekdayTotals by weekday rates

effectiveWDHrs = WDTotal * WDRates

# multiply weekendTotals by weekend rates

effectiveWEHrs = WETotal * WERates

# Get the total effective hours

effectiveHours = np.concatenate((effectiveWDHrs, effectiveWEHrs), axis=None)

# Get the sum of the hours

totalEffectiveHours = np.sum((effectiveHours), dtype=np.float)

return totalEffectiveHours

# Calculate the amount payable per employee

@api.multi

def amountPayable(self, basic_rate, totalEffectiveHours):

# Get user's basic pay rate

# Get total effective hours

# A constant

Anumber = 21/8

# to get the hourly rate multiply the two

HrlyRate = basic_rate * Anumber

# now get the amount payable

AmountPayable = HrlyRate * totalEffectiveHours

return AmountPayable

# link to the button compute shift allowance so that on click it performs this function

@api.multi

def final_calc(amountPayable):

return amountPayable()

Marcel Trotzek

This confirms my original assumption: You need to remove "'models/shift_model.py'" from your __manifest__.py and instead reference it by using the described __init__.py files.

lisa
Auteur

Something like this?

'data': ['models/__init__.py', 'views/shift_views.xml'],

lisa
Auteur

I have made the above change, yet I am still getting the same error.

Error:

Odoo Server Error

Traceback (most recent call last):

File "/home/viscar/odoo12/odoo/http.py", line 656, in _handle_exception

return super(JsonRequest, self)._handle_exception(exception)

File "/home/viscar/odoo12/odoo/http.py", line 314, in _handle_exception

raise pycompat.reraise(type(exception), exception, sys.exc_info()[2])

File "/home/viscar/odoo12/odoo/tools/pycompat.py", line 87, in reraise

raise value

File "/home/viscar/odoo12/odoo/http.py", line 698, in dispatch

result = self._call_function(**self.params)

File "/home/viscar/odoo12/odoo/http.py", line 346, in _call_function

return checked_call(self.db, *args, **kwargs)

File "/home/viscar/odoo12/odoo/service/model.py", line 97, in wrapper

return f(dbname, *args, **kwargs)

File "/home/viscar/odoo12/odoo/http.py", line 339, in checked_call

result = self.endpoint(*a, **kw)

File "/home/viscar/odoo12/odoo/http.py", line 941, in __call__

return self.method(*args, **kw)

File "/home/viscar/odoo12/odoo/http.py", line 519, in response_wrap

response = f(*args, **kw)

File "/home/viscar/odoo12/addons/web/controllers/main.py", line 966, in call_button

action = self._call_kw(model, method, args, {})

File "/home/viscar/odoo12/addons/web/controllers/main.py", line 954, in _call_kw

return call_kw(request.env[model], method, args, kwargs)

File "/home/viscar/odoo12/odoo/api.py", line 749, in call_kw

return _call_kw_multi(method, model, args, kwargs)

File "/home/viscar/odoo12/odoo/api.py", line 736, in _call_kw_multi

result = method(recs, *args, **kwargs)

File "<decorator-gen-61>", line 2, in button_immediate_install

File "/home/viscar/odoo12/odoo/addons/base/models/ir_module.py", line 74, in check_and_log

return method(self, *args, **kwargs)

File "/home/viscar/odoo12/odoo/addons/base/models/ir_module.py", line 445, in button_immediate_install

return self._button_immediate_function(type(self).button_install)

File "/home/viscar/odoo12/odoo/addons/base/models/ir_module.py", line 561, in _button_immediate_function

modules.registry.Registry.new(self._cr.dbname, update_module=True)

File "/home/viscar/odoo12/odoo/modules/registry.py", line 86, in new

odoo.modules.load_modules(registry._db, force_demo, status, update_module)

File "/home/viscar/odoo12/odoo/modules/loading.py", line 421, in load_modules

loaded_modules, update_module, models_to_check)

File "/home/viscar/odoo12/odoo/modules/loading.py", line 313, in load_marked_modules

perform_checks=perform_checks, models_to_check=models_to_check

File "/home/viscar/odoo12/odoo/modules/loading.py", line 222, in load_module_graph

load_data(cr, idref, mode, kind='data', package=package, report=report)

File "/home/viscar/odoo12/odoo/modules/loading.py", line 68, in load_data

tools.convert_file(cr, package.name, filename, idref, mode, noupdate, kind, report)

File "/home/viscar/odoo12/odoo/tools/convert.py", line 806, in convert_file

raise ValueError("Can't load unknown file type %s.", filename)

ValueError: ("Can't load unknown file type %s.", 'models/__init__.py')

Marcel Trotzek

You should not reference any Python file in the 'data' attribute. Just having the __init__.py files in these folders is already enough for your modified model to be found. Your data attribute should look like this:

'data': ['views/shift_views.xml'],

lisa
Auteur

I have enforced the change and this is the error I am getting.

Despite the file being present

Error:

Odoo Server Error

Traceback (most recent call last):

File "/home/viscar/odoo12/odoo/http.py", line 656, in _handle_exception

return super(JsonRequest, self)._handle_exception(exception)

File "/home/viscar/odoo12/odoo/http.py", line 314, in _handle_exception

raise pycompat.reraise(type(exception), exception, sys.exc_info()[2])

File "/home/viscar/odoo12/odoo/tools/pycompat.py", line 87, in reraise

raise value

File "/home/viscar/odoo12/odoo/http.py", line 698, in dispatch

result = self._call_function(**self.params)

File "/home/viscar/odoo12/odoo/http.py", line 346, in _call_function

return checked_call(self.db, *args, **kwargs)

File "/home/viscar/odoo12/odoo/service/model.py", line 97, in wrapper

return f(dbname, *args, **kwargs)

File "/home/viscar/odoo12/odoo/http.py", line 339, in checked_call

result = self.endpoint(*a, **kw)

File "/home/viscar/odoo12/odoo/http.py", line 941, in __call__

return self.method(*args, **kw)

File "/home/viscar/odoo12/odoo/http.py", line 519, in response_wrap

response = f(*args, **kw)

File "/home/viscar/odoo12/addons/web/controllers/main.py", line 966, in call_button

action = self._call_kw(model, method, args, {})

File "/home/viscar/odoo12/addons/web/controllers/main.py", line 954, in _call_kw

return call_kw(request.env[model], method, args, kwargs)

File "/home/viscar/odoo12/odoo/api.py", line 749, in call_kw

return _call_kw_multi(method, model, args, kwargs)

File "/home/viscar/odoo12/odoo/api.py", line 736, in _call_kw_multi

result = method(recs, *args, **kwargs)

File "<decorator-gen-61>", line 2, in button_immediate_install

File "/home/viscar/odoo12/odoo/addons/base/models/ir_module.py", line 74, in check_and_log

return method(self, *args, **kwargs)

File "/home/viscar/odoo12/odoo/addons/base/models/ir_module.py", line 445, in button_immediate_install

return self._button_immediate_function(type(self).button_install)

File "/home/viscar/odoo12/odoo/addons/base/models/ir_module.py", line 561, in _button_immediate_function

modules.registry.Registry.new(self._cr.dbname, update_module=True)

File "/home/viscar/odoo12/odoo/modules/registry.py", line 86, in new

odoo.modules.load_modules(registry._db, force_demo, status, update_module)

File "/home/viscar/odoo12/odoo/modules/loading.py", line 421, in load_modules

loaded_modules, update_module, models_to_check)

File "/home/viscar/odoo12/odoo/modules/loading.py", line 313, in load_marked_modules

perform_checks=perform_checks, models_to_check=models_to_check

File "/home/viscar/odoo12/odoo/modules/loading.py", line 222, in load_module_graph

load_data(cr, idref, mode, kind='data', package=package, report=report)

File "/home/viscar/odoo12/odoo/modules/loading.py", line 68, in load_data

tools.convert_file(cr, package.name, filename, idref, mode, noupdate, kind, report)

File "/home/viscar/odoo12/odoo/tools/convert.py", line 796, in convert_file

with file_open(pathname, 'rb') as fp:

File "/home/viscar/odoo12/odoo/tools/misc.py", line 199, in file_open

return _fileopen(name, mode=mode, basedir=rtp, pathinfo=pathinfo, basename=basename)

File "/home/viscar/odoo12/odoo/tools/misc.py", line 257, in _fileopen

raise IOError('File not found: %s' % basename)

OSError: File not found: new_shift_test/views/shift_views.xml

lisa
Auteur

My bad, there was a typo.

It works!

The error is no longer there.

lisa
Auteur

This is my shift_view.xml.

<?xml version="1.0"?>

<data>

<xpath expr="//page[@name='information']" position="after">

<page string="Shift Allowance" name="shift_allowance">

<group>

<group name="shift_allowance" string="Shift Allowance Details">

<button string="Compute Allowance" class="oe_highlight" name="Compute Allowance" type="object"/>

<field name="weekdayDay"/>

<field name="weekdayNight"/>

<field name="weekendDay"/>

<field name="weekendNight"/>

<field name="BasicPayRate"/>

<field name="ShiftAllowance"/>

</group>

</group>

</page>

</xpath>

</data>

I get an assertion error:

I have had this error before on a different project and each time there has been no direct fix. Most of the time there ends up being something wrong with the code.

Do you spot anything odd with the code.

Odoo Server Error

Traceback (most recent call last):

File "/home/viscar/odoo12/odoo/http.py", line 656, in _handle_exception

return super(JsonRequest, self)._handle_exception(exception)

File "/home/viscar/odoo12/odoo/http.py", line 314, in _handle_exception

raise pycompat.reraise(type(exception), exception, sys.exc_info()[2])

File "/home/viscar/odoo12/odoo/tools/pycompat.py", line 87, in reraise

raise value

File "/home/viscar/odoo12/odoo/http.py", line 698, in dispatch

result = self._call_function(**self.params)

File "/home/viscar/odoo12/odoo/http.py", line 346, in _call_function

return checked_call(self.db, *args, **kwargs)

File "/home/viscar/odoo12/odoo/service/model.py", line 97, in wrapper

return f(dbname, *args, **kwargs)

File "/home/viscar/odoo12/odoo/http.py", line 339, in checked_call

result = self.endpoint(*a, **kw)

File "/home/viscar/odoo12/odoo/http.py", line 941, in __call__

return self.method(*args, **kw)

File "/home/viscar/odoo12/odoo/http.py", line 519, in response_wrap

response = f(*args, **kw)

File "/home/viscar/odoo12/addons/web/controllers/main.py", line 966, in call_button

action = self._call_kw(model, method, args, {})

File "/home/viscar/odoo12/addons/web/controllers/main.py", line 954, in _call_kw

return call_kw(request.env[model], method, args, kwargs)

File "/home/viscar/odoo12/odoo/api.py", line 749, in call_kw

return _call_kw_multi(method, model, args, kwargs)

File "/home/viscar/odoo12/odoo/api.py", line 736, in _call_kw_multi

result = method(recs, *args, **kwargs)

File "<decorator-gen-61>", line 2, in button_immediate_install

File "/home/viscar/odoo12/odoo/addons/base/models/ir_module.py", line 74, in check_and_log

return method(self, *args, **kwargs)

File "/home/viscar/odoo12/odoo/addons/base/models/ir_module.py", line 445, in button_immediate_install

return self._button_immediate_function(type(self).button_install)

File "/home/viscar/odoo12/odoo/addons/base/models/ir_module.py", line 561, in _button_immediate_function

modules.registry.Registry.new(self._cr.dbname, update_module=True)

File "/home/viscar/odoo12/odoo/modules/registry.py", line 86, in new

odoo.modules.load_modules(registry._db, force_demo, status, update_module)

File "/home/viscar/odoo12/odoo/modules/loading.py", line 421, in load_modules

loaded_modules, update_module, models_to_check)

File "/home/viscar/odoo12/odoo/modules/loading.py", line 313, in load_marked_modules

perform_checks=perform_checks, models_to_check=models_to_check

File "/home/viscar/odoo12/odoo/modules/loading.py", line 222, in load_module_graph

load_data(cr, idref, mode, kind='data', package=package, report=report)

File "/home/viscar/odoo12/odoo/modules/loading.py", line 68, in load_data

tools.convert_file(cr, package.name, filename, idref, mode, noupdate, kind, report)

File "/home/viscar/odoo12/odoo/tools/convert.py", line 802, in convert_file

convert_xml_import(cr, module, fp, idref, mode, noupdate, report)

File "/home/viscar/odoo12/odoo/tools/convert.py", line 852, in convert_xml_import

relaxng.assert_(doc)

File "src/lxml/lxml.etree.pyx", line 3501, in lxml.etree._Validator.assert_ (src/lxml/lxml.etree.c:184715)

AssertionError: Element data has extra content: xpath, line 3

Marcel Trotzek

I'm glad your original error could be fixed this way. I think in this case the question should be marked as solved and a new one should be created concerning your view, because the topic is completely different. Currently your new question is hard to find for people who could answer it as well as others with similar issues in the future.

On first sight, your view looks like it is meant to override some other view, but it lacks the required <record> definition to tell the system which view to override.

lisa
Auteur

Where can I specify that it is solved?

Well, I am trying to extend an existing page by adding a group of fields.

Marcel Trotzek

You should be able to click the checkmark icon on the left side of an answer.

To override an existing view you should check how this is done by Odoo itself (e.g. here: https://github.com/odoo/odoo/blob/12.0/addons/sale_stock/views/sale_order_views.xml ). If you need specific help, I would suggest to create a separate question, so this can be answered in more detail than here in the comments.

lisa
Auteur

Hi,

Thank you for the fix, by the way, there are no assertion errors.

I am concerned that odoo can't find my python file. because now I am getting the error below.

I have defined the fields in the py file, the one above.(I wish the formatting was better tho)

raise ValidationError("%s\n\n%s" % (_("Error while validating constraint"), tools.ustr(e)))

odoo.tools.convert.ParseError: "Error while validating constraint

Field `weekdayDay` does not exist

Marcel Trotzek

You have defined your fields with a leading uppercase character in your Python file. You should change it to "weekdayDay" instead of "WeekdayDay" (and similar for all other fields). Keep in mind that you always need to restart your Odoo instance after modifying Python files.

lisa
Auteur

Bless you! Marcel,

Everything works fine, the view is visible. All that is left is checking if my code actually works.

This is a win, I had spent two months on it.

lisa
Auteur

I have a different blocker. It's about creating a qweb for 'printing individual leave'. I had posted the question a while back, the answers helped but I am still stuck. If you could help me, please. I am updating my current progress on the question.

Avatar
Marcel Trotzek
Meilleure réponse

Hi,

Can you show us the __manifest__.py file of your module? Just judging from the stacktrace it sounds like you have referenced a Python file from there (e.g. in the "data" field), which should not be the case. Following e.g. the develeloper docs, you should have a file __init__.py next to your __manifest__.py like this:

# -*- coding: utf-8 -*-
from . import models

Then within your "models" folder, there would be another __init__.py file like this:

# -*- coding: utf-8 -*-
from . import shift_model
0
Avatar
Ignorer
Vous appréciez la discussion ? Ne vous contentez pas de lire, rejoignez-nous !

Créez un compte dès aujourd'hui pour profiter de fonctionnalités exclusives et échanger avec notre formidable communauté !

S'inscrire
Publications associées Réponses Vues Activité
Survey User
odoo12
Avatar
1
avr. 26
3672
Odoo Mail Sending Limit Résolu
odoo12
Avatar
Avatar
Avatar
2
déc. 23
18281
(Document type: Invoice, Operation: write) - (Records: [], User: 2)
odoo12
Avatar
0
oct. 23
33
Error while importing data in Odoo12: An unknown issue occurred during import (possibly lost connection, data limit exceeded or memory limits exceeded)
odoo12
Avatar
Avatar
Avatar
Avatar
3
oct. 23
790
Remove duplicate record when importing data from excel to Odoo
odoo12
Avatar
Avatar
1
oct. 23
569
Communauté
  • Tutoriels
  • Documentation
  • Forum
Open Source
  • Téléchargement
  • Github
  • Runbot
  • Traductions
Services
  • Hébergement Odoo.sh
  • Assistance
  • Migration
  • Développements personnalisés
  • Éducation
  • Trouver un comptable
  • Trouver un partenaire
  • Devenir partenaire
À propos
  • Notre société
  • Actifs de la marque
  • Contactez-nous
  • Emplois
  • Événements
  • Podcast
  • Blog
  • Clients
  • Informations légales • Confidentialité
  • Sécurité.
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk Slovenščina Español (América Latina) Español Svenska ภาษาไทย Türkçe українська Tiếng Việt

Odoo est une suite d'applications open source couvrant tous les besoins de votre entreprise : CRM, eCommerce, Comptabilité, Inventaire, Point de Vente, Gestion de Projet, etc.

Le positionnement unique d'Odoo est d'être à la fois très facile à utiliser et totalement intégré.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now