first commit

This commit is contained in:
root
2026-03-14 09:42:12 +00:00
commit 0adbd20c2c
10991 changed files with 1646955 additions and 0 deletions

View File

@@ -0,0 +1,2 @@
# This file is part of Tryton. The COPYRIGHT file at the top level of
# this repository contains the full copyright notices and license terms.

View File

@@ -0,0 +1,7 @@
#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "field:web.shop,stripe_journal:"
msgid "Stripe Journal"
msgstr ""

View File

@@ -0,0 +1,7 @@
#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "field:web.shop,stripe_journal:"
msgid "Stripe Journal"
msgstr "Diari Stripe"

View File

@@ -0,0 +1,7 @@
#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "field:web.shop,stripe_journal:"
msgid "Stripe Journal"
msgstr ""

View File

@@ -0,0 +1,7 @@
#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "field:web.shop,stripe_journal:"
msgid "Stripe Journal"
msgstr "Stripe Journal"

View File

@@ -0,0 +1,7 @@
#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "field:web.shop,stripe_journal:"
msgid "Stripe Journal"
msgstr "Diario Stripe"

View File

@@ -0,0 +1,7 @@
#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "field:web.shop,stripe_journal:"
msgid "Stripe Journal"
msgstr ""

View File

@@ -0,0 +1,7 @@
#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "field:web.shop,stripe_journal:"
msgid "Stripe Journal"
msgstr ""

View File

@@ -0,0 +1,7 @@
#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "field:web.shop,stripe_journal:"
msgid "Stripe Journal"
msgstr ""

View File

@@ -0,0 +1,7 @@
#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "field:web.shop,stripe_journal:"
msgid "Stripe Journal"
msgstr ""

View File

@@ -0,0 +1,7 @@
#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "field:web.shop,stripe_journal:"
msgid "Stripe Journal"
msgstr "Journal Stripe"

View File

@@ -0,0 +1,7 @@
#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "field:web.shop,stripe_journal:"
msgid "Stripe Journal"
msgstr ""

View File

@@ -0,0 +1,7 @@
#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "field:web.shop,stripe_journal:"
msgid "Stripe Journal"
msgstr ""

View File

@@ -0,0 +1,7 @@
#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "field:web.shop,stripe_journal:"
msgid "Stripe Journal"
msgstr "Libro giornale di Stripe"

View File

@@ -0,0 +1,7 @@
#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "field:web.shop,stripe_journal:"
msgid "Stripe Journal"
msgstr ""

View File

@@ -0,0 +1,7 @@
#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "field:web.shop,stripe_journal:"
msgid "Stripe Journal"
msgstr ""

View File

@@ -0,0 +1,7 @@
#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "field:web.shop,stripe_journal:"
msgid "Stripe Journal"
msgstr "Stripe journaal"

View File

@@ -0,0 +1,7 @@
#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "field:web.shop,stripe_journal:"
msgid "Stripe Journal"
msgstr ""

View File

@@ -0,0 +1,8 @@
#
#, fuzzy
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "field:web.shop,stripe_journal:"
msgid "Stripe Journal"
msgstr "Diário Stripe"

View File

@@ -0,0 +1,7 @@
#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "field:web.shop,stripe_journal:"
msgid "Stripe Journal"
msgstr "Jurnal Stripe"

View File

@@ -0,0 +1,7 @@
#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "field:web.shop,stripe_journal:"
msgid "Stripe Journal"
msgstr ""

View File

@@ -0,0 +1,7 @@
#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "field:web.shop,stripe_journal:"
msgid "Stripe Journal"
msgstr ""

View File

@@ -0,0 +1,7 @@
#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "field:web.shop,stripe_journal:"
msgid "Stripe Journal"
msgstr ""

View File

@@ -0,0 +1,7 @@
#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "field:web.shop,stripe_journal:"
msgid "Stripe Journal"
msgstr ""

View File

@@ -0,0 +1,7 @@
#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "field:web.shop,stripe_journal:"
msgid "Stripe Journal"
msgstr ""

View File

@@ -0,0 +1,2 @@
# This file is part of Tryton. The COPYRIGHT file at the top level of
# this repository contains the full copyright notices and license terms.

View File

@@ -0,0 +1,12 @@
# This file is part of Tryton. The COPYRIGHT file at the top level of
# this repository contains the full copyright notices and license terms.
from trytond.tests.test_tryton import ModuleTestCase
class WebShopVueStorefrontStripeTestCase(ModuleTestCase):
'Test Web Shop Vue Storefront Stripe module'
module = 'web_shop_vue_storefront_stripe'
del ModuleTestCase

View File

@@ -0,0 +1,14 @@
[tryton]
version=7.8.0
depends:
account_payment_stripe
ir
sale_payment
web_shop
web_shop_vue_storefront
xml:
web.xml
[register]
model:
web.Shop

View File

@@ -0,0 +1,9 @@
<?xml version="1.0"?>
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
this repository contains the full copyright notices and license terms. -->
<data>
<xpath expr="//notebook/page[@id='vsf']" position="inside">
<label name="stripe_journal"/>
<field name="stripe_journal" widget="selection"/>
</xpath>
</data>

View File

@@ -0,0 +1,45 @@
# This file is part of Tryton. The COPYRIGHT file at the top level of
# this repository contains the full copyright notices and license terms.
from trytond.model import fields
from trytond.pool import Pool, PoolMeta
from trytond.pyson import Eval
class Shop(metaclass=PoolMeta):
__name__ = 'web.shop'
stripe_journal = fields.Many2One(
'account.payment.journal', "Stripe Journal",
domain=[
('stripe_account', '!=', None),
('currency', '=', Eval('currency', -1)),
],
depends=['currency'])
def vsf_order_create(self, data, sale, user):
pool = Pool()
Payment = pool.get('account.payment')
PaymentGroup = pool.get('account.payment.group')
sale = super().vsf_order_create(data, sale, user)
payment_method = data['addressInformation']['payment_method_code']
if payment_method == 'stripe':
payment_method_additional = (
data['addressInformation']['payment_method_additional'])
payment = Payment()
payment.company = sale.company
payment.kind = 'receivable'
payment.party = sale.party
payment.origin = sale
payment.amount = sale.total_amount
payment.journal = self.stripe_journal
payment.stripe_token = payment_method_additional['id']
payment.stripe_chargeable = True
payment.save()
Payment.approve([payment])
group = PaymentGroup(
company=payment.company,
journal=payment.journal,
kind=payment.kind)
group.save()
Payment.process([payment], lambda: group)
return sale

View File

@@ -0,0 +1,12 @@
<?xml version="1.0"?>
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
this repository contains the full copyright notices and license terms. -->
<tryton>
<data>
<record model="ir.ui.view" id="shop_view_form">
<field name="model">web.shop</field>
<field name="inherit" ref="web_shop.shop_view_form"/>
<field name="name">shop_form</field>
</record>
</data>
</tryton>