Odoo Help


This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Hi I am receiving an error on this code

Kevin Hernandez
on 5/19/16, 11:30 AM 215 views



<template id="website_calendar" name="Website Calendar">

<t t-call="website.layout">

<div id="wrap">

<t t-raw="0" />

<div class="oe_structure oe_empty" />

<section class="jumbotron mt16 mb16">

<div class="container">

<h1 class="text-center">Calendar</h1>

<table class="table table-bordered table-responsive">

<t t-set="week_days" t-value="request.env['booking.booking'].now_week()"/>

<t t-set="booking" t-value="request.env['calendar.event'].search([('name','=','Presentation for new Services')])"/>



<th class="text-center" colspan="7"><h2>HI: <t t-esc="week_days[0].isocalendar()[1]"/></h2>





<tr class="text-center">

<t t-foreach="week_days" t-as="d">

<td class="text-center"><h3 style="color: #888;" t-esc="d.strftime('%a')"/><br/>

<h1 t-esc="d.strftime('%d')"/><br/>

<h3 style="color: #444;" t-esc="d.strftime('%b')"/>




<tr class="text-center">

<t t-foreach="week_days" t-as="d">


<t t-foreach="product.get_free_spots(d)" t-as="spot">

<a t-att-href="spot.url"><span t-field="spot.name"/></a><br/>


<span t-esc="request.env['booking.temp'].search([])[0].get_employee_calendar()"/>













AttributeError: 'module' object has no attribute 'models'

"Hi I am receiving an error on this code" is not a question, and forces people to open your post to understand what error you mean. Please edit your post and put the error in the title.

Bista Solutions US, Ray Carnes
on 5/19/16, 6:11 PM

Post your .py file.

Juan Vicente Pascual
on 5/20/16, 2:11 AM

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)


Asked: 5/19/16, 11:30 AM
Seen: 215 times
Last updated: 5/19/16, 6:10 PM