[MV] nfu_data_nature_importer -> data_nature_importer

This commit is contained in:
Niels Göttsch 2026-01-13 16:47:51 +01:00 committed by madmooose
parent 4fab409fa5
commit 461fc34f1b
25 changed files with 16 additions and 17 deletions

View file

@ -17,7 +17,7 @@ DATA Nature Importer
:target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html :target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html
:alt: License: LGPL-3 :alt: License: LGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-bakeupboys%2Fnfu-lightgray.png?logo=github .. |badge3| image:: https://img.shields.io/badge/github-bakeupboys%2Fnfu-lightgray.png?logo=github
:target: https://github.com/bakeupboys/nfu/tree/16.0/nfu_data_nature_importer :target: https://github.com/bakeupboys/nfu/tree/16.0/data_nature_importer
:alt: bakeupboys/nfu :alt: bakeupboys/nfu
|badge1| |badge2| |badge3| |badge1| |badge2| |badge3|
@ -46,7 +46,7 @@ Bug Tracker
Bugs are tracked on `GitHub Issues <https://github.com/bakeupboys/nfu/issues>`_. Bugs are tracked on `GitHub Issues <https://github.com/bakeupboys/nfu/issues>`_.
In case of trouble, please check there if your issue has already been reported. In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed If you spotted it first, help us to smash it by providing a detailed and welcomed
`feedback <https://github.com/bakeupboys/nfu/issues/new?body=module:%20nfu_data_nature_importer%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_. `feedback <https://github.com/bakeupboys/nfu/issues/new?body=module:%20data_nature_importer%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
Do not contact contributors directly about support or help with technical issues. Do not contact contributors directly about support or help with technical issues.
@ -66,6 +66,6 @@ Contributors
Maintainers Maintainers
~~~~~~~~~~~ ~~~~~~~~~~~
This module is part of the `bakeupboys/nfu <https://github.com/bakeupboys/nfu/tree/16.0/nfu_data_nature_importer>`_ project on GitHub. This module is part of the `bakeupboys/nfu <https://github.com/bakeupboys/nfu/tree/16.0/data_nature_importer>`_ project on GitHub.
You are welcome to contribute. You are welcome to contribute.

View file

@ -0,0 +1 @@
from . import models

View file

@ -7,13 +7,14 @@ class ResConfigSettings(models.TransientModel):
data_nature_username = fields.Char(string="API Username") data_nature_username = fields.Char(string="API Username")
data_nature_key = fields.Char(string="API Key") data_nature_key = fields.Char(string="API Key")
# pylint: disable=W8110
def set_values(self): def set_values(self):
super().set_values() super().set_values()
self.env["ir.config_parameter"].sudo().set_param( self.env["ir.config_parameter"].sudo().set_param(
"nfu_data_nature_importer.data_nature_username", self.data_nature_username "data_nature_importer.data_nature_username", self.data_nature_username
) )
self.env["ir.config_parameter"].sudo().set_param( self.env["ir.config_parameter"].sudo().set_param(
"nfu_data_nature_importer.data_nature_key", self.data_nature_key "data_nature_importer.data_nature_key", self.data_nature_key
) )
@api.model @api.model
@ -22,9 +23,9 @@ class ResConfigSettings(models.TransientModel):
res.update( res.update(
data_nature_username=self.env["ir.config_parameter"] data_nature_username=self.env["ir.config_parameter"]
.sudo() .sudo()
.get_param("nfu_data_nature_importer.data_nature_username", default=""), .get_param("data_nature_importer.data_nature_username", default=""),
data_nature_key=self.env["ir.config_parameter"] data_nature_key=self.env["ir.config_parameter"]
.sudo() .sudo()
.get_param("nfu_data_nature_importer.data_nature_key", default=""), .get_param("data_nature_importer.data_nature_key", default=""),
) )
return res return res

View file

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

View file

@ -369,7 +369,7 @@ ul.auto-toc {
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:1b38428d6cd06a0605518e76e4c89cb55b01114d59a8a1ef38ebcc5129c57305 !! source digest: sha256:1b38428d6cd06a0605518e76e4c89cb55b01114d59a8a1ef38ebcc5129c57305
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/lgpl-3.0-standalone.html"><img alt="License: LGPL-3" src="https://img.shields.io/badge/licence-LGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/bakeupboys/nfu/tree/16.0/nfu_data_nature_importer"><img alt="bakeupboys/nfu" src="https://img.shields.io/badge/github-bakeupboys%2Fnfu-lightgray.png?logo=github" /></a></p> <p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/lgpl-3.0-standalone.html"><img alt="License: LGPL-3" src="https://img.shields.io/badge/licence-LGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/bakeupboys/nfu/tree/16.0/data_nature_importer"><img alt="bakeupboys/nfu" src="https://img.shields.io/badge/github-bakeupboys%2Fnfu-lightgray.png?logo=github" /></a></p>
<div class="section" id="enrich-products-with-attributes-from-data-nature"> <div class="section" id="enrich-products-with-attributes-from-data-nature">
<h1>Enrich Products with attributes from DATA Nature</h1> <h1>Enrich Products with attributes from DATA Nature</h1>
<p>This includes the following attributes: <p>This includes the following attributes:
@ -389,7 +389,7 @@ ul.auto-toc {
<p>Bugs are tracked on <a class="reference external" href="https://github.com/bakeupboys/nfu/issues">GitHub Issues</a>. <p>Bugs are tracked on <a class="reference external" href="https://github.com/bakeupboys/nfu/issues">GitHub Issues</a>.
In case of trouble, please check there if your issue has already been reported. In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed If you spotted it first, help us to smash it by providing a detailed and welcomed
<a class="reference external" href="https://github.com/bakeupboys/nfu/issues/new?body=module:%20nfu_data_nature_importer%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p> <a class="reference external" href="https://github.com/bakeupboys/nfu/issues/new?body=module:%20data_nature_importer%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<p>Do not contact contributors directly about support or help with technical issues.</p> <p>Do not contact contributors directly about support or help with technical issues.</p>
</div> </div>
<div class="section" id="credits"> <div class="section" id="credits">
@ -408,7 +408,7 @@ If you spotted it first, help us to smash it by providing a detailed and welcome
</div> </div>
<div class="section" id="maintainers"> <div class="section" id="maintainers">
<h2>Maintainers</h2> <h2>Maintainers</h2>
<p>This module is part of the <a class="reference external" href="https://github.com/bakeupboys/nfu/tree/16.0/nfu_data_nature_importer">bakeupboys/nfu</a> project on GitHub.</p> <p>This module is part of the <a class="reference external" href="https://github.com/bakeupboys/nfu/tree/16.0/data_nature_importer">bakeupboys/nfu</a> project on GitHub.</p>
<p>You are welcome to contribute.</p> <p>You are welcome to contribute.</p>
</div> </div>
</div> </div>

View file

@ -16,8 +16,8 @@ def get_datanature_bearer_token(self):
Obtain a bearer token from the DataNature API using the provided API key. Obtain a bearer token from the DataNature API using the provided API key.
""" """
ICP = self.env["ir.config_parameter"].sudo() ICP = self.env["ir.config_parameter"].sudo()
userid = ICP.get_param("nfu_data_nature_importer.data_nature_username") userid = ICP.get_param("data_nature_importer.data_nature_username")
password = ICP.get_param("nfu_data_nature_importer.data_nature_key") password = ICP.get_param("data_nature_importer.data_nature_key")
token = None token = None
if userid and password: if userid and password:
token_url = f"{SECURITY_BASE}/resources/security/accesstoken" token_url = f"{SECURITY_BASE}/resources/security/accesstoken"

View file

@ -6,7 +6,7 @@
<field name="arch" type="xml"> <field name="arch" type="xml">
<xpath expr="//div[@name='integration']" position="inside"> <xpath expr="//div[@name='integration']" position="inside">
<div class="col-12 col-lg-6 o_setting_box" id="datanature_integration"> <div class="col-12 col-lg-6 o_setting_box" id="datanature_integration">
<div class="o_setting_right_pane" id="nfu_data_nature_settings"> <div class="o_setting_right_pane" id="data_nature_settings">
<span class="o_form_label"> <span class="o_form_label">
DATA Nature Integration DATA Nature Integration
</span> </span>

View file

@ -1,3 +0,0 @@
from . import models
from . import wizard
from . import utils

View file

@ -0,0 +1 @@
../../../../data_nature_importer

View file

@ -1 +0,0 @@
../../../../nfu_data_nature_importer