19.0 vanilla

This commit is contained in:
Ernad Husremovic 2026-03-09 09:31:16 +01:00
parent 89c6e82fe7
commit 1b82c20a58
572 changed files with 43570 additions and 53303 deletions

View file

@ -10,36 +10,15 @@ pip install odoo-bringout-oca-ocb-l10n_co_pos
## Dependencies
This addon depends on:
- l10n_co
- point_of_sale
## Manifest Information
- **Name**: Colombian - Point of Sale
- **Version**: 1.0
- **Category**: Accounting/Localizations/Point of Sale
- **License**: LGPL-3
- **Installable**: False
## Source
Based on [OCA/OCB](https://github.com/OCA/OCB) branch 16.0, addon `l10n_co_pos`.
- Repository: https://github.com/OCA/OCB
- Branch: 19.0
- Path: addons/l10n_co_pos
## License
This package maintains the original LGPL-3 license from the upstream Odoo project.
## Documentation
- Overview: doc/OVERVIEW.md
- Architecture: doc/ARCHITECTURE.md
- Models: doc/MODELS.md
- Controllers: doc/CONTROLLERS.md
- Wizards: doc/WIZARDS.md
- Install: doc/INSTALL.md
- Usage: doc/USAGE.md
- Configuration: doc/CONFIGURATION.md
- Dependencies: doc/DEPENDENCIES.md
- Troubleshooting: doc/TROUBLESHOOTING.md
- FAQ: doc/FAQ.md
This package preserves the original LGPL-3 license.

View file

@ -3,7 +3,6 @@
{
'name': 'Colombian - Point of Sale',
'icon': '/l10n_co/static/description/icon.png',
'version': '1.0',
'description': """Colombian - Point of Sale""",
'category': 'Accounting/Localizations/Point of Sale',
@ -12,14 +11,11 @@
'l10n_co',
'point_of_sale'
],
'data': [
'views/res_config_settings_views.xml'
],
'assets': {
'point_of_sale.assets': [
'l10n_co_pos/static/src/js/**/*',
'l10n_co_pos/static/src/xml/**/*',
'point_of_sale._assets_pos': [
'l10n_co_pos/static/src/**/*',
],
},
'author': 'Odoo S.A.',
'license': 'LGPL-3',
}

View file

@ -0,0 +1,35 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * l10n_co_pos
#
# Weblate <noreply-mt-weblate@weblate.org>, 2025.
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 19.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-12-30 19:05+0000\n"
"PO-Revision-Date: 2025-11-17 03:10+0000\n"
"Last-Translator: Weblate <noreply-mt-weblate@weblate.org>\n"
"Language-Team: Spanish (Latin America) <https://translate.odoo.com/projects/"
"odoo-19-l10n/l10n_co_pos/es_419/>\n"
"Language: es_419\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 5.12.2\n"
#. module: l10n_co_pos
#: model:ir.model.fields,field_description:l10n_co_pos.field_pos_order__display_name
msgid "Display Name"
msgstr "Nombre para mostrar"
#. module: l10n_co_pos
#: model:ir.model.fields,field_description:l10n_co_pos.field_pos_order__id
msgid "ID"
msgstr "ID"
#. module: l10n_co_pos
#: model:ir.model,name:l10n_co_pos.model_pos_order
msgid "Point of Sale Orders"
msgstr "Órdenes del Punto de venta"

View file

@ -0,0 +1,31 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * l10n_co_pos
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 19.0+e\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-12-30 19:05+0000\n"
"PO-Revision-Date: 2025-12-30 19:05+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: l10n_co_pos
#: model:ir.model.fields,field_description:l10n_co_pos.field_pos_order__display_name
msgid "Display Name"
msgstr ""
#. module: l10n_co_pos
#: model:ir.model.fields,field_description:l10n_co_pos.field_pos_order__id
msgid "ID"
msgstr ""
#. module: l10n_co_pos
#: model:ir.model,name:l10n_co_pos.model_pos_order
msgid "Point of Sale Orders"
msgstr ""

View file

@ -0,0 +1,13 @@
import { PosOrder } from "@point_of_sale/app/models/pos_order";
import { patch } from "@web/core/utils/patch";
patch(PosOrder.prototype, {
is_colombian_country() {
return this.company.country_id?.code === "CO";
},
waitForPushOrder() {
var result = super.waitForPushOrder(...arguments);
result = Boolean(result || this.is_colombian_country());
return result;
},
});

View file

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<templates id="template" xml:space="preserve">
<t t-name="l10n_co_pos.OrderReceipt" t-inherit="point_of_sale.OrderReceipt" t-inherit-mode="extension">
<xpath expr="//div[hasclass('before-footer')]" position="inside">
<t t-if="order.name !== false">
<div style="word-wrap:break-word;" class="pt-3"><t t-out="order.name"/></div>
</t>
</xpath>
</t>
</templates>

View file

@ -0,0 +1,8 @@
import { PosStore } from "@point_of_sale/app/services/pos_store";
import { patch } from "@web/core/utils/patch";
patch(PosStore.prototype, {
is_colombian_country() {
return this.company.country_id?.code === "CO";
},
});

View file

@ -1,31 +0,0 @@
odoo.define('l10n_co_pos.PaymentScreen', function(require) {
'use strict';
const PaymentScreen = require('point_of_sale.PaymentScreen');
const Registries = require('point_of_sale.Registries');
const session = require('web.session');
const L10nCoPosPaymentScreen = PaymentScreen =>
class extends PaymentScreen {
async _postPushOrderResolve(order, order_server_ids) {
try {
if (this.env.pos.is_colombian_country()) {
const result = await this.rpc({
model: 'pos.order',
method: 'search_read',
domain: [['id', 'in', order_server_ids]],
fields: ['name'],
context: session.user_context,
});
order.set_l10n_co_dian(result[0].name || false);
}
} finally {
return super._postPushOrderResolve(...arguments);
}
}
};
Registries.Component.extend(PaymentScreen, L10nCoPosPaymentScreen);
return PaymentScreen;
});

View file

@ -1,34 +0,0 @@
odoo.define('l10n_co_pos.pos', function (require) {
"use strict";
var { PosGlobalState, Order } = require('point_of_sale.models');
const Registries = require('point_of_sale.Registries');
const L10nCoPosGlobalState = (PosGlobalState) => class L10nCoPosGlobalState extends PosGlobalState {
is_colombian_country() {
return this.company.country.code === 'CO';
}
}
Registries.Model.extend(PosGlobalState, L10nCoPosGlobalState);
const L10nCoPosOrder = (Order) => class L10nCoPosOrder extends Order {
export_for_printing() {
var result = super.export_for_printing(...arguments);
result.l10n_co_dian = this.get_l10n_co_dian();
return result;
}
set_l10n_co_dian(l10n_co_dian) {
this.l10n_co_dian = l10n_co_dian;
}
get_l10n_co_dian() {
return this.l10n_co_dian;
}
wait_for_push_order() {
var result = super.wait_for_push_order(...arguments);
result = Boolean(result || this.pos.is_colombian_country());
return result;
}
}
Registries.Model.extend(Order, L10nCoPosOrder);
});

View file

@ -1,11 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<templates id="template" xml:space="preserve">
<t t-name="OrderReceipt" t-inherit="point_of_sale.OrderReceipt" t-inherit-mode="extension" owl="1">
<xpath expr="//div[hasclass('pos-receipt-order-data')]" position="inside">
<t t-if="receipt.l10n_co_dian !== false">
<div style="word-wrap:break-word;"><t t-esc="receipt.l10n_co_dian"/></div>
</t>
</xpath>
</t>
</templates>

View file

@ -0,0 +1,3 @@
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from . import test_co_pos

View file

@ -0,0 +1,11 @@
from odoo.addons.account_edi.tests.common import AccountTestInvoicingCommon
from odoo.addons.point_of_sale.tests.test_generic_localization import TestGenericLocalization
from odoo.tests import tagged
@tagged('post_install', '-at_install', 'post_install_l10n')
class TestGenericCO(TestGenericLocalization):
@classmethod
@AccountTestInvoicingCommon.setup_country('co')
def setUpClass(cls):
super().setUpClass()

View file

@ -1,18 +0,0 @@
<?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.l10n_co_pos</field>
<field name="model">res.config.settings</field>
<field name="inherit_id" ref="point_of_sale.res_config_settings_view_form"/>
<field name="arch" type="xml">
<xpath expr="//div[@id='order_reference']" position="attributes">
<attribute name="groups"></attribute>
</xpath>
<xpath expr="//field[@name='pos_sequence_id']" position="attributes">
<attribute name="readonly">0</attribute>
</xpath>
</field>
</record>
</odoo>

View file

@ -1,13 +1,15 @@
[project]
name = "odoo-bringout-oca-ocb-l10n_co_pos"
version = "16.0.0"
description = "Colombian - Point of Sale - Odoo addon"
description = "Colombian - Point of Sale -
Odoo addon
"
authors = [
{ name = "Ernad Husremovic", email = "hernad@bring.out.ba" }
]
dependencies = [
"odoo-bringout-oca-ocb-l10n_co>=16.0.0",
"odoo-bringout-oca-ocb-point_of_sale>=16.0.0",
"odoo-bringout-oca-ocb-l10n_co>=19.0.0",
"odoo-bringout-oca-ocb-point_of_sale>=19.0.0",
"requests>=2.25.1"
]
readme = "README.md"
@ -17,7 +19,7 @@ classifiers = [
"Intended Audience :: Developers",
"License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Office/Business",
]