-
-
Notifications
You must be signed in to change notification settings - Fork 602
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[MIG] pos_ticket_extra_company_info_l10n_fr: Migration to 16.0
- Loading branch information
1 parent
cb6d2c2
commit 0b19a48
Showing
14 changed files
with
114 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
from . import models |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 12 additions & 7 deletions
19
pos_ticket_extra_company_info_l10n_fr/i18n/pos_ticket_extra_company_info_l10n_fr.pot
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,28 @@ | ||
# Translation of Odoo Server. | ||
# This file contains the translation of the following modules: | ||
# * pos_ticket_extra_company_info_l10n_fr | ||
# * pos_ticket_extra_company_info_l10n_fr | ||
# | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: Odoo Server 12.0\n" | ||
"Project-Id-Version: Odoo Server 16.0\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"Last-Translator: <>\n" | ||
"POT-Creation-Date: 2024-01-18 14:20+0000\n" | ||
"PO-Revision-Date: 2024-01-18 14:20+0000\n" | ||
"Last-Translator: \n" | ||
"Language-Team: \n" | ||
"MIME-Version: 1.0\n" | ||
"Content-Type: text/plain; charset=UTF-8\n" | ||
"Content-Transfer-Encoding: \n" | ||
"Plural-Forms: \n" | ||
|
||
#. module: pos_ticket_extra_company_info_l10n_fr | ||
#. openerp-web | ||
#: code:addons/pos_ticket_extra_company_info_l10n_fr/static/src/xml/pos_ticket_extra_company_info_l10n_fr.xml:15 | ||
#: code:addons/pos_ticket_extra_company_info_l10n_fr/static/src/xml/pos_ticket_extra_company_info_l10n_fr.xml:26 | ||
#: model:ir.model,name:pos_ticket_extra_company_info_l10n_fr.model_pos_session | ||
msgid "Point of Sale Session" | ||
msgstr "" | ||
|
||
#. module: pos_ticket_extra_company_info_l10n_fr | ||
#. odoo-javascript | ||
#: code:addons/pos_ticket_extra_company_info_l10n_fr/static/src/xml/OrderReceipt.xml:0 | ||
#, python-format | ||
msgid "SIRET:" | ||
msgstr "" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
from . import pos_session |
14 changes: 14 additions & 0 deletions
14
pos_ticket_extra_company_info_l10n_fr/models/pos_session.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Copyright (C) 2024 - Today: GRAP (http://www.grap.coop) | ||
# @author: Sylvain LE GAL (https://twitter.com/legalsylvain) | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). | ||
|
||
from odoo import models | ||
|
||
|
||
class PosSession(models.Model): | ||
_inherit = "pos.session" | ||
|
||
def _loader_params_res_company(self): | ||
result = super()._loader_params_res_company() | ||
result["search_params"]["fields"].extend(["siret"]) | ||
return result | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
This module extends the functionality of Point of Sale module. | ||
|
||
It add company SIRET field on PoS ticket. | ||
|
||
.. figure:: ../static/description/pos_ticket.png |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file added
BIN
+34.6 KB
pos_ticket_extra_company_info_l10n_fr/static/description/pos_ticket.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file was deleted.
Oops, something went wrong.
22 changes: 22 additions & 0 deletions
22
pos_ticket_extra_company_info_l10n_fr/static/src/js/models.esm.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
/* | ||
Copyright (C) 2024 - Today: GRAP (http://www.grap.coop) | ||
@author: Sylvain LE GAL (https://twitter.com/legalsylvain) | ||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). | ||
*/ | ||
|
||
odoo.define("pos_discount_all.models", function (require) { | ||
const {Order} = require("point_of_sale.models"); | ||
const Registries = require("point_of_sale.Registries"); | ||
|
||
const OrderTicketExtraInfo = (OriginalOrder) => | ||
class extends OriginalOrder { | ||
export_for_printing() { | ||
var receipt = super.export_for_printing(...arguments); | ||
const company = this.pos.company; | ||
receipt.company.siret = company.siret; | ||
return receipt; | ||
} | ||
}; | ||
|
||
Registries.Model.extend(Order, OrderTicketExtraInfo); | ||
}); |
17 changes: 17 additions & 0 deletions
17
pos_ticket_extra_company_info_l10n_fr/static/src/xml/OrderReceipt.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<!-- | ||
Copyright (C) 2024 - Today: GRAP (http://www.grap.coop) | ||
@author: Sylvain LE GAL (https://twitter.com/legalsylvain) | ||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). | ||
--> | ||
<templates id="template" xml:space="preserve"> | ||
|
||
<t t-inherit="point_of_sale.OrderReceipt" t-inherit-mode="extension" owl="1"> | ||
<xpath expr="//t[@t-if='receipt.company.vat']" position="after"> | ||
<div t-if="receipt.company.siret"> | ||
SIRET:<t t-esc="receipt.company.siret" /> | ||
</div> | ||
</xpath> | ||
</t> | ||
|
||
</templates> |
29 changes: 0 additions & 29 deletions
29
...icket_extra_company_info_l10n_fr/static/src/xml/pos_ticket_extra_company_info_l10n_fr.xml
This file was deleted.
Oops, something went wrong.