Siirry sisältöön
Odoo Menu
  • Kirjaudu sisään
  • Kokeile ilmaiseksi
  • Sovellukset
    Talous
    • Kirjanpito
    • Laskutus
    • Kulut
    • Datataulukot (BI)
    • Asiakirjat
    • Allekirjoita
    Myynti
    • CRM
    • Myynti
    • Kassajärjestelmä myymälään
    • Kassajärjestelmä ravintolaan
    • Tilaukset
    • Vuokraus
    Verkkosivut
    • Verkkosivun Rakennustyökalu
    • Verkkokauppa
    • Blogi
    • Foorumi
    • Livechat
    • Verkko-oppiminen
    Toimitusketju
    • Varastointi
    • Tuotanto
    • Tuotteen elinkaaren hallinta (PLM)
    • Ostot
    • Huolto
    • Laatu
    Henkilöstöhallinto
    • Työntekijät
    • Rekrytointi
    • Vapaat
    • Arvioinnit
    • Suositukset
    • Kuljetuskalusto
    Markkinointi
    • Somemarkkinointi
    • Sähköpostimarkkinointi
    • Tekstiviestimarkkinointi
    • Tapahtumat
    • Markkinoinnin automaatio
    • Kyselyt
    Palvelut
    • Projekti
    • Työaikakirjaukset
    • Kenttähuolto
    • Asiakaspalvelu
    • Suunnittelu
    • Ajanvaraukset
    Tuottavuus
    • Viestintä
    • Hyväksynnät
    • IoT
    • IP-puhe
    • Tietokirjasto
    • WhatsApp
    Kolmannen osapuolen sovellukset Odoo-Studio Odoo-Pilvialusta
  • Toimialat
    Vähittäiskauppa
    • Kirjakauppa
    • Vaatekauppa
    • Huonekaluliike
    • Ruokakauppa
    • Laitteistokauppa
    • Lelukauppa
    Ruoka & Majoitus
    • Baari ja Pubi
    • Ravintola
    • Pikaruoka
    • Majatalo
    • Juomien jakelija
    • Hotelli
    Kiinteistöt
    • Kiinteistönvälitystoimisto
    • Arkkitehtitoimisto
    • Rakentaminen
    • Kiinteistönhallinta
    • Puutarhanhoito
    • Kiinteistön omistajien yhdistys
    Konsultointi
    • Tilitoimisto
    • Odoo-kumppani
    • Markkinointitoimisto
    • Lakitoimisto
    • Osaajahankinta
    • Tilintarkastus & sertifiointi
    Tuotanto
    • Tekstiili
    • Metalli
    • Huonekalut
    • Ruoka
    • Panimo
    • Yrityslahjat
    Terveys & Liikunta
    • Urheiluseura
    • Silmälasiliike
    • Kuntokeskus
    • Hyvinvointialan ammattilaiset
    • Apteekki
    • Kampaamo
    Kaupat
    • Yleismies
    • IT-laitteisto & Tuki
    • Aurinkoenergiajärjestelmät
    • Suutari
    • Siivouspalvelut
    • LVI-palvelut
    Muut
    • Voittoa tavoittelematon järjestö
    • Ympäristötoimisto
    • Mainostaulujen vuokraus  
    • Valokuvaus
    • Leasing-pyörät
    • Ohjelmistojen jälleenmyyjä
    Selaa kaikkia toimialoja
  • Yhteisö
    Opi
    • Kurssit
    • Dokumentaatio
    • Todistukset
    • Koulutus
    • Blogi
    • Podcast
    Kannusta kouluttautumaan
    • Koulutusohjelmat
    • Scale Up! Liiketoimintapeli
    • Vieraile Odoolla
    Hanki ohjelmisto
    • Lataa
    • Vertaile versioita
    • Julkaisut
    Tee yhteistyötä
    • Github
    • Foorumi
    • Tapahtumat
    • Käännökset
    • Ryhdy kumppaniksi
    • Kumppanipalvelut
    • Rekisteröi tilitoimistosi
    Hanki palveluja
    • Löydä kumppani
    • Löydä kirjanpitäjä
    • Varaa asiantuntijatapaaminen
    • Implementaatiopalvelut
    • Asiakasreferenssit
    • Tuki
    • Versionkorotukset
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Varaa demo
  • Hinnoittelu
  • Asiakaspalvelu

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

  • CRM
  • e-Commerce
  • Kirjanpito
  • Varastointi
  • PoS
  • Projekti
  • MRP
All apps
Sinun on rekisteröidyttävä, jotta voit olla vuorovaikutuksessa yhteisön kanssa.
Kaikki kirjoitukset Ihmiset Merkit
Tunnisteet (Näytä kaikki)
odoo accounting v14 pos v15
Tietoa tästä foorumista
Sinun on rekisteröidyttävä, jotta voit olla vuorovaikutuksessa yhteisön kanssa.
Kaikki kirjoitukset Ihmiset Merkit
Tunnisteet (Näytä kaikki)
odoo accounting v14 pos v15
Tietoa tästä foorumista
Apua

Problem with custom module.

Tilaa

Saat ilmoituksen, kun tähän viestiin ilmaantuu aktiviteettia

Tämä kysymys on merkitty
installationmodulev7
2 Vastaukset
11324 Näkymät
Avatar
Bonnet Denis

This is a problem I met for the second time.

I've made a custom module with all company parameter. this morning I wanted to work on Accounting functionality on a testing database. I duplicate the product database and my param module.

So now I have 2 databases and 2 Modules. One for production and one for testing.

I uninstall the param module from testing database and it's ok. I try to install the testing module and the system broke. I can't go to the login page and I have a message like : "the column 'test' don't exist in res_partner database". But I have a script that add this column.

Testing module is exactly the same than param module.

I don't understand why the same module don't work if I uninstall and reinstall a copy of it.

someone can explain me what I'm doing wrong?

Thanks for reading.

edit: My module code My xml file (I have comment the reference to the new field) <openerp> <data>

        <record model="ir.ui.view" id="partner_view_form_juliana">
            <field name="name">partner.view.form.juliana</field>
            <field name="model">res.partner</field>
            <field name="type">form</field>
            <field name="inherit_id" ref="base.view_partner_form"/>
            <field name="priority">52</field>
            <field name="arch" type="xml">
                <!--<xpath expr="//field[@name='nace_id']" position="before">
                    <field name="nom_commercial" attrs="{'invisible': [('is_company','!=',True)]}"/>
                </xpath>-->
                <xpath expr="//field[@name='siren']" position="after">
                    <field name="societe_com" widget="url" attrs="{'invisible': [('is_company','!=',True)]}"/>
                </xpath>
                <xpath expr="//field[@name='child_ids']/form/div/group/field[@name='mobile']" position="after">
                    <field name="user_id" />
                </xpath>
            </field>
        </record>
        <!--
        <record id="view_res_partner_filter_juliana" model="ir.ui.view">
            <field name="name">res.partner.select.juliana</field>
            <field name="model">res.partner</field>
            <field name="inherit_id" ref="base.view_res_partner_filter"/>
            <field name="arch" type="xml">
                <xpath expr="//field[@name='user_id']" position="after">
                    <field name="nom_commercial"/>
                </xpath>
            </field>
        </record> -->

    </data>
</openerp>

res_partner.py:

# -*- coding: utf-8 -*-
from openerp.osv import osv, fields
import logging

_logger = logging.getLogger("PARAM-JULIANA")
#
#Ajout du lien vers société.com
#

class res_partner(osv.osv):
    _name = 'res.partner'
    _inherit = 'res.partner'

    def _get_societe_com_link(self, cr, uid, ids, name, args, context=None):
        result = dict.fromkeys(ids, False)
        res = {}
        text=""
        for obj in self.browse(cr, uid, ids, context=context):
            res[obj.id]=text
            if obj.siren  :
                text = "http://www.societe.com/cgi-bin/recherche?rncs=" + obj.siren
                res[obj.id]=text
        return res

    _columns = {
        'societe_com': fields.function(_get_societe_com_link, type='char', size=64, string='societe.com'),
        'nom_commercial': fields.char('Nom Commercial', size=128, select=True)
    }
0
Avatar
Hylkää
mike

I ran into a similar problem when adding fields to mail.notification model. I couldn't figure it out so I used SQL to add the new fields to the table and that got it working. I'm guessing there is something in configuration data for base modules that prevents them being updated like with a custom module when you restart OpenERP. I can't find the culprit...

Bonnet Denis
Tekijä

Did you have post a bug on launchpad?

mike

I honestly don't know if it is a bug or a feature I don't understand. I would look into the docs but usually cannot find anything helpful there...

patrick
  1. How do you duplicate the database? Using the webinterface of OE, or using command line?... 2. Why duplicate the module? Unless you change something, there is no need to do that. 3. If you want to change code, you better use a seperate system to do the testing, until it is working correctly.
Bonnet Denis
Tekijä

I duplicate In the OS with GUI because I need to do some changes this month and I want to do my work on testing database on testing module, to not perturb the production platform. If you know another way to do the job you're welcome.

Ghanshyam Prajapati

Hi denis, please paste your code and xml over here.

Bonnet Denis
Tekijä

ok I'll edit my question.

Avatar
Simplify it!
Paras vastaus

Hello. Sometimes I face this problem when I'm trying to add a new field.

Here's what I do:

  1. First I remove the field from the view.

  2. I install the module

  3. I add the field again on the view

  4. I upgrade the module.

I don't know why this happens but to me this works.

1
Avatar
Hylkää
Bonnet Denis
Tekijä

thanks for your answer. But how can I install or uninstall the module if I can't go through the interface?

Simplify it!

You can't go through the interface because it's trying to read the view. Remove the conflictive field from the view. If that doesn't work restart your openerp server and that should work. Please tell me if it worked for you.

Bonnet Denis
Tekijä

I'n having this error: ProgrammingError: ERREUR: la colonne res_partner.nom_commercial n'existe pas LIGNE 1 : SELECT res_partner."ean13",res_partner."nom_commercial",res_... I think I have to restart the module but I didn't have the rigth to do that with a command line.

Simplify it!

Hmmm. Another way is deleting the xml line from your __openerp__.py you can delete your view and restart your server or your pc if you don't have the permissions to restart your server... Then you are not going to see that error anymore. You can install the module as always. And then you can add again that file to the __openerp__.py

Avatar
mike
Paras vastaus

Try this:

class x_res_partner(osv.osv):
    _name = 'res.partner'
    _inherit = 'res.partner'

    """your code here"""

x_res_partner()

I think the problem is with your inheritance. Give your class a different name from the class you inherit and then instantiate it.

0
Avatar
Hylkää
Nautitko keskustelusta? Älä vain lue, vaan osallistu!

Luo tili jo tänään nauttiaksesi yksinoikeusominaisuuksista ja osallistuaksesi mahtavaan yhteisöömme!

Rekisteröidy
Aiheeseen liittyviä artikkeleita Vastaukset Näkymät Toimenpide
Aeroo as an installable module out of the box?
installation module v7 aeroo
Avatar
Avatar
1
maalisk. 15
5127
How to automate providing access to new modules to users
installation module user v7
Avatar
0
maalisk. 15
3829
how can I resolve dependency for Module called unidecode? Ratkaistu
installation module
Avatar
Avatar
Avatar
Avatar
Avatar
6
syysk. 24
53718
How to run a python function right after installing a module?
installation module
Avatar
2
kesäk. 20
21144
How to disable Google Analytics?
installation v7
Avatar
Avatar
Avatar
Avatar
3
huhtik. 16
10391
Yhteisö
  • Kurssit
  • Dokumentaatio
  • Foorumi
Avoin lähdekoodi
  • Lataa
  • Github
  • Runbot
  • Käännökset
Palvelut
  • Odoo.sh hosting
  • Tuki
  • Versionkorotus
  • Räätälöidyt kehitykset
  • Koulutus
  • Löydä kirjanpitäjä
  • Löydä kumppani
  • Ryhdy kumppaniksi
Meistä
  • Yrityksemme
  • Tavaramerkki
  • Ota yhteyttä
  • Työpaikat
  • Tapahtumat
  • Podcast
  • Blogi
  • Asiakkaat
  • Oikeudellinen ilmoitus • Yksityisyys
  • Tietoturva
الْعَرَبيّة 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 on kokoelma avoimen lähdekoodin yrityssovelluksia, jotka kattavat kaikki yrityksesi tarpeet: asiakkuudenhallinta eli CRM, verkkokauppa, kirjanpito, varastointi, kassajärjestelmä, projektinhallinta, jne.

Odoon uniikki arvolupaus on olla samanaikaisesti erittäin helppokäyttöinen ja täysin integroitu.

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