Skip to Content
Odoo Menu
  • Prisijungti
  • Išbandykite nemokamai
  • Programėlės
    Finansai
    • Apskaita
    • Pateikimas apmokėjimui
    • Sąnaudos
    • Skaičiuoklė (BI)
    • Dokumentai
    • Pasirašymas
    Pardavimai
    • CRM
    • Pardavimai
    • Kasų sistema - Parduotuvė
    • Kasų sistema - Restoranas
    • Prenumeratos
    • Nuoma
    Svetainės
    • Svetainių kūrėjimo įrankis
    • El. Prekyba
    • Internetinis Tinklaraštis
    • Forumas
    • Tiesioginis pokalbis
    • eMokymasis
    Tiekimo grandinė
    • Atsarga
    • Gamyba
    • PLM
    • Įsigijimai
    • Priežiūra
    • Kokybė
    Žmogaus ištekliai
    • Darbuotojai
    • Įdarbinimas
    • Atostogos
    • Įvertinimai
    • Rekomendacijos
    • Transporto priemonės
    Rinkodara
    • Socialinė rinkodara
    • Rinkodara el. paštu
    • SMS rinkodara
    • Renginiai
    • Rinkodaros automatizavimas
    • Apklausos
    Paslaugos
    • Projektas
    • Darbo laiko žiniaraščiai
    • Priežiūros tarnyba
    • Pagalbos tarnyba
    • Planavimas
    • Rezervacijos
    Produktyvumas
    • Diskucija
    • Patvirtinimai
    • IoT
    • VoIP
    • Žinių biblioteka
    • WhatsApp
    Trečiųjų šalių programos Odoo Studija Odoo debesijos platforma
  • Pramonės šakos
    Mažmeninė prekyba
    • Knygynas
    • Drabužių parduotuvė
    • Baldų parduotuvė
    • Maisto prekių parduotuvė
    • Techninės įrangos parduotuvė
    • Žaislų parduotuvė
    Food & Hospitality
    • Barai ir pub'ai
    • Restoranas
    • Greitasis maistas
    • Guest House
    • Gėrimų platintojas
    • Hotel
    Nekilnojamasis turtas
    • Real Estate Agency
    • Architektūros įmonė
    • Konstrukcija
    • Estate Managament
    • Sodininkauti
    • Turto savininkų asociacija
    Konsultavimas
    • Accounting Firm
    • Odoo Partneris
    • Marketing Agency
    • Teisinė firma
    • Talentų paieška
    • Auditai & sertifikavimas
    Gamyba
    • Textile
    • Metal
    • Furnitures
    • Maistas
    • Brewery
    • Įmonių dovanos
    Sveikata & Fitnesas
    • Sporto klubas
    • Akinių parduotuvė
    • Fitneso Centras
    • Sveikatos praktikai
    • Vaistinė
    • Kirpėjas
    Trades
    • Handyman
    • IT įranga ir palaikymas
    • Saulės energijos sistemos
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Kiti
    • Nonprofit Organization
    • Aplinkos agentūra
    • Reklaminių stendų nuoma
    • Fotografavimas
    • Dviračių nuoma
    • Programinės įrangos perpardavėjas
    Browse all Industries
  • Bendrija
    Mokykitės
    • Mokomosios medžiagos
    • Dokumentacija
    • Sertifikatai
    • Mokymai
    • Internetinis Tinklaraštis
    • Tinklalaidės
    Skatinkite švietinimą
    • Švietimo programa
    • Scale Up! Verslo žaidimas
    • Aplankykite Odoo
    Gaukite programinę įrangą
    • Atsisiųsti
    • Palyginkite versijas
    • Leidimai
    Bendradarbiauti
    • Github
    • Forumas
    • Renginiai
    • Vertimai
    • Tapkite partneriu
    • Services for Partners
    • Registruokite jūsų apskaitos įmonę
    Gaukite paslaugas
    • Susiraskite partnerį
    • Susirask buhalterį
    • Susitikti su konsultantu
    • Diegimo paslaugos
    • Klientų rekomendavimas
    • Palaikymas
    • Atnaujinimai
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Gaukite demo
  • Kainodara
  • Pagalba

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

  • CRM
  • e-Commerce
  • Apskaita
  • Atsarga
  • PoS
  • Projektas
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Žymos (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Žymos (View all)
odoo accounting v14 pos v15
About this forum
Pagalba

How to save the values of fields ?

Prenumeruoti

Get notified when there's activity on this post

This question has been flagged
wizardodoo10
4 Replies
9286 Rodiniai
Portretas
karim bryant

  hello, I would like to save the changes in the wizard. When I change the date of my wizard and validate, the dates do not change. What i put in my wizard.py ?

xml wizard :

<?xml version="1.0" encoding="utf-8"?>
<odoo>
    <data>

        <record id="change_date_expense_sheet_form" model="ir.ui.view">
            <field name="name">Change date expense sheet</field>
            <field name="model">edit.date.expense.sheet.wizard</field>
            <field name="priority">1</field>
            <field name="type">form</field>
            <field name="arch" type="xml">
                <form string="Change Date Expense Sheet">
                  <sheet>
                      <group >
                          <field name="validation_date"/>
                      </group>
                    </sheet>
                  <footer>
                      <button string="Validate" class="oe_highlight" type="object" name="validate_modifications"/>
                      <button string="Cancel" special="cancel"/>
                  </footer>
                </form>
            </field>
        </record>

        <record id="change_expense_sheet_action" model="ir.actions.act_window">
            <field name="name">Change Date Expense Sheet</field>
            <field name="type">ir.actions.act_window</field>
            <field name="res_model">edit.date.expense.sheet.wizard</field>
            <field name="view_type">form</field>
            <field name="view_id" ref="rp_hr.change_date_expense_sheet_form"/>
            <field name="view_mode">form</field>
            <field name="target">new</field>
        </record>

    </data>
</odoo>
                                                                                        

python :

# -*- coding: utf-8 -*-
from odoo import models, fields, api, _


class EditDateExpenseSheetWizard(models.TransientModel):
    _name = 'edit.date.expense.sheet.wizard'

    validation_date = fields.Date(string="New validation date")

    @api.multi
    def validate_modifications(self):
        self.ensure_one()
        print "validate_modifications"

        return {'type': 'ir.actions.act_window.close'}

                                                                                        



Tanks a lot.

0
Portretas
Atmesti
Portretas
Sushma
Best Answer

Hi Karim,

I didn't get much your query, but if in case you want to show any default date value to wizard validation_date field you can use default.

Although please go through below points regarding wizards:

1. Wizards describe interactive sessions with the user (or dialog boxes) through dynamic forms. A wizard is simply a model that extends the class TransientModel instead of Model. The class TransientModel extends Model and reuse all its existing mechanisms, with the following particularities:

2. Wizard records are not meant to be persistent; they are automatically deleted from the database after a certain time. This is why they are called transient.

3. Wizard models do not require explicit access rights: users have all permissions on wizard records.

4. Wizard records may refer to regular records or wizard records through many2one fields, but regular records cannot refer to wizard records through a many2one field.

1
Portretas
Atmesti
Portretas
subbarao
Best Answer

yes you have to use write() of active model

0
Portretas
Atmesti
Portretas
karim bryant
Autorius Best Answer

Tanks for your reply. It's not i want but it's cool. I understand default value in field.

I wanted is to save values in my database. It's fixed just with write.


0
Portretas
Atmesti
Enjoying the discussion? Don't just read, join in!

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

Registracija
Related Posts Replies Rodiniai Veikla
Update Wizard without closing it after button click
wizard odoo10
Portretas
0
spal. 23
2464
Is it possible to create a new record with wizard? Solved
wizard odoo10
Portretas
Portretas
Portretas
3
birž. 18
7667
How to get the name of file attached to a binary field before saving.? Solved
wizard ir_attachment odoo10
Portretas
Portretas
2
gruod. 21
27291
How to get wizard selection value in button function Solved
wizard odoo odoo10
Portretas
Portretas
1
gruod. 19
4281
Is it possible to make a wizard that when called by action you can pass a records ID and it gets the data from related models like an init method?
action wizard odoo10
Portretas
0
spal. 19
3567
Bendrija
  • Mokomosios medžiagos
  • Dokumentacija
  • Forumas
Atvirasis kodas
  • Atsisiųsti
  • Github
  • Runbot
  • Vertimai
Paslaugos
  • Odoo.sh talpinimas
  • Palaikymas
  • Atnaujinti
  • Pritaikytas programavimo kūrimas
  • Švietimas
  • Susirask buhalterį
  • Susiraskite partnerį
  • Tapkite partneriu
Apie mus
  • Mūsų įmonė
  • Prekės ženklo turtas
  • Susisiekite su mumis
  • Darbo pasiūlymai
  • Renginiai
  • Tinklalaidės
  • Internetinis Tinklaraštis
  • Klientai
  • Teisinis • Privatumas
  • Saugumas
الْعَرَبيّة 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 yra atvirojo kodo verslo programų rinkinys, kuris apima visas įmonės poreikius: CRM, El. Prekybą, Apskaitą, Atsargų, Kasų sistemą, Projektų valdymą ir kt.

Unikali Odoo vertės pasiūla – būti tuo pačiu metu labai lengvai naudojama ir visiškai integruota sistema.

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