Odooers论坛

欢迎!

该社区面向专业人士和我们产品和服务的爱好者。
分享和讨论最好的内容和新的营销理念,建立您的专业形象,一起成为更好的营销人员。


0

How to import .xml data modules into odoo online. (in Apps View)

形象
丢弃
2 答案
0
形象
odoo
最佳答案

To make changes or upload modules in the Odoo Online version, follow these steps:

  1. Create Your Own Module: You need to create a custom module according to Odoo specifications. You can use the odoo-bin scaffold command, or ask any language model (such as ChatGPT, Bing, Gemini, or DeepSeek) for guidance on creating modules.
  2. Module Structure: Your custom module should minimally include:
    • A __manifest__.py file: This file defines your module's metadata, dependencies, and references to your modified XML files.
    • A /views/ folder: This folder contains your XML files.
  3. Modifying XML Files: Editing XML files in Odoo is not as simple as direct modification. You need to use XPath to locate the correct elements and make your changes.

1 备注
形象
丢弃
形象
odoo
-

Thx. My problem before was, i have not tried it whith with __manifest__.py, because it is a python file. I used the data folder, not the views folder, because in the original module, it was also in this folder.

0
形象
odoo
最佳答案

it says "only import ... xml and static assets".

Now i have found a way with ignoring this!


Even if "__manifest__.py" is a python file, this manifest file is needed also for data only models !

So i created a folder called like the original model: "l10n_de" (other names resulted in errors)

In this i have putten "__manifest__.py"

And i created an folder "data", in which i have putten my "account_account_tags_data.xml" file.

I zipped the folder "l10n_de" and uploaded it.


Contend of my "__manifest__.py":

{

'name': 'Germany - Accounting - My Tax Report',

'countries': ['de'],

'author': '',

'version': '2.1',

'category': 'Accounting/Localizations/Account Charts',

'description': "Update of VAT Tax-Report for reduced taxes in 2020",

'depends': [

  'base_iban',

  'base_vat',

  'l10n_din5008',

  'account',

],

'auto_install': ['account'],

'data': [

  'data/account_account_tags_data.xml'

],

'post_init_hook': '_post_init_hook',

'license': 'LGPL-3',

}


After importing this ZIP file, it works! My changed settings are gone, because the settings from the uploded package come into effect!

形象
丢弃