Skip to Content
Odoo Menu
  • Prihlásiť sa
  • Vyskúšajte zadarmo
  • Aplikácie
    Financie
    • Účtovníctvo
    • Fakturácia
    • Výdavky
    • Tabuľka (BI)
    • Dokumenty
    • Podpis
    Predaj
    • CRM
    • Predaj
    • POS Shop
    • POS Restaurant
    • Manažment odberu
    • Požičovňa
    Webstránky
    • Tvorca webstránok
    • eShop
    • Blog
    • Fórum
    • Živý chat
    • eLearning
    Supply Chain
    • Sklad
    • Výroba
    • Správa životného cyklu produktu
    • Nákup
    • Údržba
    • Manažment kvality
    Ľudské zdroje
    • Zamestnanci
    • Nábor zamestnancov
    • Voľné dni
    • Hodnotenia
    • Odporúčania
    • Vozový park
    Marketing
    • Marketing sociálnych sietí
    • Email marketing
    • SMS marketing
    • Eventy
    • Marketingová automatizácia
    • Prieskumy
    Služby
    • Projektové riadenie
    • Pracovné výkazy
    • Práca v teréne
    • Helpdesk
    • Plánovanie
    • Schôdzky
    Produktivita
    • Tímová komunikácia
    • Schvalovania
    • IoT
    • VoIP
    • Znalosti
    • WhatsApp
    Third party apps Odoo Studio Odoo Cloud Platform
  • Priemyselné odvetvia
    Retail
    • Book Store
    • Clothing Store
    • Furniture Store
    • Grocery Store
    • Hardware Store
    • Toy Store
    Food & Hospitality
    • Bar and Pub
    • Reštaurácia
    • Fast Food
    • Guest House
    • Beverage distributor
    • Hotel
    Reality
    • Real Estate Agency
    • Architecture Firm
    • Konštrukcia
    • Estate Managament
    • Gardening
    • Property Owner Association
    Poradenstvo
    • Accounting Firm
    • Odoo Partner
    • Marketing Agency
    • Law firm
    • Talent Acquisition
    • Audit & Certification
    Výroba
    • Textile
    • Metal
    • Furnitures
    • Jedlo
    • Brewery
    • Corporate Gifts
    Health & Fitness
    • Sports Club
    • Eyewear Store
    • Fitness Center
    • Wellness Practitioners
    • Pharmacy
    • Hair Salon
    Trades
    • Handyman
    • IT Hardware and Support
    • Solar Energy Systems
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Iní
    • Nonprofit Organization
    • Environmental Agency
    • Billboard Rental
    • Photography
    • Bike Leasing
    • Software Reseller
    Browse all Industries
  • Komunita
    Vzdelávanie
    • Tutoriály
    • Dokumentácia
    • Certifikácie
    • Školenie
    • Blog
    • Podcast
    Empower Education
    • Vzdelávací program
    • Scale Up! Business Game
    • Visit Odoo
    Softvér
    • Stiahnuť
    • Porovnanie Community a Enterprise vierzie
    • Releases
    Spolupráca
    • Github
    • Fórum
    • Eventy
    • Preklady
    • Staň sa partnerom
    • Services for Partners
    • Register your Accounting Firm
    Služby
    • Nájdite partnera
    • Nájdite účtovníka
    • Meet an advisor
    • Implementation Services
    • Zákaznícke referencie
    • Podpora
    • Upgrades
    ​Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Získajte demo
  • Cenník
  • Pomoc

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • CRM
  • e-Commerce
  • Účtovníctvo
  • Sklady
  • PoS
  • Projektové riadenie
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Tagy (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Tagy (View all)
odoo accounting v14 pos v15
About this forum
Pomoc

Doesn't execute the scheduled actions, help me?

Odoberať

Get notified when there's activity on this post

This question has been flagged
subscriptionir.cron
1 Odpoveď
3850 Zobrazenia
Avatar
Duvan Jose Guzman Cubillos

I need to run the following scheduled action:

​odoo
record id="ir_cron_renovation" model="ir.cron"
field name="name">Verificar vigencia de suscripciones /field
field name="model_id" ref="model_sale_subscription"/
field name="state" code /field
field name="code" model.check_espiry() /field
field name="interval_number" 1 /field
field name="interval_type" days /field
field name="numbercall" -1 /field
field name="doall" eval="True"/
field name="active" eval="True"/
record
odoo

This is my function:


class Renovation(models.Model):
​_inherit = 'sale.subscription'

​def check_espiry(self):

​#my code here

Manually if run but not automatically. The error is this :

"""

Traceback (most recent call last):
File "/home/odoo/src/odoo/odoo/tools/safe_eval.py", line 332, in safe_eval
return unsafe_eval(c, globals_dict, locals_dict)
File "", line 1, in
AttributeError: 'sale.subscription' object has no attribute 'activity_date_deadline_range'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/odoo/src/odoo/addons/mail/models/mail_render_mixin.py", line 456, in _render_template_inline_template
results[record.id] = render_inline_template(template_instructions, variables)
File "/home/odoo/src/odoo/odoo/tools/rendering_tools.py", line 71, in render_inline_template
result = safe_eval.safe_eval(expression, variables)
File "/home/odoo/src/odoo/odoo/tools/safe_eval.py", line 348, in safe_eval
raise ValueError('%s: "%s" while evaluating\n%r' % (ustr(type(e)), ustr(e), expr))
ValueError: : "'sale.subscription' object has no attribute 'activity_date_deadline_range'" while evaluating
' object.activity_date_deadline_range '

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/odoo/src/odoo/odoo/addons/base/models/ir_cron.py", line 367, in _callback
self.env['ir.actions.server'].browse(server_action_id).run()
File "/home/odoo/src/odoo/odoo/addons/base/models/ir_actions.py", line 643, in run
res = runner(run_self, eval_context=eval_context)
File "/home/odoo/src/odoo/addons/website/models/ir_actions.py", line 61, in _run_action_code_multi
res = super(ServerAction, self)._run_action_code_multi(eval_context)
File "/home/odoo/src/odoo/odoo/addons/base/models/ir_actions.py", line 512, in _run_action_code_multi
safe_eval(self.code.strip(), eval_context, mode="exec", nocopy=True) # nocopy allows to return 'action'
File "/home/odoo/src/odoo/odoo/tools/safe_eval.py", line 332, in safe_eval
return unsafe_eval(c, globals_dict, locals_dict)
File "", line 1, in
File "/home/odoo/src/user/renovation_subscription/models/renovation.py", line 75, in check_espiry
subscription.write({'stage_id': stage.id})
File "/home/odoo/src/odoo/addons/base_automation/models/base_automation.py", line 345, in write
write.origin(self.with_env(actions.env), vals, **kw)
File "/home/odoo/src/enterprise/sale_subscription/models/sale_subscription.py", line 374, in write
self._send_subscription_rating_mail(force_send=True)
File "/home/odoo/src/enterprise/sale_subscription/models/sale_subscription.py", line 547, in _send_subscription_rating_mail
subscription.rating_send_request(
File "/home/odoo/src/odoo/addons/rating/models/rating_mixin.py", line 166, in rating_send_request
record.message_post_with_template(
File "/home/odoo/src/odoo/addons/mass_mailing/models/mail_thread.py", line 37, in message_post_with_template
return super(MailThread, no_massmail).message_post_with_template(template_id, **kwargs)
File "/home/odoo/src/odoo/addons/mail/models/mail_thread.py", line 1979, in message_post_with_template
update_values = composer._onchange_template_id(template_id, kwargs['composition_mode'], self._name, res_id)['value']
File "/home/odoo/src/odoo/addons/mail/wizard/mail_compose_message.py", line 573, in _onchange_template_id
values = self.generate_email_for_composer(
File "/home/odoo/src/odoo/addons/mail/wizard/mail_compose_message.py", line 684, in generate_email_for_composer
template_values = self.env['mail.template'].with_context(tpl_partners_only=True).browse(template_id).generate_email(res_ids, fields)
File "/home/odoo/src/odoo/addons/account_edi/models/mail_template.py", line 21, in generate_email
res = super().generate_email(res_ids, fields)
File "/home/odoo/src/odoo/addons/mail/models/mail_template.py", line 203, in generate_email
generated_field_values = template._render_field(
File "/home/odoo/src/odoo/addons/mail/models/mail_render_mixin.py", line 607, in _render_field
return dict(
File "/home/odoo/src/odoo/addons/mail/models/mail_render_mixin.py", line 610, in
for res_id, rendered in template._render_template(
File "/home/odoo/src/odoo/addons/mail/models/mail_render_mixin.py", line 512, in _render_template
rendered = self._render_template_inline_template(template_src, model, res_ids,
File "/home/odoo/src/odoo/addons/mail/models/mail_render_mixin.py", line 459, in _render_template_inline_template
raise UserError(_("Failed to render inline_template template : %s)", e))
odoo.exceptions.UserError: No se pudo visualizar en la plantilla inline_template : : "'sale.subscription' object has no attribute 'activity_date_deadline_range'" while evaluating
' object.activity_date_deadline_range ')

""" 


0
Avatar
Zrušiť
Avatar
shubham shiroya
Best Answer

here you need to define the object 'activity_date_deadline_range' in the 'sale.subscription' model because the activity_date_deadline_range object is not present in the 'sale.subscription' model

0
Avatar
Zrušiť
Enjoying the discussion? Don't just read, join in!

Create an account today to enjoy exclusive features and engage with our awesome community!

Registrácia
Related Posts Replies Zobrazenia Aktivita
How do I transfer my subscription from the old database to the new one? Solved
subscription
Avatar
Avatar
1
jún 25
2011
Subscription scam Solved
subscription
Avatar
Avatar
1
apr 25
3618
This combination does not exist.
subscription
Avatar
Avatar
Avatar
2
feb 25
6043
Does Odoo Support Usage Based Subscriptions?
subscription
Avatar
Avatar
Avatar
2
nov 24
5302
Recurring billing from the previous month
subscription
Avatar
Avatar
1
dec 25
2863
Komunita
  • Tutoriály
  • Dokumentácia
  • Fórum
Open Source
  • Stiahnuť
  • Github
  • Runbot
  • Preklady
Služby
  • Odoo.sh hosting
  • Podpora
  • Vyššia verzia
  • Custom Developments
  • Vzdelávanie
  • Nájdite účtovníka
  • Nájdite partnera
  • Staň sa partnerom
O nás
  • Naša spoločnosť
  • Majetok značky
  • Kontaktujte nás
  • Pracovné ponuky
  • Eventy
  • Podcast
  • Blog
  • Zákazníci
  • Právne dokumenty • Súkromie
  • Bezpečnosť
الْعَرَبيّة 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 ภาษาไทย Türkçe українська Tiếng Việt

Odoo je sada podnikových aplikácií s otvoreným zdrojovým kódom, ktoré pokrývajú všetky potreby vašej spoločnosti: CRM, e-shop, účtovníctvo, skladové hospodárstvo, miesto predaja, projektový manažment atď.

Odoo prináša vysokú pridanú hodnotu v jednoduchom použití a súčasne plne integrovanými biznis aplikáciami.

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