Skip to content
Extraits de code Groupes Projets
Valider 93d258fb rédigé par Juliana's avatar Juliana
Parcourir les fichiers

Ajout configuration URL Mayam

parent 87d96fef
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -14,6 +14,7 @@
],
"data": [
'views/pos_transaction_views.xml',
'views/res_config_setting_views.xml',
'data/service_cron_send_mayam.xml',
],
'qweb': [
......
......@@ -2,3 +2,5 @@
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from . import pos_transaction
from . import res_config_settings
from . import res_company
\ No newline at end of file
Fichier supprimé
Fichier supprimé
......@@ -33,7 +33,7 @@ class PosTransaction(models.Model):
def send_to_mayam(self):
list_transaction = []
data_transaction = {}
url = "https://api.mayam.fr/transaction"
url = self.env.user.company_id.url_mayam
key_vracoop = "VracoopAPI@2020"
for transaction in self:
......
# Copyright 2021 Le Filament (<http://www.le-filament.com>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import api, fields, models, _
class ResCompany(models.Model):
_inherit = "res.company"
url_mayam = fields.Char("URL Mayam")
\ No newline at end of file
# Copyright 2020 Le Filament (<http://www.le-filament.com>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import api, fields, models
class ResConfigSettings(models.TransientModel):
_inherit = 'res.config.settings'
url_mayam = fields.Char("URL Mayam", related='company_id.url_mayam', readonly=False)
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="res_config_settings_view_form" model="ir.ui.view">
<field name="name">res.config.settings.view.form.inherit.vracoop</field>
<field name="model">res.config.settings</field>
<field name="priority" eval="100"/>
<field name="inherit_id" ref="base.res_config_settings_view_form" />
<field name="arch" type="xml">
<xpath expr="//div[@class='app_settings_block']" position="inside">
<h2>Balance</h2>
<div class="row mt16 o_settings_container">
<div class="col-12 col-lg-6 o_setting_box" title="This tax is applied to any new product created in the catalog.">
<div class="o_setting_right_pane">
<div>
<label string="URL Mayam" for="url_mayam"/>
<div class="text-muted">
URL Mayam pour l'envoi des transactions
</div>
<div class="content-group mt16">
<field name="url_mayam" colspan="4" nolabel="1" />
</div>
</div>
</div>
</div>
</div>
</xpath>
</field>
</record>
</odoo>
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter