Add odex25_pos

This commit is contained in:
expert 2024-06-24 14:16:29 +03:00
parent 3a3f834c54
commit e9942e95b1
115 changed files with 6423 additions and 1 deletions

View File

@ -1,2 +1,2 @@
# odex25-standard-moduless
# odex25-standard-modules
This Repo contains general standard modules for all projects.

View File

@ -0,0 +1,28 @@
Odoo Proprietary License v1.0
This software and associated files (the "Software") may only be used (executed,
modified, executed after modifications) if you have purchased a valid license
from the authors, typically via Odoo Apps, or if you have received a written
agreement from the authors of the Software (see the COPYRIGHT file).
You may develop Odoo modules that use the Software as a library (typically
by depending on it, importing it and using its resources), but without copying
any source code or material from the Software. You may distribute those
modules under the license of your choice, provided that this license is
compatible with the terms of the Odoo Proprietary License (For example:
LGPL, MIT, or proprietary licenses similar to this one).
It is forbidden to publish, distribute, sublicense, or sell copies of the Software
or modified copies of the Software.
The above copyright notice and this permission notice must be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.

View File

@ -0,0 +1 @@
=> 14.0.0.1(06/09/2023) :Remove quantity validation for service product.

View File

@ -0,0 +1,6 @@
# -*- coding: utf-8 -*-
# Part of BrowseInfo. See LICENSE file for full copyright and licensing details.
from . import models

View File

@ -0,0 +1,26 @@
# -*- coding: utf-8 -*-
# Part of BrowseInfo. See LICENSE file for full copyright and licensing details.
{
'name': 'POS Restrict Zero Quantity',
'version': '14.0.0.1',
'category':'Odex25-POS/Odex25-POS',
'summary': 'Point Of Sale Restrict Zero Quantity pos restrict negative stock sales of products with zero or negative stock levels pos restrict zero stock product pos Restrict product with zero Quantity pos order line restriction with zero Quantity on pos',
'description' :"""
The Point Of Sale Restrict Zero Quantity Odoo App helps users to prevents the sales of products with zero or negative stock levels, ensuring that businesses never run out of stock. Additionally, the app can be configured to display a warning message when the stock level of a product is getting low. When a customer attempts to purchase a product with a stock level below the minimum, the app will display an error message, preventing the sale from going through.
""",
'author': 'BrowseInfo',
'website': 'https://www.browseinfo.com',
'depends': ['base','point_of_sale'],
'data': [
'views/pos_config_view.xml',
'views/pos_assets_common.xml',
],
'demo': [],
'test': [],
'license':'OPL-1',
'installable': True,
'auto_install': False,
'live_test_url':'https://youtu.be/6pUwaykhfQE',
"images":['static/description/Banner.gif'],
}

View File

@ -0,0 +1,4 @@
# -*- coding: utf-8 -*-
# Part of BrowseInfo. See LICENSE file for full copyright and licensing details.
from . import pos

View File

@ -0,0 +1,11 @@
# -*- coding: utf-8 -*-
# Part of BrowseInfo. See LICENSE file for full copyright and licensing details.
from odoo import api, fields, models, _
class PosConfig(models.Model):
_inherit = "pos.config"
restrict_zero_qty = fields.Boolean(string='Restrict Zero Quantity')

View File

@ -0,0 +1 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink

View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data noupdate="1">
</data>
</odoo>

Binary file not shown.

After

Width:  |  Height:  |  Size: 184 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 204 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 420 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 136 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 125 KiB

View File

@ -0,0 +1,236 @@
<section class="oe_container lead mt64">
<div>
<div class="col-md-12 mt16" style="padding:0;">
<div class="col-md-12" style="padding:0;">
<div class="panel-group mb0 mt0" role="tablist" id="priceAccordeon" style="padding:0;">
<div class="panel-heading mb0 mt0 collapsed" role="tab" data-toggle="collapse" data-parent="#priceAccordeon" data-target="#priceAccordeon_area" aria-expanded="false" style="margin-left:0;padding:0 0 2px 0;text-align:right;">
<strong>
<div style="background-color:#875A7B;color:white;padding:5px;margin-bottom:3px;text-align:center;border-radius:5px;white-space:nowrap;display: inline-block;">
<strong style="color:white;">
Supported :
</strong>
</div>
<div style="background-color:#875A7B;color:white;padding:5px;margin-bottom:3px;text-align:center;border-radius:5px;white-space:nowrap;display: inline-block;">
<strong style="color:white;" title="The tool is compatible with the Odoo Enterprise version">
<i class="fa fa-check" style="margin-left:4px;"> </i>
Enterprise
</strong>
</div>
<div style="background-color:#875A7B;padding:5px;margin-top:3px;text-align:center;border-radius:5px;white-space:nowrap;display: inline-block;">
<strong style="color:white;" title="The tool is compatible with the Odoo Community version">
<i class="fa fa-check" style="margin-left:4px;"> </i>
Community
</strong>
</div>
<div style="background-color:#875A7B;color:white;padding:5px;margin-bottom:3px;text-align:center;border-radius:5px;white-space:nowrap;display: inline-block;">
<strong style="color:white;" title="The tool might be installed to Odoo.sh if you have a linked private git repository">
<i class="fa fa-check" style="margin-left:4px;"> </i>
Odoo.sh
</strong>
</div>
</strong>
</div>
</div>
</div>
</div>
</div>
</section>
<section class="oe_container lead bi_title_box">
<div >
<div >
<h2 class="oe_slogan bi_title" style="color:#5082c4;">
<b>Point of Sales Restrict Zero Quantity Odoo App</b>
</h2>
<h3 class="oe_slogan bi_title" style="color: ##201111;">
<b>POS Order Line Restrict Zero Quantity Odoo Apps</b>
</h3>
<p class="oe_slogan">
Point Of Sale Restrict Zero Quantity Odoo App helps users to prevent the sales of products with zero or negative stock levels, ensuring that businesses never run out of stock. Additionally, the app can be configured to display a warning message when the stock level of a product is getting low. When a customer attempts to purchase a product with a stock level below the minimum, the app will display an error message, preventing the sale from going through.
</p>
</div>
</div>
</section>
<section class="oe_container lead bi_features">
<div >
<div>
<h3 class="oe_slogan" style="opacity:1;background: linear-gradient(to right, #86bcf2 0%, #e2f2f8 100%);padding: 10px 0px;color: ##201111;letter-spacing: 0.2em;text-transform: uppercase;text-shadow: 0.1em .04em 0.1em #7d8c88;"><b>Features</b></h3>
</div>
<div class="row">
<div class="col" style="margin: 10px;">
<div class="row">
<div class="col-md-3 text-center">
<img class="img img-responsive" style="max-width:100%;" src="features/8021071.png"/>
</div>
<div class="col-md-9">
<h4><b>Restrict Zero Quantity Configuration</b></h4>
<span class="oe_slogan">User have option to enable or disable zero quantity configuration.</span>
</div>
</div>
</div>
<div class="col" style="margin: 10px;">
<div class="row">
<div class="col-md-3 text-center">
<img class="img img-responsive" style="max-width:100%;" src="features/5139322.png"/>
</div>
<div class="col-md-9">
<h4><b>Zero Quantity Product Validation</b></h4>
<span class="oe_slogan">Raise warning on point of sale if product quantity is zero.</span>
</div>
</div>
</div>
</div>
</div>
</section>
<section class="oe_container lead mt64">
<div >
<div class="oe_slogan oe_spaced text-center">
<a class="btn mt8 mr8" title="Demo Request" style="background-color: #2875aa;color: #FFFFFF !important;font-size: 20px;font-weight: bold;border-radius: 7px;" href="mailto:sales@browseinfo.in?Subject=Demo Request for POS Restrict Zero Quantity Odoo App" target="_top"> Demo Request </a>
<a class="btn mt8 ml8" title="Video Tutorial" style="background-color: #2875aa;color: #FFFFFF !important;font-size: 20px;font-weight: bold;border-radius: 7px;" href="https://youtu.be/6pUwaykhfQE" target="_blank"> Video Tutorial</a>
</div>
</div>
</section>
<section class="oe_container lead">
<div>
<div>
<p class="oe_slogan" style="color: #49a3fe;font-size: 35px;font-style: italic;font-weight:bolder;">Restrict Zero Quantity Configuration</p>
<p class="oe_slogan">User have option to enable and disable configuration for restrict zero quantity validatoin.</p>
<img class="img-border img-responsive thumbnail mb16" style="border: 3px solid black;" src="1_pos_config.png">
</div>
</div>
</section>
<section class="oe_container lead">
<div>
<div>
<p class="oe_slogan" style="color: #49a3fe;font-size: 35px;font-style: italic;font-weight:bolder;">On Hand Qty</p>
<p class="oe_slogan">User can see product with zero on hand quantity.</p>
<img class="img-border img-responsive thumbnail mb16" style="border: 3px solid black;" src="2_onhand.png">
</div>
</div>
</section>
<section class="oe_container lead">
<div>
<div>
<p class="oe_slogan" style="color: #49a3fe;font-size: 35px;font-style: italic;font-weight:bolder;">Zero Quantity Product Validation</p>
<p class="oe_slogan">User can see warning when user selects product with zero quantity and click "Payment" button in point of sale screen.</p>
<img class="img-border img-responsive thumbnail mb16" style="border: 3px solid black;" src="3_warning.png">
</div>
</div>
</section>
<section class="oe_container oe_dark" style="min-width: 110%;margin-left: -5%;">
<div>
<div class="row">
<div class="col-sm-4" style="margin: auto;">
<p class="oe_slogan" style="font-size: 35px;color: #5082c4;font-style: italic;font-weight: bold;">Apps May You Like</p>
</div>
</div>
<div class="row col-sm-12" style="margin-left: 1%;padding: 1% 8%;">
<div class="col-sm-4" style="padding: 5px;padding-right: 10px;">
<a href="https://apps.odoo.com/apps/modules/14.0/bi_pos_reprint_reorder/">
<img class="img img-responsive" src="related/bi_pos_reprint_reorder.png" style="width: 100%;"/>
</a>
</div>
<div class="col-sm-4" style="padding: 5px;padding-right: 10px;">
<a href="https://apps.odoo.com/apps/modules/14.0/bi_pos_warranty/">
<img class="img img-responsive" src="related/bi_pos_warranty.png" style="width: 100%;"/>
</a>
</div>
<div class="col-sm-4" style="padding: 5px;padding-right: 10px;">
<a href="https://apps.odoo.com/apps/modules/14.0/bi_pos_screen_margin/">
<img class="img img-responsive" src="related/bi_pos_screen_margin.png" style="width: 100%;"/>
</a>
</div>
<div class="col-sm-4" style="padding: 5px;padding-right: 10px;">
<a href="https://apps.odoo.com/apps/modules/14.0/bi_pos_return_order/">
<img class="img img-responsive" src="related/bi_pos_return_order.png" style="width: 100%;"/>
</a>
</div>
<div class="col-sm-4" style="padding: 5px;padding-right: 10px;">
<a href="https://apps.odoo.com/apps/modules/14.0/pos_coupons_gift_voucher/">
<img class="img img-responsive" src="related/pos_coupons_gift_voucher.png" style="width: 100%;"/>
</a>
</div>
<div class="col-sm-4" style="padding: 5px;padding-right: 10px;">
<a href="https://apps.odoo.com/apps/modules/14.0/pos_home_delivery/">
<img class="img img-responsive" src="related/pos_home_delivery.png" style="width: 100%;"/>
</a>
</div>
</div>
</div>
</section>
<section class="oe_container oe_dark" style="min-width: 110%;margin-left: -5%;">
<div>
<div class="row">
<div class="col-sm-4" style="margin: auto;">
<p class="oe_slogan" style="font-size: 35px;color: #5082c4;font-style: italic;font-weight: bold;">Most Demanded Apps</p>
</div>
</div>
<div class="row col-sm-12" style="margin-left: 1%;padding: 1% 8%;">
<div class="col-sm-4" style="padding: 5px;padding-right: 10px;">
<a href="https://apps.odoo.com/apps/modules/14.0/pos_orders_all/">
<img class="img img-responsive" src="demanded/all_in_one_pos.png" style="width: 100%;"/>
</a>
</div>
<div class="col-sm-4" style="padding: 5px;padding-right: 10px;">
<a href="https://apps.odoo.com/apps/modules/14.0/bi_customer_overdue_statement/">
<img class="img img-responsive" src="demanded/customer_overdue.png" style="width: 100%;"/>
</a>
</div>
<div class="col-sm-4" style="padding: 5px;padding-right: 10px;">
<a href="https://apps.odoo.com/apps/modules/14.0/generic_excel_report/">
<img class="img img-responsive" src="demanded/generic_excel_report.png" style="width: 100%;"/>
</a>
</div>
<div class="col-sm-4" style="padding: 5px;padding-right: 10px;">
<a href="https://apps.odoo.com/apps/modules/14.0/sales_commission_generic/">
<img class="img img-responsive" src="demanded/sale_commision.png" style="width: 100%;"/>
</a>
</div>
<div class="col-sm-4" style="padding: 5px;padding-right: 10px;">
<a href="https://apps.odoo.com/apps/modules/14.0/bi_generic_import/">
<img class="img img-responsive" src="demanded/bi_generic_import.png" style="width: 100%;"/>
</a>
</div>
<div class="col-sm-4" style="padding: 5px;padding-right: 10px;">
<a href="https://apps.odoo.com/apps/modules/14.0/branch/">
<img class="img img-responsive" src="demanded/branch.png" style="width: 100%;"/>
</a>
</div>
</div>
</div>
</section>
<section class="oe_container">
<div >
<div >
<h2 class="oe_slogan">Free Support</h2>
<h3 class="oe_slogan" style="font-size: 21px; color: #000000 !important;">You will get 90 Days free support incase any bugs or issue (Except data recovery).</h3>
<p class="oe_slogan" style="font-size: 18px; ">
At BrowseInfo we offer end to end solution for Odoo services. Which includes analysis &amp; consultation on the workflows and integration part. Please note that You're not allowed to distribute this module after purchase! Incase of any question regarding this module feel free to email us on <a href="mailto:ticket@browseinfo.in">ticket@browseinfo.in</a> or raise a ticket on support.
</p>
</div>
</div>
</section>
<section class="oe_container lead">
<div >
<div >
<div class="img img-responsive text-center">
<a href="https://www.browseinfo.com" target="new" style="display: grid;">
<img src="bi_logo.png" style="margin: auto;max-width: 350px;">
</a>
</div>
</div>
<div class="oe_slogan oe_spaced text-center">
<a class="btn mt8" title="Query and Demo" style="background-color: #3497db;color: #FFFFFF !important;font-size: 20px;font-weight: bold;" href="mailto:sales@browseinfo.in?Subject=Demo Request for POS Restrict Zero Quantity Odoo App" target="_blank"> Query and Demo </a>
<a class="btn mt8" title="Email on Support" style="background-color: #3497db;color: #FFFFFF !important;font-size: 20px;font-weight: bold;" href="mailto:ticket@browseinfo.in?Subject=Support Request for POS Restrict Zero Quantity Odoo App" target="_blank"> Support Request </a>
</div>
</div>
</section>

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

View File

@ -0,0 +1,73 @@
// BiProductScreen js
odoo.define('bi_pos_restrict_zero_qty.productScreen', function(require) {
"use strict";
const Registries = require('point_of_sale.Registries');
const ProductScreen = require('point_of_sale.ProductScreen');
var rpc = require('web.rpc')
const BiProductScreen = (ProductScreen) =>
class extends ProductScreen {
constructor() {
super(...arguments);
}
async _onClickPay() {
var self = this;
let order = this.env.pos.get_order();
let lines = order.get_orderlines();
let pos_config = self.env.pos.config;
let call_super = true;
var config_id=self.env.pos.config.id;
let prod_used_qty = {};
let restrict = false;
if(pos_config.restrict_zero_qty){
$.each(lines, function( i, line ){
let prd = line.product;
if (prd.type == 'product'){
if(prd.id in prod_used_qty){
let old_qty = prod_used_qty[prd.id][1];
prod_used_qty[prd.id] = [prd.qty_available,line.quantity+old_qty]
}else{
prod_used_qty[prd.id] = [prd.qty_available,line.quantity]
}
}
if (prd.type == 'product'){
if(prd.qty_available <= 0){
restrict = true;
call_super = false;
let wrning = prd.display_name + ' is out of stock.';
self.showPopup('ErrorPopup', {
title: self.env._t('Zero Quantity Not allowed'),
body: self.env._t(wrning),
});
}
}
});
if(restrict === false){
$.each(prod_used_qty, function( i, pq ){
let product = self.env.pos.db.get_product_by_id(i);
let check = pq[0] - pq[1];
let wrning = product.display_name + ' is out of stock.';
if (product.type == 'product'){
if (check < 0){
call_super = false;
self.showPopup('ErrorPopup', {
title: self.env._t('Deny Order'),
body: self.env._t(wrning),
});
}
}
});
}
}
if(call_super){
super._onClickPay();
}
}
};
Registries.Component.extend(ProductScreen, BiProductScreen);
return ProductScreen;
});

View File

@ -0,0 +1,12 @@
odoo.define('bi_pos_restrict_zero_qty.pos', function(require) {
"use strict";
const models = require('point_of_sale.models');
var model_list = models.PosModel.prototype.models;
var product_model = null;
var exports = {};
models.load_fields('product.product', ['qty_available','type']);
});

View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<template id="bi_pos_restrict_stock" inherit_id="point_of_sale.assets">
<xpath expr="." position="inside">
<script type="text/javascript" src="/bi_pos_restrict_zero_qty/static/src/js/models.js"/>
<script type="text/javascript" src="/bi_pos_restrict_zero_qty/static/src/js/ProductScreen.js"/>
</xpath>
</template>
</odoo>

View File

@ -0,0 +1,28 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<record model="ir.ui.view" id="custom_pos_config_extended_form_view">
<field name="name">pos.config.form.extended.view</field>
<field name="model">pos.config</field>
<field name="inherit_id" ref="point_of_sale.pos_config_view_form"/>
<field name="arch" type="xml">
<xpath expr="//h2[@name='order']" position="before">
<h2 name="order">POS Restrict Quantity Configuration</h2>
<div class="row mt16 o_settings_container">
<div class="col-12 col-lg-6 o_setting_box">
<div class="o_setting_left_pane">
<field name="restrict_zero_qty" />
</div>
<div class="o_setting_right_pane">
<label for="restrict_zero_qty" />
<div class="text-muted">
Zero Quantity Product Validation
</div>
</div>
</div>
</div>
</xpath>
</field>
</record>
</data>
</odoo>

View File

@ -0,0 +1,88 @@
==========================
POS No Cash Bank Statement
==========================
..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:ef561dfd47bf7941f90d56c0bd512d755a9bcb91b95574cfb7314b40aecd7cd1
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fpos-lightgray.png?logo=github
:target: https://github.com/OCA/pos/tree/14.0/pos_no_cash_bank_statement
:alt: OCA/pos
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/pos-14-0/pos-14-0-pos_no_cash_bank_statement
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/pos&target_branch=14.0
:alt: Try me on Runboat
|badge1| |badge2| |badge3| |badge4| |badge5|
Up to Odoo 12.0, POS sessions generated bank statements for each payment method and therefore closing a POS session would generate payment journal entries for all payment methods.
In Odoo 13.0 and upper, only the cash payment method generate a cash register/bank statement and therefore the payment journal entries. The non-cash payment methods don't generate any payment journal entries.
With this module, you have a new option **Generate Bank Statement** on non-cash POS payment method. If you enable that option, Odoo will generate a bank statement and will generate the payment journal entries upon POS session closing. For example, if your POS accepts payment by check, you certainly want to enable that option for the *Check* POS payment method.
**Table of contents**
.. contents::
:local:
Bug Tracker
===========
Bugs are tracked on `GitHub Issues <https://github.com/OCA/pos/issues>`_.
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
`feedback <https://github.com/OCA/pos/issues/new?body=module:%20pos_no_cash_bank_statement%0Aversion:%2014.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.
Credits
=======
Authors
~~~~~~~
* Akretion
Contributors
~~~~~~~~~~~~
* Alexis de Lattre <alexis.delattre@akretion.com>
Maintainers
~~~~~~~~~~~
This module is maintained by the OCA.
.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org
OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.
.. |maintainer-alexis-via| image:: https://github.com/alexis-via.png?size=40px
:target: https://github.com/alexis-via
:alt: alexis-via
Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:
|maintainer-alexis-via|
This module is part of the `OCA/pos <https://github.com/OCA/pos/tree/14.0/pos_no_cash_bank_statement>`_ project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

View File

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

View File

@ -0,0 +1,19 @@
# Copyright 2021 Akretion France (http://www.akretion.com/)
# @author: Alexis de Lattre <alexis.delattre@akretion.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "POS No Cash Bank Statement",
"version": "14.0.1.1.0",
"category": "Odex25-POS/Odex25-POS",
"license": "AGPL-3",
"summary": "Generate bank statements for all payment methods, not only cash",
"author": "Akretion,Odoo Community Association (OCA)",
"maintainers": ["alexis-via"],
"website": "https://github.com/OCA/pos",
"depends": ["point_of_sale"],
"data": [
"views/pos_payment_method.xml",
],
"installable": True,
}

View File

@ -0,0 +1,115 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * pos_no_cash_bank_statement
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 14.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2023-03-02 13:23+0000\n"
"Last-Translator: Rachid Al Assir <rachidalassir@gmail.com>\n"
"Language-Team: none\n"
"Language: ar\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 "
"&& n%100<=10 ? 3 : n%100>=11 ? 4 : 5;\n"
"X-Generator: Weblate 4.14.1\n"
#. module: pos_no_cash_bank_statement
#: model:ir.model.fields,field_description:pos_no_cash_bank_statement.field_pos_payment_method__cash_journal_id
msgid "Bank/Cash Journal"
msgstr "دفتر يومية البنك/النقدية"
#. module: pos_no_cash_bank_statement
#: model:ir.model.fields,help:pos_no_cash_bank_statement.field_pos_payment_method__bank_statement
msgid ""
"By default, Odoo will generate a cash register/bank statement upon POS "
"session closing only for cash payment methods. If you enable this option for "
"a non-cash payment method, Odoo will generate a bank statement upon session "
"closing, which will generate accounting entries in the bank journal, which "
"will be automatically reconciled with the sale journal entry."
msgstr ""
"بشكل افتراضي ، سيقوم Odoo بإنشاء سجل نقدي / كشف حساب بنكي عند إغلاق جلسة "
"نقاط البيع فقط لطرق الدفع النقدي. إذا قمت بتفعيل هذا الخيار لطريقة دفع غير "
"نقدية ، فسيقوم Odoo بإنشاء كشف حساب بنكي عند إغلاق الجلسة ، والذي سينشئ "
"إدخالات محاسبية في دفتر يومية البنك ، والتي سيتم تسويتها تلقائيًا مع إدخال "
"دفتر يومية البيع."
#. module: pos_no_cash_bank_statement
#: model:ir.model.fields,field_description:pos_no_cash_bank_statement.field_pos_payment_method__display_name
#: model:ir.model.fields,field_description:pos_no_cash_bank_statement.field_pos_session__display_name
msgid "Display Name"
msgstr "اسم العرض"
#. module: pos_no_cash_bank_statement
#: model:ir.model.fields,field_description:pos_no_cash_bank_statement.field_pos_payment_method__bank_statement
msgid "Generate Bank Statement"
msgstr "إنشاء كشف حساب بنكي"
#. module: pos_no_cash_bank_statement
#: model:ir.model.fields,field_description:pos_no_cash_bank_statement.field_pos_payment_method__id
#: model:ir.model.fields,field_description:pos_no_cash_bank_statement.field_pos_session__id
msgid "ID"
msgstr "المُعرف"
#. module: pos_no_cash_bank_statement
#: model:ir.model.fields,field_description:pos_no_cash_bank_statement.field_pos_payment_method__journal_type_domain
msgid "Journal Type Domain"
msgstr "مجال نوع المجلة"
#. module: pos_no_cash_bank_statement
#: model:ir.model.fields,field_description:pos_no_cash_bank_statement.field_pos_payment_method____last_update
#: model:ir.model.fields,field_description:pos_no_cash_bank_statement.field_pos_session____last_update
msgid "Last Modified on"
msgstr "تاريخ آخر تعديل"
#. module: pos_no_cash_bank_statement
#: code:addons/pos_no_cash_bank_statement/models/pos_payment_method.py:0
#, python-format
msgid "Missing bank journal on payment method '%s'."
msgstr "دفتر اليومية المصرفي غير موجود في طريقة الدفع '%s'."
#. module: pos_no_cash_bank_statement
#: code:addons/pos_no_cash_bank_statement/models/pos_payment_method.py:0
#, python-format
msgid "Missing cash journal on cash payment method '%s'."
msgstr "دفتر اليومية النقدي مفقود في طريقة الدفع النقدي '%s'."
#. module: pos_no_cash_bank_statement
#: model:ir.model,name:pos_no_cash_bank_statement.model_pos_payment_method
msgid "Point of Sale Payment Methods"
msgstr "طرق الدفع في نقاط البيع"
#. module: pos_no_cash_bank_statement
#: model:ir.model,name:pos_no_cash_bank_statement.model_pos_session
msgid "Point of Sale Session"
msgstr "جلسة نقاط البيع"
#. module: pos_no_cash_bank_statement
#: code:addons/pos_no_cash_bank_statement/models/pos_payment_method.py:0
#, python-format
msgid ""
"The journal configured on the cash payment method '%s' should one of these "
"types:\n"
"- %s."
msgstr ""
"يجب أن يكون دفتر اليومية الذي تم تكوينه على طريقة الدفع النقدي '%s' أحد "
"الأنواع التالية:\n"
"- %s."
#. module: pos_no_cash_bank_statement
#: code:addons/pos_no_cash_bank_statement/models/pos_payment_method.py:0
#, python-format
msgid ""
"The journal configured on the payment method '%s' should be a bank journal."
msgstr ""
"دفتر اليومية الذي تم تفعيله في طريقة الدفع '%s' يجب أن يكون دفتر يومية بنكي."
#. module: pos_no_cash_bank_statement
#: model:ir.model.fields,help:pos_no_cash_bank_statement.field_pos_payment_method__cash_journal_id
msgid ""
"The payment method is of type cash. A cash statement will be automatically "
"generated."
msgstr "طريقة الدفع من النوع النقدي. سيتم إنشاء كشف حساب نقدي تلقائيًا."

View File

@ -0,0 +1,118 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * pos_no_cash_bank_statement
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 14.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2023-10-09 06:09+0000\n"
"Last-Translator: Anna Martínez <anna080678@gmail.com>\n"
"Language-Team: none\n"
"Language: es\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 4.17\n"
#. module: pos_no_cash_bank_statement
#: model:ir.model.fields,field_description:pos_no_cash_bank_statement.field_pos_payment_method__cash_journal_id
msgid "Bank/Cash Journal"
msgstr "Diario de banco/caja"
#. module: pos_no_cash_bank_statement
#: model:ir.model.fields,help:pos_no_cash_bank_statement.field_pos_payment_method__bank_statement
msgid ""
"By default, Odoo will generate a cash register/bank statement upon POS "
"session closing only for cash payment methods. If you enable this option for "
"a non-cash payment method, Odoo will generate a bank statement upon session "
"closing, which will generate accounting entries in the bank journal, which "
"will be automatically reconciled with the sale journal entry."
msgstr ""
"De forma predeterminada, Odoo generará un extracto bancario/caja al cerrar "
"la sesión de POS solo para métodos de pago en efectivo. Si habilita esta "
"opción para un método de pago que no sea en efectivo, Odoo generará un "
"extracto bancario al cerrar la sesión, lo que generará asientos contables en "
"el diario, que se conciliarán automáticamente con el asiento del diario de "
"ventas."
#. module: pos_no_cash_bank_statement
#: model:ir.model.fields,field_description:pos_no_cash_bank_statement.field_pos_payment_method__display_name
#: model:ir.model.fields,field_description:pos_no_cash_bank_statement.field_pos_session__display_name
msgid "Display Name"
msgstr "Nombre a mostrar"
#. module: pos_no_cash_bank_statement
#: model:ir.model.fields,field_description:pos_no_cash_bank_statement.field_pos_payment_method__bank_statement
msgid "Generate Bank Statement"
msgstr "Generar extracto bancario"
#. module: pos_no_cash_bank_statement
#: model:ir.model.fields,field_description:pos_no_cash_bank_statement.field_pos_payment_method__id
#: model:ir.model.fields,field_description:pos_no_cash_bank_statement.field_pos_session__id
msgid "ID"
msgstr "ID"
#. module: pos_no_cash_bank_statement
#: model:ir.model.fields,field_description:pos_no_cash_bank_statement.field_pos_payment_method__journal_type_domain
msgid "Journal Type Domain"
msgstr "Filtro de tipo de diario"
#. module: pos_no_cash_bank_statement
#: model:ir.model.fields,field_description:pos_no_cash_bank_statement.field_pos_payment_method____last_update
#: model:ir.model.fields,field_description:pos_no_cash_bank_statement.field_pos_session____last_update
msgid "Last Modified on"
msgstr "Última modificación en"
#. module: pos_no_cash_bank_statement
#: code:addons/pos_no_cash_bank_statement/models/pos_payment_method.py:0
#, python-format
msgid "Missing bank journal on payment method '%s'."
msgstr "Falta el diario de banco en el método de pago '%s'."
#. module: pos_no_cash_bank_statement
#: code:addons/pos_no_cash_bank_statement/models/pos_payment_method.py:0
#, python-format
msgid "Missing cash journal on cash payment method '%s'."
msgstr "Falta el diario de efectivo en el método de pago '%s'."
#. module: pos_no_cash_bank_statement
#: model:ir.model,name:pos_no_cash_bank_statement.model_pos_payment_method
msgid "Point of Sale Payment Methods"
msgstr "Métodos de pago del punto de venta"
#. module: pos_no_cash_bank_statement
#: model:ir.model,name:pos_no_cash_bank_statement.model_pos_session
msgid "Point of Sale Session"
msgstr "Sesión del Puto de Venta"
#. module: pos_no_cash_bank_statement
#: code:addons/pos_no_cash_bank_statement/models/pos_payment_method.py:0
#, python-format
msgid ""
"The journal configured on the cash payment method '%s' should one of these "
"types:\n"
"- %s."
msgstr ""
"El diario configurado en el método de pago de efectivo '%s' deberia ser de "
"uno de estos tipos:\n"
"- %s."
#. module: pos_no_cash_bank_statement
#: code:addons/pos_no_cash_bank_statement/models/pos_payment_method.py:0
#, python-format
msgid ""
"The journal configured on the payment method '%s' should be a bank journal."
msgstr ""
"El diario configurado en el método de pago '%s' debería ser un diario de "
"banco."
#. module: pos_no_cash_bank_statement
#: model:ir.model.fields,help:pos_no_cash_bank_statement.field_pos_payment_method__cash_journal_id
msgid ""
"The payment method is of type cash. A cash statement will be automatically "
"generated."
msgstr ""
"La forma de pago es de tipo efectivo. Se generará automáticamente un "
"extracto de caja."

View File

@ -0,0 +1,120 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * pos_no_cash_bank_statement
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 14.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2024-03-01 10:33+0000\n"
"Last-Translator: mymage <stefano.consolaro@mymage.it>\n"
"Language-Team: none\n"
"Language: it\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 4.17\n"
#. module: pos_no_cash_bank_statement
#: model:ir.model.fields,field_description:pos_no_cash_bank_statement.field_pos_payment_method__cash_journal_id
msgid "Bank/Cash Journal"
msgstr "Registro banca/cassa"
#. module: pos_no_cash_bank_statement
#: model:ir.model.fields,help:pos_no_cash_bank_statement.field_pos_payment_method__bank_statement
msgid ""
"By default, Odoo will generate a cash register/bank statement upon POS "
"session closing only for cash payment methods. If you enable this option for "
"a non-cash payment method, Odoo will generate a bank statement upon session "
"closing, which will generate accounting entries in the bank journal, which "
"will be automatically reconciled with the sale journal entry."
msgstr ""
"In modo predefinito, Odoo genererà un estratto conto di banca/cassa alla "
"chiusura della sessione POS solo per i metodi di pagamento in contanti. Se "
"si abilita questa opzione per un pagamento non in contanti, Odoo genererà un "
"estratto conto alla chiusura della sessione, che genererà le registrazioni "
"contabili nel libro giornale, che verranno automaticamente riconciliate con "
"le registrazioni del libro giornale delle vendite."
#. module: pos_no_cash_bank_statement
#: model:ir.model.fields,field_description:pos_no_cash_bank_statement.field_pos_payment_method__display_name
#: model:ir.model.fields,field_description:pos_no_cash_bank_statement.field_pos_session__display_name
msgid "Display Name"
msgstr "Nome visualizzato"
#. module: pos_no_cash_bank_statement
#: model:ir.model.fields,field_description:pos_no_cash_bank_statement.field_pos_payment_method__bank_statement
msgid "Generate Bank Statement"
msgstr "Genera estratto conto"
#. module: pos_no_cash_bank_statement
#: model:ir.model.fields,field_description:pos_no_cash_bank_statement.field_pos_payment_method__id
#: model:ir.model.fields,field_description:pos_no_cash_bank_statement.field_pos_session__id
msgid "ID"
msgstr "ID"
#. module: pos_no_cash_bank_statement
#: model:ir.model.fields,field_description:pos_no_cash_bank_statement.field_pos_payment_method__journal_type_domain
msgid "Journal Type Domain"
msgstr "Dominio tipo libro giornale"
#. module: pos_no_cash_bank_statement
#: model:ir.model.fields,field_description:pos_no_cash_bank_statement.field_pos_payment_method____last_update
#: model:ir.model.fields,field_description:pos_no_cash_bank_statement.field_pos_session____last_update
msgid "Last Modified on"
msgstr "Ultima modifica il"
#. module: pos_no_cash_bank_statement
#: code:addons/pos_no_cash_bank_statement/models/pos_payment_method.py:0
#, python-format
msgid "Missing bank journal on payment method '%s'."
msgstr "Sezionale banca mancante sull'ordine di pagamento %s."
#. module: pos_no_cash_bank_statement
#: code:addons/pos_no_cash_bank_statement/models/pos_payment_method.py:0
#, python-format
msgid "Missing cash journal on cash payment method '%s'."
msgstr ""
"Libro giornale contanti non definito per il metodo di pagamento contanti "
"'%s'."
#. module: pos_no_cash_bank_statement
#: model:ir.model,name:pos_no_cash_bank_statement.model_pos_payment_method
msgid "Point of Sale Payment Methods"
msgstr "Metodi di pagamento punto vendita"
#. module: pos_no_cash_bank_statement
#: model:ir.model,name:pos_no_cash_bank_statement.model_pos_session
msgid "Point of Sale Session"
msgstr "Sessione punto vendita"
#. module: pos_no_cash_bank_statement
#: code:addons/pos_no_cash_bank_statement/models/pos_payment_method.py:0
#, python-format
msgid ""
"The journal configured on the cash payment method '%s' should one of these "
"types:\n"
"- %s."
msgstr ""
"Il libro giornale configurato nel metodo di pagamento contanti '%s' dovrebbe "
"essere di questi tipi:\n"
"- %s."
#. module: pos_no_cash_bank_statement
#: code:addons/pos_no_cash_bank_statement/models/pos_payment_method.py:0
#, python-format
msgid ""
"The journal configured on the payment method '%s' should be a bank journal."
msgstr ""
"Il libro giornale configurato nel metodo di pagamento '%s' dovrebbe essere "
"un libro giornale banca."
#. module: pos_no_cash_bank_statement
#: model:ir.model.fields,help:pos_no_cash_bank_statement.field_pos_payment_method__cash_journal_id
msgid ""
"The payment method is of type cash. A cash statement will be automatically "
"generated."
msgstr ""
"Il metodo di pagamento è di tipo contanti. Un resoconto verrà generato "
"automaticamente."

View File

@ -0,0 +1,2 @@
from . import pos_payment_method
from . import pos_session

View File

@ -0,0 +1,87 @@
# Copyright 2021 Akretion France (http://www.akretion.com/)
# @author: Alexis de Lattre <alexis.delattre@akretion.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import _, api, fields, models
from odoo.exceptions import ValidationError
class PosPaymentMethod(models.Model):
_inherit = "pos.payment.method"
cash_journal_id = fields.Many2one(
domain=[("type", "in", ("bank", "cash"))],
string="Bank/Cash Journal",
)
journal_type_domain = fields.Char(compute="_compute_journal_type_domain")
bank_statement = fields.Boolean(
string="Generate Bank Statement",
help="By default, Odoo will generate a cash register/bank statement "
"upon POS session closing only for cash payment methods. If you enable "
"this option for a non-cash payment method, Odoo will generate a bank "
"statement upon session closing, which will generate accounting entries "
"in the bank journal, which will be automatically reconciled with the "
"sale journal entry.",
)
@api.model
def _get_allowed_journal_types(self):
return ["cash"]
@api.constrains("is_cash_count", "cash_journal_id", "bank_statement")
def _check_journal_config(self):
allowed_cash_types = self._get_allowed_journal_types()
for method in self:
if method.is_cash_count:
if not method.cash_journal_id:
raise ValidationError(
_("Missing cash journal on cash payment method '%s'.")
% method.display_name
)
if method.cash_journal_id.type not in allowed_cash_types:
labels = [
dict(method.cash_journal_id._fields.get("type").selection).get(
t
)
for t in allowed_cash_types
]
raise ValidationError(
_(
"The journal configured on the cash payment method '%s' "
"should one of these types:\n- %s."
)
% (method.display_name, "\n- ".join(labels))
)
elif method.bank_statement:
if not method.cash_journal_id:
raise ValidationError(
_("Missing bank journal on payment method '%s'.")
% method.display_name
)
if method.cash_journal_id.type != "bank":
raise ValidationError(
_(
"The journal configured on the payment method '%s' "
"should be a bank journal."
)
% method.display_name
)
# Updating domain via onchange is deprecated in odoo v14
# That's why I use this computed field
@api.depends("is_cash_count")
def _compute_journal_type_domain(self):
for method in self:
if method.is_cash_count:
method.journal_type_domain = "cash"
else:
method.journal_type_domain = "bank"
@api.onchange("is_cash_count")
def is_cash_count_change(self):
if self.is_cash_count:
self.bank_statement = False
self.cash_journal_id = False
else:
self.cash_journal_id = False

View File

@ -0,0 +1,60 @@
# Copyright 2021 Akretion France (http://www.akretion.com/)
# @author: Alexis de Lattre <alexis.delattre@akretion.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import models
class PosSession(models.Model):
_inherit = "pos.session"
def _accumulate_amounts(self, data):
data = super()._accumulate_amounts(data)
# IDEA : move split_receivables and combine_receivables to
# split_receivables_cash and combine_receivables_cash
# if bank_statement is true on pos.payment.method
# The big advantage of this implementation is that
# there is no need to re-implement the logic of
# _create_cash_statement_lines_and_cash_move_lines()
# and update _reconcile_account_move_lines()
# The drawback is that we store the bank journal for the non
# cash method payment in the native field cash_journal_id
# which is a bit "strange"
# I have to do that because the method
# _create_cash_statement_lines_and_cash_move_lines()
# reads payment_method_id.cash_journal_id
payment_methods_bank_statement = self.config_id.payment_method_ids.filtered(
lambda payment_method: (
not payment_method.is_cash_count
and payment_method.bank_statement
and payment_method.cash_journal_id
)
)
if payment_methods_bank_statement:
self.write(
{
"statement_ids": [
(
0,
0,
{
"journal_id": pay_method.cash_journal_id.id,
"name": "%s %s" % (self.name, pay_method.name),
},
)
for pay_method in payment_methods_bank_statement
]
}
)
# I can't pop data['split_receivables'] inside a loop on
# data['split_receivables'],
# that's why I use dict(data['split_receivables'])
for pos_payment, value in dict(data["split_receivables"]).items():
if pos_payment.payment_method_id in payment_methods_bank_statement:
data["split_receivables_cash"][pos_payment] = value
data["split_receivables"].pop(pos_payment)
for pos_payment_method, value in dict(data["combine_receivables"]).items():
if pos_payment_method in payment_methods_bank_statement:
data["combine_receivables_cash"][pos_payment_method] = value
data["combine_receivables"].pop(pos_payment_method)
return data

View File

@ -0,0 +1 @@
* Alexis de Lattre <alexis.delattre@akretion.com>

View File

@ -0,0 +1,5 @@
Up to Odoo 12.0, POS sessions generated bank statements for each payment method and therefore closing a POS session would generate payment journal entries for all payment methods.
In Odoo 13.0 and upper, only the cash payment method generate a cash register/bank statement and therefore the payment journal entries. The non-cash payment methods don't generate any payment journal entries.
With this module, you have a new option **Generate Bank Statement** on non-cash POS payment method. If you enable that option, Odoo will generate a bank statement and will generate the payment journal entries upon POS session closing. For example, if your POS accepts payment by check, you certainly want to enable that option for the *Check* POS payment method.

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

View File

@ -0,0 +1,424 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils: https://docutils.sourceforge.io/" />
<title>POS No Cash Bank Statement</title>
<style type="text/css">
/*
:Author: David Goodger (goodger@python.org)
:Id: $Id: html4css1.css 8954 2022-01-20 10:10:25Z milde $
:Copyright: This stylesheet has been placed in the public domain.
Default cascading style sheet for the HTML output of Docutils.
See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to
customize this style sheet.
*/
/* used to remove borders from tables and images */
.borderless, table.borderless td, table.borderless th {
border: 0 }
table.borderless td, table.borderless th {
/* Override padding for "table.docutils td" with "! important".
The right padding separates the table cells. */
padding: 0 0.5em 0 0 ! important }
.first {
/* Override more specific margin styles with "! important". */
margin-top: 0 ! important }
.last, .with-subtitle {
margin-bottom: 0 ! important }
.hidden {
display: none }
.subscript {
vertical-align: sub;
font-size: smaller }
.superscript {
vertical-align: super;
font-size: smaller }
a.toc-backref {
text-decoration: none ;
color: black }
blockquote.epigraph {
margin: 2em 5em ; }
dl.docutils dd {
margin-bottom: 0.5em }
object[type="image/svg+xml"], object[type="application/x-shockwave-flash"] {
overflow: hidden;
}
/* Uncomment (and remove this text!) to get bold-faced definition list terms
dl.docutils dt {
font-weight: bold }
*/
div.abstract {
margin: 2em 5em }
div.abstract p.topic-title {
font-weight: bold ;
text-align: center }
div.admonition, div.attention, div.caution, div.danger, div.error,
div.hint, div.important, div.note, div.tip, div.warning {
margin: 2em ;
border: medium outset ;
padding: 1em }
div.admonition p.admonition-title, div.hint p.admonition-title,
div.important p.admonition-title, div.note p.admonition-title,
div.tip p.admonition-title {
font-weight: bold ;
font-family: sans-serif }
div.attention p.admonition-title, div.caution p.admonition-title,
div.danger p.admonition-title, div.error p.admonition-title,
div.warning p.admonition-title, .code .error {
color: red ;
font-weight: bold ;
font-family: sans-serif }
/* Uncomment (and remove this text!) to get reduced vertical space in
compound paragraphs.
div.compound .compound-first, div.compound .compound-middle {
margin-bottom: 0.5em }
div.compound .compound-last, div.compound .compound-middle {
margin-top: 0.5em }
*/
div.dedication {
margin: 2em 5em ;
text-align: center ;
font-style: italic }
div.dedication p.topic-title {
font-weight: bold ;
font-style: normal }
div.figure {
margin-left: 2em ;
margin-right: 2em }
div.footer, div.header {
clear: both;
font-size: smaller }
div.line-block {
display: block ;
margin-top: 1em ;
margin-bottom: 1em }
div.line-block div.line-block {
margin-top: 0 ;
margin-bottom: 0 ;
margin-left: 1.5em }
div.sidebar {
margin: 0 0 0.5em 1em ;
border: medium outset ;
padding: 1em ;
background-color: #ffffee ;
width: 40% ;
float: right ;
clear: right }
div.sidebar p.rubric {
font-family: sans-serif ;
font-size: medium }
div.system-messages {
margin: 5em }
div.system-messages h1 {
color: red }
div.system-message {
border: medium outset ;
padding: 1em }
div.system-message p.system-message-title {
color: red ;
font-weight: bold }
div.topic {
margin: 2em }
h1.section-subtitle, h2.section-subtitle, h3.section-subtitle,
h4.section-subtitle, h5.section-subtitle, h6.section-subtitle {
margin-top: 0.4em }
h1.title {
text-align: center }
h2.subtitle {
text-align: center }
hr.docutils {
width: 75% }
img.align-left, .figure.align-left, object.align-left, table.align-left {
clear: left ;
float: left ;
margin-right: 1em }
img.align-right, .figure.align-right, object.align-right, table.align-right {
clear: right ;
float: right ;
margin-left: 1em }
img.align-center, .figure.align-center, object.align-center {
display: block;
margin-left: auto;
margin-right: auto;
}
table.align-center {
margin-left: auto;
margin-right: auto;
}
.align-left {
text-align: left }
.align-center {
clear: both ;
text-align: center }
.align-right {
text-align: right }
/* reset inner alignment in figures */
div.align-right {
text-align: inherit }
/* div.align-center * { */
/* text-align: left } */
.align-top {
vertical-align: top }
.align-middle {
vertical-align: middle }
.align-bottom {
vertical-align: bottom }
ol.simple, ul.simple {
margin-bottom: 1em }
ol.arabic {
list-style: decimal }
ol.loweralpha {
list-style: lower-alpha }
ol.upperalpha {
list-style: upper-alpha }
ol.lowerroman {
list-style: lower-roman }
ol.upperroman {
list-style: upper-roman }
p.attribution {
text-align: right ;
margin-left: 50% }
p.caption {
font-style: italic }
p.credits {
font-style: italic ;
font-size: smaller }
p.label {
white-space: nowrap }
p.rubric {
font-weight: bold ;
font-size: larger ;
color: maroon ;
text-align: center }
p.sidebar-title {
font-family: sans-serif ;
font-weight: bold ;
font-size: larger }
p.sidebar-subtitle {
font-family: sans-serif ;
font-weight: bold }
p.topic-title {
font-weight: bold }
pre.address {
margin-bottom: 0 ;
margin-top: 0 ;
font: inherit }
pre.literal-block, pre.doctest-block, pre.math, pre.code {
margin-left: 2em ;
margin-right: 2em }
pre.code .ln { color: grey; } /* line numbers */
pre.code, code { background-color: #eeeeee }
pre.code .comment, code .comment { color: #5C6576 }
pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold }
pre.code .literal.string, code .literal.string { color: #0C5404 }
pre.code .name.builtin, code .name.builtin { color: #352B84 }
pre.code .deleted, code .deleted { background-color: #DEB0A1}
pre.code .inserted, code .inserted { background-color: #A3D289}
span.classifier {
font-family: sans-serif ;
font-style: oblique }
span.classifier-delimiter {
font-family: sans-serif ;
font-weight: bold }
span.interpreted {
font-family: sans-serif }
span.option {
white-space: nowrap }
span.pre {
white-space: pre }
span.problematic {
color: red }
span.section-subtitle {
/* font-size relative to parent (h1..h6 element) */
font-size: 80% }
table.citation {
border-left: solid 1px gray;
margin-left: 1px }
table.docinfo {
margin: 2em 4em }
table.docutils {
margin-top: 0.5em ;
margin-bottom: 0.5em }
table.footnote {
border-left: solid 1px black;
margin-left: 1px }
table.docutils td, table.docutils th,
table.docinfo td, table.docinfo th {
padding-left: 0.5em ;
padding-right: 0.5em ;
vertical-align: top }
table.docutils th.field-name, table.docinfo th.docinfo-name {
font-weight: bold ;
text-align: left ;
white-space: nowrap ;
padding-left: 0 }
/* "booktabs" style (no vertical lines) */
table.docutils.booktabs {
border: 0px;
border-top: 2px solid;
border-bottom: 2px solid;
border-collapse: collapse;
}
table.docutils.booktabs * {
border: 0px;
}
table.docutils.booktabs th {
border-bottom: thin solid;
text-align: left;
}
h1 tt.docutils, h2 tt.docutils, h3 tt.docutils,
h4 tt.docutils, h5 tt.docutils, h6 tt.docutils {
font-size: 100% }
ul.auto-toc {
list-style-type: none }
</style>
</head>
<body>
<div class="document" id="pos-no-cash-bank-statement">
<h1 class="title">POS No Cash Bank Statement</h1>
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:ef561dfd47bf7941f90d56c0bd512d755a9bcb91b95574cfb7314b40aecd7cd1
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<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/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/pos/tree/14.0/pos_no_cash_bank_statement"><img alt="OCA/pos" src="https://img.shields.io/badge/github-OCA%2Fpos-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/pos-14-0/pos-14-0-pos_no_cash_bank_statement"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/pos&amp;target_branch=14.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p>Up to Odoo 12.0, POS sessions generated bank statements for each payment method and therefore closing a POS session would generate payment journal entries for all payment methods.</p>
<p>In Odoo 13.0 and upper, only the cash payment method generate a cash register/bank statement and therefore the payment journal entries. The non-cash payment methods dont generate any payment journal entries.</p>
<p>With this module, you have a new option <strong>Generate Bank Statement</strong> on non-cash POS payment method. If you enable that option, Odoo will generate a bank statement and will generate the payment journal entries upon POS session closing. For example, if your POS accepts payment by check, you certainly want to enable that option for the <em>Check</em> POS payment method.</p>
<p><strong>Table of contents</strong></p>
<div class="contents local topic" id="contents">
<ul class="simple">
<li><a class="reference internal" href="#bug-tracker" id="toc-entry-1">Bug Tracker</a></li>
<li><a class="reference internal" href="#credits" id="toc-entry-2">Credits</a><ul>
<li><a class="reference internal" href="#authors" id="toc-entry-3">Authors</a></li>
<li><a class="reference internal" href="#contributors" id="toc-entry-4">Contributors</a></li>
<li><a class="reference internal" href="#maintainers" id="toc-entry-5">Maintainers</a></li>
</ul>
</li>
</ul>
</div>
<div class="section" id="bug-tracker">
<h1><a class="toc-backref" href="#toc-entry-1">Bug Tracker</a></h1>
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/pos/issues">GitHub Issues</a>.
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
<a class="reference external" href="https://github.com/OCA/pos/issues/new?body=module:%20pos_no_cash_bank_statement%0Aversion:%2014.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>
</div>
<div class="section" id="credits">
<h1><a class="toc-backref" href="#toc-entry-2">Credits</a></h1>
<div class="section" id="authors">
<h2><a class="toc-backref" href="#toc-entry-3">Authors</a></h2>
<ul class="simple">
<li>Akretion</li>
</ul>
</div>
<div class="section" id="contributors">
<h2><a class="toc-backref" href="#toc-entry-4">Contributors</a></h2>
<ul class="simple">
<li>Alexis de Lattre &lt;<a class="reference external" href="mailto:alexis.delattre&#64;akretion.com">alexis.delattre&#64;akretion.com</a>&gt;</li>
</ul>
</div>
<div class="section" id="maintainers">
<h2><a class="toc-backref" href="#toc-entry-5">Maintainers</a></h2>
<p>This module is maintained by the OCA.</p>
<a class="reference external image-reference" href="https://odoo-community.org"><img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" /></a>
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.</p>
<p>Current <a class="reference external" href="https://odoo-community.org/page/maintainer-role">maintainer</a>:</p>
<p><a class="reference external image-reference" href="https://github.com/alexis-via"><img alt="alexis-via" src="https://github.com/alexis-via.png?size=40px" /></a></p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/pos/tree/14.0/pos_no_cash_bank_statement">OCA/pos</a> project on GitHub.</p>
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
</div>
</div>
</div>
</body>
</html>

View File

@ -0,0 +1,31 @@
<?xml version="1.0" encoding="utf-8" ?>
<!--
Copyright 2021 Akretion France (http://www.akretion.com/)
@author: Alexis de Lattre <alexis.delattre@akretion.com>
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
-->
<odoo>
<record id="pos_payment_method_view_form" model="ir.ui.view">
<field name="model">pos.payment.method</field>
<field name="inherit_id" ref="point_of_sale.pos_payment_method_view_form" />
<field name="arch" type="xml">
<field name="cash_journal_id" position="before">
<field name="journal_type_domain" invisible="1" />
<field
name="bank_statement"
attrs="{'invisible': [('is_cash_count', '=', True)]}"
/>
</field>
<field name="cash_journal_id" position="attributes">
<attribute
name="attrs"
>{'invisible': [('is_cash_count', '=', False), ('bank_statement', '=', False)], 'required': ['|', ('is_cash_count', '=', True), ('bank_statement', '=', True)]}</attribute>
<attribute
name="domain"
>[('company_id', '=', company_id), ('type', '=', journal_type_domain)]</attribute>
</field>
</field>
</record>
</odoo>

View File

@ -0,0 +1,149 @@
===============================
Point Of Sale - Change Payments
===============================
..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:6f1462f67df774d51a30919678de62e275d7e3561144dde4841a3cc6893f9cf7
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fpos-lightgray.png?logo=github
:target: https://github.com/OCA/pos/tree/14.0/pos_payment_change
:alt: OCA/pos
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/pos-14-0/pos-14-0-pos_payment_change
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/pos&target_branch=14.0
:alt: Try me on Runboat
|badge1| |badge2| |badge3| |badge4| |badge5|
This module extends the functionnality of the Odoo Point of Sale to
allow the cashier to change the payments of a PoS order.
This feature is usefull when the user realized that he did a mistake,
just after he marked the order as paid, or during the close of the session,
Only if entries has not been generated.
**Table of contents**
.. contents::
:local:
Configuration
=============
* Go to Point of Sale > Configuration > Point of Sale
* Edit your point of sale, and select a value for the field
'Payment Change Policy'.
Two options are available:
* 'Refund and Resale': Odoo will refund the current
Pos Order to cancel it, and create a new PoS Order
with the correct payment lines
* 'Update Payments': Odoo will change payment lines.
.. figure:: https://raw.githubusercontent.com/OCA/pos/14.0/pos_payment_change/static/description/pos_config_form.png
**Note**
In some countries the 'Update Payments' Option
is not allowed by law, because orders history shouldn't not be altered.
For that purpose, a constrains is present to check the value of this
field. If the module ``l10n_fr_certification`` is installed and if the
current company has an inalterable accounting, it will not be possible
to select the value 'Update Payments'.
Usage
=====
* Go to a PoS Order
* Click on the button 'Change Payments'
.. figure:: https://raw.githubusercontent.com/OCA/pos/14.0/pos_payment_change/static/description/pos_order_form.png
* In the pop up wizard, select the real payment(s) that have been
used to pay the order
.. figure:: https://raw.githubusercontent.com/OCA/pos/14.0/pos_payment_change/static/description/pos_payment_change_wizard_form.png
* Then click on the button 'Change Payments'
**Note**
If the option 'Refund and Resale' is selected, changing the payments will
display the three PoS orders. the oringal one, the refund one, and the new one.
.. figure:: https://raw.githubusercontent.com/OCA/pos/14.0/pos_payment_change/static/description/pos_order_tree.png
Bug Tracker
===========
Bugs are tracked on `GitHub Issues <https://github.com/OCA/pos/issues>`_.
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
`feedback <https://github.com/OCA/pos/issues/new?body=module:%20pos_payment_change%0Aversion:%2014.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.
Credits
=======
Authors
~~~~~~~
* GRAP
Contributors
~~~~~~~~~~~~
* Sylvain LE GAL <https://twitter.com/legalsylvain>
* Julien WESTE
* Foram Shah <foram.shah@initos.com>
Other credits
~~~~~~~~~~~~~
The development of this module has been financially supported by:
* GRAP, Groupement Régional Alimentaire de proximité (www.grap.coop)
* Vracoop (www.vracoop.fr)
Maintainers
~~~~~~~~~~~
This module is maintained by the OCA.
.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org
OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.
.. |maintainer-legalsylvain| image:: https://github.com/legalsylvain.png?size=40px
:target: https://github.com/legalsylvain
:alt: legalsylvain
Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:
|maintainer-legalsylvain|
This module is part of the `OCA/pos <https://github.com/OCA/pos/tree/14.0/pos_payment_change>`_ project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

View File

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

View File

@ -0,0 +1,23 @@
# Copyright (C) 2013 - 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).
{
"name": "Point Of Sale - Change Payments",
"version": "14.0.1.0.3",
"summary": "Allow cashier to change order payments, as long as"
" the session is not closed.",
"category": "Odex25-POS/Odex25-POS",
"author": "GRAP, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/pos",
"license": "AGPL-3",
"depends": ["point_of_sale"],
"maintainers": ["legalsylvain"],
"development_status": "Beta",
"data": [
"security/ir.model.access.csv",
"wizards/view_pos_payment_change_wizard.xml",
"views/view_pos_config.xml",
"views/view_pos_order.xml",
],
"installable": True,
}

View File

@ -0,0 +1,255 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * pos_payment_change
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 12.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2021-04-08 07:52+0000\n"
"Last-Translator: André Volksdorf <volksdorf@smartpage.de>\n"
"Language-Team: none\n"
"Language: de\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 4.3.2\n"
#. module: pos_payment_change
#: code:addons/pos_payment_change/models/pos_order.py:0
#, python-format
msgid " (Refund Order: %s ; Resale Order: %s)"
msgstr " (Rückerstattungsauftrag: %s ; Wiederverkaufsauftrag: %s)"
#. module: pos_payment_change
#: model_terms:ir.ui.view,arch_db:pos_payment_change.view_pos_config_form
msgid "<span class=\"o_form_label\">Payment Change Policy</span>"
msgstr "<span class=\"o_form_label\">Richtlinie für Zahlungsänderungen</span>"
#. module: pos_payment_change
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_new_line__amount
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_old_line__amount
msgid "Amount"
msgstr "Betrag"
#. module: pos_payment_change
#: model_terms:ir.ui.view,arch_db:pos_payment_change.view_pos_payment_change_wizard_form
msgid "Cancel"
msgstr "Abbrechen"
#. module: pos_payment_change
#: model:ir.actions.act_window,name:pos_payment_change.action_pos_payment_change_wizard
#: model_terms:ir.ui.view,arch_db:pos_payment_change.view_pos_order_form
#: model_terms:ir.ui.view,arch_db:pos_payment_change.view_pos_payment_change_wizard_form
msgid "Change Payments"
msgstr "Zahlung ändern"
#. module: pos_payment_change
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_new_line__company_currency_id
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_old_line__company_currency_id
msgid "Company Currency"
msgstr "Währung"
#. module: pos_payment_change
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard__create_uid
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_new_line__create_uid
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_old_line__create_uid
msgid "Created by"
msgstr "Erstellt von"
#. module: pos_payment_change
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard__create_date
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_new_line__create_date
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_old_line__create_date
msgid "Created on"
msgstr "Erstellt am"
#. module: pos_payment_change
#: code:addons/pos_payment_change/wizards/pos_payment_change_wizard.py:0
#, python-format
msgid ""
"Differences between the two values for the POS Order '%s':\n"
"\n"
" * Total of all the new payments %s;\n"
" * Total of the POS Order %s;\n"
"\n"
"Please change the payments."
msgstr ""
"Differenzen zwischen den beiden Werten für den POS-Auftrag '%s':\n"
"\n"
" * Summe aller neuen Zahlungen %s;\n"
" * Summe des POS-Auftrags %s;\n"
"\n"
"Bitte ändern Sie die Zahlungen."
#. module: pos_payment_change
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_config__display_name
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_order__display_name
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard__display_name
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_new_line__display_name
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_old_line__display_name
msgid "Display Name"
msgstr "Anzeigename"
#. module: pos_payment_change
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_config__id
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_order__id
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard__id
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_new_line__id
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_old_line__id
msgid "ID"
msgstr "ID"
#. module: pos_payment_change
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_config____last_update
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_order____last_update
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard____last_update
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_new_line____last_update
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_old_line____last_update
msgid "Last Modified on"
msgstr "Zuletzt geändert am"
#. module: pos_payment_change
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard__write_uid
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_new_line__write_uid
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_old_line__write_uid
msgid "Last Updated by"
msgstr "Zuletzt aktualisiert von"
#. module: pos_payment_change
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard__write_date
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_new_line__write_date
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_old_line__write_date
msgid "Last Updated on"
msgstr "Zuletzt aktualisiert am"
#. module: pos_payment_change
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard__new_line_ids
msgid "New Payment Lines"
msgstr "Neue Zahlungslinien"
#. module: pos_payment_change
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard__old_line_ids
msgid "Old Payment Lines"
msgstr "Alte Zahlungslinien"
#. module: pos_payment_change
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard__order_id
msgid "Order"
msgstr "Auftrag"
#. module: pos_payment_change
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_config__payment_change_policy
msgid "Payment Change Policy"
msgstr "Richtlinie für Zahlungsänderungen"
#. module: pos_payment_change
#: model:ir.model.fields,help:pos_payment_change.field_pos_config__payment_change_policy
msgid ""
"Payment Change Policy when users want to change the payment lines of a given "
"PoS Order.\n"
"* 'Refund and Resale': Odoo will refund the current Pos Order to cancel it, "
"and create a new PoS Order with the correct payment lines.\n"
"* 'Update Payments': Odoo will change payment lines.\n"
"\n"
"Note : In some countries the 'Update Payments' Option is not allowed by law, "
"because orders history shouldn't not be altered."
msgstr ""
"Richtlinie für Zahlungsänderungen, wenn Benutzer die Zahlungszeilen eines "
"bestimmten PoS-Auftrags ändern möchten.\n"
"* 'Rückerstattung und Wiederverkauf': Odoo erstattet den aktuellen PoS-"
"Auftrag zurück, um ihn zu stornieren, und erstellt einen neuen PoS-Auftrag "
"mit den korrekten Zahlungszeilen.\n"
"* 'Zahlungen aktualisieren': Odoo wird die Zahlungszeilen ändern.\n"
"\n"
"Hinweis: In einigen Ländern ist die Option 'Zahlungen aktualisieren' "
"gesetzlich nicht erlaubt, da die Bestellhistorie nicht verändert werden darf."
#. module: pos_payment_change
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_new_line__new_payment_method_id
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_old_line__old_payment_method_id
msgid "Payment Method"
msgstr ""
#. module: pos_payment_change
#: model:ir.model,name:pos_payment_change.model_pos_payment_change_wizard
msgid "PoS Payment Change Wizard"
msgstr "PoS-Zahlungsänderungs-Assistent"
#. module: pos_payment_change
#: model:ir.model,name:pos_payment_change.model_pos_payment_change_wizard_new_line
msgid "PoS Payment Change Wizard New Line"
msgstr "PoS-Zahlungsänderungsassistent Neue Zeile"
#. module: pos_payment_change
#: model:ir.model,name:pos_payment_change.model_pos_payment_change_wizard_old_line
msgid "PoS Payment Change Wizard Old Line"
msgstr "PoS-Zahlungsänderungsassistent Alte Zeile"
#. module: pos_payment_change
#: model:ir.model,name:pos_payment_change.model_pos_config
msgid "Point of Sale Configuration"
msgstr "Konfiguration der Verkaufsstelle"
#. module: pos_payment_change
#: model:ir.model,name:pos_payment_change.model_pos_order
msgid "Point of Sale Orders"
msgstr "Bestellungen am Point of Sale"
#. module: pos_payment_change
#: model:ir.model.fields.selection,name:pos_payment_change.selection__pos_config__payment_change_policy__refund
msgid "Refund and Resale"
msgstr "Rückerstattung und Wiederverkauf"
#. module: pos_payment_change
#: code:addons/pos_payment_change/models/pos_order.py:0
#, python-format
msgid "The payments of the Order %s (Ref: %s) has been changed by %s at %s."
msgstr "Die Zahlungen des Auftrags %s (Ref: %s) wurden von %s bei %s geändert."
#. module: pos_payment_change
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard__amount_total
#: model_terms:ir.ui.view,arch_db:pos_payment_change.view_pos_payment_change_wizard_form
msgid "Total"
msgstr "Gesamt"
#. module: pos_payment_change
#: code:addons/pos_payment_change/models/pos_config.py:0
#, python-format
msgid ""
"Unable to use the 'Update Payments' options for companies that have "
"unalterable accounting."
msgstr ""
"Die Optionen 'Zahlungen aktualisieren' können nicht für Firmen mit "
"unveränderlicher Buchhaltung verwendet werden."
#. module: pos_payment_change
#: model:ir.model.fields.selection,name:pos_payment_change.selection__pos_config__payment_change_policy__update
msgid "Update Payments"
msgstr "Zahlungen aktualisieren"
#. module: pos_payment_change
#: model:ir.model.fields,help:pos_payment_change.field_pos_payment_change_wizard_new_line__company_currency_id
#: model:ir.model.fields,help:pos_payment_change.field_pos_payment_change_wizard_old_line__company_currency_id
msgid "Utility field to express amount currency"
msgstr "Utility-Feld zur Angabe der Betragswährung"
#. module: pos_payment_change
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_new_line__wizard_id
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_old_line__wizard_id
msgid "Wizard"
msgstr "Assistent"
#. module: pos_payment_change
#: code:addons/pos_payment_change/models/pos_order.py:0
#, python-format
msgid ""
"You can not change payments of the POS '%s' because the associated session "
"'%s' has been closed!"
msgstr ""
"Sie können Zahlungen der Kasse '%s' nicht ändern, da die zugehörige Sitzung "
"'%s' geschlossen wurde!"
#~ msgid "Journal"
#~ msgstr "Journal"

View File

@ -0,0 +1,255 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * pos_payment_change
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 12.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2020-10-26 11:08+0000\n"
"Last-Translator: Daniel Martinez Vila <daniel.martinez@qubiq.es>\n"
"Language-Team: none\n"
"Language: es\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 3.10\n"
#. module: pos_payment_change
#: code:addons/pos_payment_change/models/pos_order.py:0
#, python-format
msgid " (Refund Order: %s ; Resale Order: %s)"
msgstr " (Orden de reembolso: %s ; Orden de reventa: %s)"
#. module: pos_payment_change
#: model_terms:ir.ui.view,arch_db:pos_payment_change.view_pos_config_form
msgid "<span class=\"o_form_label\">Payment Change Policy</span>"
msgstr "<span class = \"o_form_label\">Política de cambio de pago</span>"
#. module: pos_payment_change
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_new_line__amount
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_old_line__amount
msgid "Amount"
msgstr "Importe"
#. module: pos_payment_change
#: model_terms:ir.ui.view,arch_db:pos_payment_change.view_pos_payment_change_wizard_form
msgid "Cancel"
msgstr "Cancelar"
#. module: pos_payment_change
#: model:ir.actions.act_window,name:pos_payment_change.action_pos_payment_change_wizard
#: model_terms:ir.ui.view,arch_db:pos_payment_change.view_pos_order_form
#: model_terms:ir.ui.view,arch_db:pos_payment_change.view_pos_payment_change_wizard_form
msgid "Change Payments"
msgstr "Cambiar pagos"
#. module: pos_payment_change
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_new_line__company_currency_id
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_old_line__company_currency_id
msgid "Company Currency"
msgstr "Moneda de la compañía"
#. module: pos_payment_change
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard__create_uid
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_new_line__create_uid
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_old_line__create_uid
msgid "Created by"
msgstr "Creado por"
#. module: pos_payment_change
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard__create_date
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_new_line__create_date
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_old_line__create_date
msgid "Created on"
msgstr "Creado el"
#. module: pos_payment_change
#: code:addons/pos_payment_change/wizards/pos_payment_change_wizard.py:0
#, python-format
msgid ""
"Differences between the two values for the POS Order '%s':\n"
"\n"
" * Total of all the new payments %s;\n"
" * Total of the POS Order %s;\n"
"\n"
"Please change the payments."
msgstr ""
"Diferencias entre los dos valores para la orden PdV '%s':\n"
"\n"
" * Total de todos los nuevos pagos %s;\n"
" * Total del pedido del punto de venta %s;\n"
"\n"
"Por favor cambie los pagos."
#. module: pos_payment_change
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_config__display_name
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_order__display_name
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard__display_name
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_new_line__display_name
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_old_line__display_name
msgid "Display Name"
msgstr "Nombre a mostrar"
#. module: pos_payment_change
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_config__id
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_order__id
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard__id
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_new_line__id
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_old_line__id
msgid "ID"
msgstr "ID"
#. module: pos_payment_change
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_config____last_update
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_order____last_update
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard____last_update
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_new_line____last_update
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_old_line____last_update
msgid "Last Modified on"
msgstr "Última modificación en"
#. module: pos_payment_change
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard__write_uid
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_new_line__write_uid
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_old_line__write_uid
msgid "Last Updated by"
msgstr "Última actualización por"
#. module: pos_payment_change
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard__write_date
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_new_line__write_date
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_old_line__write_date
msgid "Last Updated on"
msgstr "Última actualización el"
#. module: pos_payment_change
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard__new_line_ids
msgid "New Payment Lines"
msgstr "Nuevas líneas de pago"
#. module: pos_payment_change
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard__old_line_ids
msgid "Old Payment Lines"
msgstr "Viejas líneas de pago"
#. module: pos_payment_change
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard__order_id
msgid "Order"
msgstr "Orden"
#. module: pos_payment_change
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_config__payment_change_policy
msgid "Payment Change Policy"
msgstr "Política de cambio de pago"
#. module: pos_payment_change
#: model:ir.model.fields,help:pos_payment_change.field_pos_config__payment_change_policy
msgid ""
"Payment Change Policy when users want to change the payment lines of a given "
"PoS Order.\n"
"* 'Refund and Resale': Odoo will refund the current Pos Order to cancel it, "
"and create a new PoS Order with the correct payment lines.\n"
"* 'Update Payments': Odoo will change payment lines.\n"
"\n"
"Note : In some countries the 'Update Payments' Option is not allowed by law, "
"because orders history shouldn't not be altered."
msgstr ""
"Política de cambio de pago cuando los usuarios desean cambiar las líneas de "
"pago de un pedido PdV determinado.\n"
"* 'Reembolso y reventa': Odoo reembolsará el pedido de posición actual para "
"cancelarlo y creará un nuevo pedido de PoS con las líneas de pago "
"correctas.\n"
"* 'Actualizar pagos': Odoo cambiará las líneas de pago.\n"
"\n"
"Nota: En algunos países, la opción 'Actualizar pagos' no está permitida por "
"ley, ya que el historial de pedidos no debe modificarse."
#. module: pos_payment_change
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_new_line__new_payment_method_id
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_old_line__old_payment_method_id
msgid "Payment Method"
msgstr ""
#. module: pos_payment_change
#: model:ir.model,name:pos_payment_change.model_pos_payment_change_wizard
msgid "PoS Payment Change Wizard"
msgstr "Asistente de cambio de pago del PdV"
#. module: pos_payment_change
#: model:ir.model,name:pos_payment_change.model_pos_payment_change_wizard_new_line
msgid "PoS Payment Change Wizard New Line"
msgstr "Asistente de cambio de pago de una nueva línea del PdV"
#. module: pos_payment_change
#: model:ir.model,name:pos_payment_change.model_pos_payment_change_wizard_old_line
msgid "PoS Payment Change Wizard Old Line"
msgstr "Asistente de cambio de pago de una línea antigua del PdV"
#. module: pos_payment_change
#: model:ir.model,name:pos_payment_change.model_pos_config
msgid "Point of Sale Configuration"
msgstr "Configuración del punto de venta"
#. module: pos_payment_change
#: model:ir.model,name:pos_payment_change.model_pos_order
msgid "Point of Sale Orders"
msgstr "Pedidos de Punto de Venta"
#. module: pos_payment_change
#: model:ir.model.fields.selection,name:pos_payment_change.selection__pos_config__payment_change_policy__refund
msgid "Refund and Resale"
msgstr "Reembolso y reventa"
#. module: pos_payment_change
#: code:addons/pos_payment_change/models/pos_order.py:0
#, python-format
msgid "The payments of the Order %s (Ref: %s) has been changed by %s at %s."
msgstr "Los pagos de la orden %s (Ref: %s) han sido modificados por %s en %s."
#. module: pos_payment_change
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard__amount_total
#: model_terms:ir.ui.view,arch_db:pos_payment_change.view_pos_payment_change_wizard_form
msgid "Total"
msgstr "Total"
#. module: pos_payment_change
#: code:addons/pos_payment_change/models/pos_config.py:0
#, python-format
msgid ""
"Unable to use the 'Update Payments' options for companies that have "
"unalterable accounting."
msgstr ""
"No se pueden usar las opciones de 'Actualizar pagos' para empresas que "
"tienen contabilidad inalterable."
#. module: pos_payment_change
#: model:ir.model.fields.selection,name:pos_payment_change.selection__pos_config__payment_change_policy__update
msgid "Update Payments"
msgstr "Actualizar pagos"
#. module: pos_payment_change
#: model:ir.model.fields,help:pos_payment_change.field_pos_payment_change_wizard_new_line__company_currency_id
#: model:ir.model.fields,help:pos_payment_change.field_pos_payment_change_wizard_old_line__company_currency_id
msgid "Utility field to express amount currency"
msgstr "Campo de utilidad para expresar la cantidad de la moneda"
#. module: pos_payment_change
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_new_line__wizard_id
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_old_line__wizard_id
msgid "Wizard"
msgstr "Asistente"
#. module: pos_payment_change
#: code:addons/pos_payment_change/models/pos_order.py:0
#, python-format
msgid ""
"You can not change payments of the POS '%s' because the associated session "
"'%s' has been closed!"
msgstr ""
"¡No puede cambiar los pagos del PdV '%s' porque la sesión asociada '%s' se "
"ha cerrado!"
#~ msgid "Journal"
#~ msgstr "Diario"

View File

@ -0,0 +1,257 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * pos_payment_change
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 12.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-05-18 17:33+0000\n"
"PO-Revision-Date: 2020-05-18 17:33+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
#. module: pos_payment_change
#: code:addons/pos_payment_change/models/pos_order.py:0
#, python-format
msgid " (Refund Order: %s ; Resale Order: %s)"
msgstr " (Remboursement: %s ; Revente : %s)"
#. module: pos_payment_change
#: model_terms:ir.ui.view,arch_db:pos_payment_change.view_pos_config_form
msgid "<span class=\"o_form_label\">Payment Change Policy</span>"
msgstr "<span class=\"o_form_label\">Méthode de changement de paiement</span>"
#. module: pos_payment_change
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_new_line__amount
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_old_line__amount
msgid "Amount"
msgstr "Montant"
#. module: pos_payment_change
#: model_terms:ir.ui.view,arch_db:pos_payment_change.view_pos_payment_change_wizard_form
msgid "Cancel"
msgstr "Annuler"
#. module: pos_payment_change
#: model:ir.actions.act_window,name:pos_payment_change.action_pos_payment_change_wizard
#: model_terms:ir.ui.view,arch_db:pos_payment_change.view_pos_order_form
#: model_terms:ir.ui.view,arch_db:pos_payment_change.view_pos_payment_change_wizard_form
msgid "Change Payments"
msgstr "Changer les paiements"
#. module: pos_payment_change
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_new_line__company_currency_id
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_old_line__company_currency_id
msgid "Company Currency"
msgstr ""
#. module: pos_payment_change
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard__create_uid
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_new_line__create_uid
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_old_line__create_uid
msgid "Created by"
msgstr "Créé par"
#. module: pos_payment_change
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard__create_date
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_new_line__create_date
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_old_line__create_date
msgid "Created on"
msgstr "Créé le"
#. module: pos_payment_change
#: code:addons/pos_payment_change/wizards/pos_payment_change_wizard.py:0
#, python-format
msgid ""
"Differences between the two values for the POS Order '%s':\n"
"\n"
" * Total of all the new payments %s;\n"
" * Total of the POS Order %s;\n"
"\n"
"Please change the payments."
msgstr ""
"Différences entre les deux valeurs pour la vente '%s':\n"
"\n"
" * Total des nouveaux paiements %s;\n"
" * Total de la vente %s;\n"
"\n"
"Veuillez changer les paiements."
#. module: pos_payment_change
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_config__display_name
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_order__display_name
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard__display_name
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_new_line__display_name
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_old_line__display_name
msgid "Display Name"
msgstr "Nom affiché"
#. module: pos_payment_change
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_config__id
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_order__id
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard__id
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_new_line__id
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_old_line__id
msgid "ID"
msgstr "ID"
#. module: pos_payment_change
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_config____last_update
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_order____last_update
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard____last_update
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_new_line____last_update
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_old_line____last_update
msgid "Last Modified on"
msgstr "Dernière modification le"
#. module: pos_payment_change
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard__write_uid
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_new_line__write_uid
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_old_line__write_uid
msgid "Last Updated by"
msgstr "Dernière mise à jour par"
#. module: pos_payment_change
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard__write_date
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_new_line__write_date
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_old_line__write_date
msgid "Last Updated on"
msgstr "Dernière mise à jour le"
#. module: pos_payment_change
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard__new_line_ids
msgid "New Payment Lines"
msgstr "Nouveaux paiements"
#. module: pos_payment_change
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard__old_line_ids
msgid "Old Payment Lines"
msgstr "Anciens paiements"
#. module: pos_payment_change
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard__order_id
msgid "Order"
msgstr "Commande"
#. module: pos_payment_change
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_config__payment_change_policy
msgid "Payment Change Policy"
msgstr "Méthode de changement de paiement"
#. module: pos_payment_change
#: model:ir.model.fields,help:pos_payment_change.field_pos_config__payment_change_policy
msgid ""
"Payment Change Policy when users want to change the payment lines of a given "
"PoS Order.\n"
"* 'Refund and Resale': Odoo will refund the current Pos Order to cancel it, "
"and create a new PoS Order with the correct payment lines.\n"
"* 'Update Payments': Odoo will change payment lines.\n"
"\n"
"Note : In some countries the 'Update Payments' Option is not allowed by law, "
"because orders history shouldn't not be altered."
msgstr ""
"Méthode de changement de paiement quand les utilisateurs veulent changer des "
"lignes de paiement d'une vente en caisse.\n"
"* 'Retourner et revendre': Odoo va réaliser un retour du la vente pour "
"l'annuler, puis recréera une nouvelle vente, avec les paiements corrects.\n"
"* 'Modifier les paiements': Odoo va changer les lignes de paiements.\n"
"\n"
"Note : dans certains pays, l'option 'Modifier les paiements' n'est pas "
"autorisé par la loi, parce que l'historique des ventes ne doit pas être "
"altéré."
#. module: pos_payment_change
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_new_line__new_payment_method_id
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_old_line__old_payment_method_id
msgid "Payment Method"
msgstr ""
#. module: pos_payment_change
#: model:ir.model,name:pos_payment_change.model_pos_payment_change_wizard
msgid "PoS Payment Change Wizard"
msgstr "Assistant de changement de paiement du Point de Vente"
#. module: pos_payment_change
#: model:ir.model,name:pos_payment_change.model_pos_payment_change_wizard_new_line
msgid "PoS Payment Change Wizard New Line"
msgstr ""
"Nouvelle ligne de l'ssistant de changement de paiement du Point de Vente"
#. module: pos_payment_change
#: model:ir.model,name:pos_payment_change.model_pos_payment_change_wizard_old_line
msgid "PoS Payment Change Wizard Old Line"
msgstr ""
"Ancienne ligne de l'ssistant de changement de paiement du Point de Vente"
#. module: pos_payment_change
#: model:ir.model,name:pos_payment_change.model_pos_config
msgid "Point of Sale Configuration"
msgstr "Paramétrage du point de vente"
#. module: pos_payment_change
#: model:ir.model,name:pos_payment_change.model_pos_order
msgid "Point of Sale Orders"
msgstr "Commandes du point de vente"
#. module: pos_payment_change
#: model:ir.model.fields.selection,name:pos_payment_change.selection__pos_config__payment_change_policy__refund
msgid "Refund and Resale"
msgstr "Retourner et revendre"
#. module: pos_payment_change
#: code:addons/pos_payment_change/models/pos_order.py:0
#, python-format
msgid "The payments of the Order %s (Ref: %s) has been changed by %s at %s."
msgstr "Les paiements de la commande %s (Réf: %s) ont été changés par %s à %s."
#. module: pos_payment_change
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard__amount_total
#: model_terms:ir.ui.view,arch_db:pos_payment_change.view_pos_payment_change_wizard_form
msgid "Total"
msgstr "Total"
#. module: pos_payment_change
#: code:addons/pos_payment_change/models/pos_config.py:0
#, python-format
msgid ""
"Unable to use the 'Update Payments' options for companies that have "
"unalterable accounting."
msgstr ""
"Impossible d'utiliser l'option 'Modifier les paiements' pour les sociétés "
"qui ont une comptabilité inaltérable."
#. module: pos_payment_change
#: model:ir.model.fields.selection,name:pos_payment_change.selection__pos_config__payment_change_policy__update
msgid "Update Payments"
msgstr "Modifier les paiements"
#. module: pos_payment_change
#: model:ir.model.fields,help:pos_payment_change.field_pos_payment_change_wizard_new_line__company_currency_id
#: model:ir.model.fields,help:pos_payment_change.field_pos_payment_change_wizard_old_line__company_currency_id
msgid "Utility field to express amount currency"
msgstr ""
#. module: pos_payment_change
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_new_line__wizard_id
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_old_line__wizard_id
msgid "Wizard"
msgstr "Assistant"
#. module: pos_payment_change
#: code:addons/pos_payment_change/models/pos_order.py:0
#, python-format
msgid ""
"You can not change payments of the POS '%s' because the associated session "
"'%s' has been closed!"
msgstr ""
"Vous ne pouvez pas changer les paiements de la Vente '%s' car la session "
"associée '%s' a été clôturé !"
#~ msgid "Journal"
#~ msgstr "Journal"

View File

@ -0,0 +1,252 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * pos_payment_change
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 14.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2023-05-22 12:09+0000\n"
"Last-Translator: mymage <stefano.consolaro@mymage.it>\n"
"Language-Team: none\n"
"Language: it\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 4.17\n"
#. module: pos_payment_change
#: code:addons/pos_payment_change/models/pos_order.py:0
#, python-format
msgid " (Refund Order: %s ; Resale Order: %s)"
msgstr " (Ordine rimborsato: %s ; ordine rivenduto: %s)"
#. module: pos_payment_change
#: model_terms:ir.ui.view,arch_db:pos_payment_change.view_pos_config_form
msgid "<span class=\"o_form_label\">Payment Change Policy</span>"
msgstr "<span class=\"o_form_label\">Politica modifica pagamento</span>"
#. module: pos_payment_change
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_new_line__amount
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_old_line__amount
msgid "Amount"
msgstr "Valore"
#. module: pos_payment_change
#: model_terms:ir.ui.view,arch_db:pos_payment_change.view_pos_payment_change_wizard_form
msgid "Cancel"
msgstr "Annulla"
#. module: pos_payment_change
#: model:ir.actions.act_window,name:pos_payment_change.action_pos_payment_change_wizard
#: model_terms:ir.ui.view,arch_db:pos_payment_change.view_pos_order_form
#: model_terms:ir.ui.view,arch_db:pos_payment_change.view_pos_payment_change_wizard_form
msgid "Change Payments"
msgstr "Modifica pagamenti"
#. module: pos_payment_change
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_new_line__company_currency_id
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_old_line__company_currency_id
msgid "Company Currency"
msgstr "Valuta aziendale"
#. module: pos_payment_change
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard__create_uid
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_new_line__create_uid
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_old_line__create_uid
msgid "Created by"
msgstr "Creato da"
#. module: pos_payment_change
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard__create_date
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_new_line__create_date
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_old_line__create_date
msgid "Created on"
msgstr "Creato il"
#. module: pos_payment_change
#: code:addons/pos_payment_change/wizards/pos_payment_change_wizard.py:0
#, python-format
msgid ""
"Differences between the two values for the POS Order '%s':\n"
"\n"
" * Total of all the new payments %s;\n"
" * Total of the POS Order %s;\n"
"\n"
"Please change the payments."
msgstr ""
"Differenze tra i due valori per l'ordine POS '%s':\n"
"\n"
" * Totale di tutti i nuovi pagamenti %s;\n"
" * Totale dell'ordine POS %s;\n"
"\n"
"Si prega di modificare i pagamenti."
#. module: pos_payment_change
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_config__display_name
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_order__display_name
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard__display_name
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_new_line__display_name
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_old_line__display_name
msgid "Display Name"
msgstr "Nome visualizzato"
#. module: pos_payment_change
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_config__id
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_order__id
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard__id
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_new_line__id
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_old_line__id
msgid "ID"
msgstr "ID"
#. module: pos_payment_change
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_config____last_update
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_order____last_update
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard____last_update
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_new_line____last_update
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_old_line____last_update
msgid "Last Modified on"
msgstr "Ultima modifica il"
#. module: pos_payment_change
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard__write_uid
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_new_line__write_uid
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_old_line__write_uid
msgid "Last Updated by"
msgstr "Ultimo aggiornamento di"
#. module: pos_payment_change
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard__write_date
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_new_line__write_date
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_old_line__write_date
msgid "Last Updated on"
msgstr "Ultimo aggiornamento il"
#. module: pos_payment_change
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard__new_line_ids
msgid "New Payment Lines"
msgstr "Righe nuovo pagamento"
#. module: pos_payment_change
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard__old_line_ids
msgid "Old Payment Lines"
msgstr "Righe vecchio pagamento"
#. module: pos_payment_change
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard__order_id
msgid "Order"
msgstr "Ordine"
#. module: pos_payment_change
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_config__payment_change_policy
msgid "Payment Change Policy"
msgstr "Politica modifica pagamento"
#. module: pos_payment_change
#: model:ir.model.fields,help:pos_payment_change.field_pos_config__payment_change_policy
msgid ""
"Payment Change Policy when users want to change the payment lines of a given "
"PoS Order.\n"
"* 'Refund and Resale': Odoo will refund the current Pos Order to cancel it, "
"and create a new PoS Order with the correct payment lines.\n"
"* 'Update Payments': Odoo will change payment lines.\n"
"\n"
"Note : In some countries the 'Update Payments' Option is not allowed by law, "
"because orders history shouldn't not be altered."
msgstr ""
"Politica modifica del pagamento quando gli utenti vogliono modificare le "
"righe del pagamento.\n"
"* 'Rimborsa e rivendi': Odoo rimborserà l'ordine PoS attuale per annullarlo "
"e creerà un nuovo ordine PoS con le righe di pagamento corrette.\n"
"* 'Aggiorna pagamenti': Odoo modificherà le righe pagamento.\n"
"\n"
"Nota : in alcune nazioni l'opzione 'Aggiorna pagamenti' non è consentita "
"dalla legge perché lo storico degli ordini non deve essere modificato."
#. module: pos_payment_change
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_new_line__new_payment_method_id
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_old_line__old_payment_method_id
msgid "Payment Method"
msgstr "Metodo di pagamento"
#. module: pos_payment_change
#: model:ir.model,name:pos_payment_change.model_pos_payment_change_wizard
msgid "PoS Payment Change Wizard"
msgstr "Procedura guidata modifica pagamento PoS"
#. module: pos_payment_change
#: model:ir.model,name:pos_payment_change.model_pos_payment_change_wizard_new_line
msgid "PoS Payment Change Wizard New Line"
msgstr "Nuova riga procedura guidata modifica pagamento PoS"
#. module: pos_payment_change
#: model:ir.model,name:pos_payment_change.model_pos_payment_change_wizard_old_line
msgid "PoS Payment Change Wizard Old Line"
msgstr "Vecchia riga procedura guidata modifica pagamento PoS"
#. module: pos_payment_change
#: model:ir.model,name:pos_payment_change.model_pos_config
msgid "Point of Sale Configuration"
msgstr "Configurazione punto vendita"
#. module: pos_payment_change
#: model:ir.model,name:pos_payment_change.model_pos_order
msgid "Point of Sale Orders"
msgstr "Ordini punto vendita"
#. module: pos_payment_change
#: model:ir.model.fields.selection,name:pos_payment_change.selection__pos_config__payment_change_policy__refund
msgid "Refund and Resale"
msgstr "Rimborsa e rivendi"
#. module: pos_payment_change
#: code:addons/pos_payment_change/models/pos_order.py:0
#, python-format
msgid "The payments of the Order %s (Ref: %s) has been changed by %s at %s."
msgstr ""
"Il pagamento dell'ordine %s (Rif: %s) è stato modificato da %s alle %s."
#. module: pos_payment_change
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard__amount_total
#: model_terms:ir.ui.view,arch_db:pos_payment_change.view_pos_payment_change_wizard_form
msgid "Total"
msgstr "Totale"
#. module: pos_payment_change
#: code:addons/pos_payment_change/models/pos_config.py:0
#, python-format
msgid ""
"Unable to use the 'Update Payments' options for companies that have "
"unalterable accounting."
msgstr ""
"Impossibile utilizzare l'opzione 'Aggiorna pagamenti' per le nazioni che "
"hanno la contabilità inalterabile."
#. module: pos_payment_change
#: model:ir.model.fields.selection,name:pos_payment_change.selection__pos_config__payment_change_policy__update
msgid "Update Payments"
msgstr "Aggiorna pagamenti"
#. module: pos_payment_change
#: model:ir.model.fields,help:pos_payment_change.field_pos_payment_change_wizard_new_line__company_currency_id
#: model:ir.model.fields,help:pos_payment_change.field_pos_payment_change_wizard_old_line__company_currency_id
msgid "Utility field to express amount currency"
msgstr "Campo utilità per esprimere la valuta del valore"
#. module: pos_payment_change
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_new_line__wizard_id
#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_old_line__wizard_id
msgid "Wizard"
msgstr "Procedura guidata"
#. module: pos_payment_change
#: code:addons/pos_payment_change/models/pos_order.py:0
#, python-format
msgid ""
"You can not change payments of the POS '%s' because the associated session "
"'%s' has been closed!"
msgstr ""
"Non si possono modificare i pagamenti del POS '%s' perché la sessione "
"associata '%s' è stata chiusa!"

View File

@ -0,0 +1,2 @@
from . import pos_config
from . import pos_order

View File

@ -0,0 +1,51 @@
# Copyright (C) 2020 - 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 _, api, fields, models
from odoo.exceptions import ValidationError
class PosConfig(models.Model):
_inherit = "pos.config"
_PAYMENT_CHANGE_POLICY_SELECTION = [
("refund", "Refund and Resale"),
("update", "Update Payments"),
]
payment_change_policy = fields.Selection(
selection=_PAYMENT_CHANGE_POLICY_SELECTION,
default="refund",
required=True,
help="Payment Change Policy when users want"
" to change the payment lines of a given PoS Order.\n"
"* 'Refund and Resale': Odoo will refund the current"
" Pos Order to cancel it, and create a new PoS Order"
" with the correct payment lines.\n"
"* 'Update Payments': Odoo will change payment lines.\n\n"
"Note : In some countries the 'Update Payments' Option"
" is not allowed by law, because orders history shouldn't"
" not be altered.",
)
@api.constrains("payment_change_policy")
def _check_payment_change_policy(self):
# Check if certification module is installed
# and if yes, if 'update payments' option is allowed
module_states = (
self.env["ir.module.module"]
.sudo()
.search([("name", "=", "l10n_fr_certification")])
.mapped("state")
)
if "installed" not in module_states:
return
for config in self.filtered(lambda x: x.payment_change_policy == "update"):
if config.company_id._is_accounting_unalterable():
raise ValidationError(
_(
"Unable to use the 'Update Payments' options"
" for companies that have unalterable accounting."
)
)

View File

@ -0,0 +1,103 @@
# Copyright (C) 2015 - Today: GRAP (http://www.grap.coop)
# @author: Julien WESTE
# @author: Sylvain LE GAL (https://twitter.com/legalsylvain)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from datetime import datetime
from odoo import _, fields, models
from odoo.exceptions import Warning as UserError
from odoo.tools import float_is_zero
class PosOrder(models.Model):
_inherit = "pos.order"
def change_payment(self, payment_lines):
"""
Change payment of a given order.
payment_lines should be a list of data that are
the argument of the Odoo Core function add_payment()
Return a list of order ids, depending on the
payment_change_policy of the related pos_config.
"""
self.ensure_one()
orders = self
# Removing zero lines
precision = self.pricelist_id.currency_id.decimal_places
payment_lines = [
x
for x in payment_lines
if not float_is_zero(x["amount"], precision_digits=precision)
]
self._check_payment_change_allowed()
comment = _(
"The payments of the Order %s (Ref: %s) has been changed"
" by %s at %s."
% (
self.name,
self.pos_reference,
self.env.user.name,
datetime.today(),
)
)
if self.config_id.payment_change_policy == "update":
self.payment_ids.with_context().unlink()
# Create new payment
for line in payment_lines:
self.add_payment(line)
elif self.config_id.payment_change_policy == "refund":
# Refund order and mark it as paid
# with same payment method as the original one
refund_result = self.refund()
refund_order = self.browse(refund_result["res_id"])
for payment in self.payment_ids:
refund_order.add_payment(
{
"pos_order_id": refund_order.id,
"payment_method_id": payment.payment_method_id.id,
"amount": -payment.amount,
"payment_date": fields.Date.context_today(self),
}
)
refund_order.action_pos_order_paid()
# Resale order and mark it as paid
# with the new payment
resale_order = self.copy(default={"pos_reference": self.pos_reference})
for line in payment_lines:
line.update({"pos_order_id": resale_order.id})
resale_order.add_payment(line)
resale_order.action_pos_order_paid()
orders += refund_order + resale_order
comment += _(
" (Refund Order: %s ; Resale Order: %s)"
% (refund_order.name, resale_order.name)
)
for order in orders:
order.note = "%s\n%s" % (order.note or "", comment)
return orders
def _check_payment_change_allowed(self):
"""Return True if the user can change the payment of a POS, depending
of the state of the current session."""
closed_orders = self.filtered(lambda x: x.session_id.state == "closed")
if len(closed_orders):
raise UserError(
_(
"You can not change payments of the POS '%s' because"
" the associated session '%s' has been closed!"
% (
", ".join(closed_orders.mapped("name")),
", ".join(closed_orders.mapped("session_id.name")),
)
)
)

View File

@ -0,0 +1,23 @@
* Go to Point of Sale > Configuration > Point of Sale
* Edit your point of sale, and select a value for the field
'Payment Change Policy'.
Two options are available:
* 'Refund and Resale': Odoo will refund the current
Pos Order to cancel it, and create a new PoS Order
with the correct payment lines
* 'Update Payments': Odoo will change payment lines.
.. figure:: ../static/description/pos_config_form.png
**Note**
In some countries the 'Update Payments' Option
is not allowed by law, because orders history shouldn't not be altered.
For that purpose, a constrains is present to check the value of this
field. If the module ``l10n_fr_certification`` is installed and if the
current company has an inalterable accounting, it will not be possible
to select the value 'Update Payments'.

View File

@ -0,0 +1,3 @@
* Sylvain LE GAL <https://twitter.com/legalsylvain>
* Julien WESTE
* Foram Shah <foram.shah@initos.com>

View File

@ -0,0 +1,4 @@
The development of this module has been financially supported by:
* GRAP, Groupement Régional Alimentaire de proximité (www.grap.coop)
* Vracoop (www.vracoop.fr)

View File

@ -0,0 +1,6 @@
This module extends the functionnality of the Odoo Point of Sale to
allow the cashier to change the payments of a PoS order.
This feature is usefull when the user realized that he did a mistake,
just after he marked the order as paid, or during the close of the session,
Only if entries has not been generated.

View File

@ -0,0 +1,19 @@
* Go to a PoS Order
* Click on the button 'Change Payments'
.. figure:: ../static/description/pos_order_form.png
* In the pop up wizard, select the real payment(s) that have been
used to pay the order
.. figure:: ../static/description/pos_payment_change_wizard_form.png
* Then click on the button 'Change Payments'
**Note**
If the option 'Refund and Resale' is selected, changing the payments will
display the three PoS orders. the oringal one, the refund one, and the new one.
.. figure:: ../static/description/pos_order_tree.png

View File

@ -0,0 +1,4 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_pos_payment_change_wizard,access_pos_payment_change_wizard,model_pos_payment_change_wizard,base.group_user,1,1,1,1
access_pos_payment_change_wizard_new_line,access_pos_payment_change_wizard_new_line,model_pos_payment_change_wizard_new_line,base.group_user,1,1,1,1
access_pos_payment_change_wizard_old_line,access_pos_payment_change_wizard_old_line,model_pos_payment_change_wizard_old_line,base.group_user,1,1,1,1
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
2 access_pos_payment_change_wizard access_pos_payment_change_wizard model_pos_payment_change_wizard base.group_user 1 1 1 1
3 access_pos_payment_change_wizard_new_line access_pos_payment_change_wizard_new_line model_pos_payment_change_wizard_new_line base.group_user 1 1 1 1
4 access_pos_payment_change_wizard_old_line access_pos_payment_change_wizard_old_line model_pos_payment_change_wizard_old_line base.group_user 1 1 1 1

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

View File

@ -0,0 +1,490 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils: https://docutils.sourceforge.io/" />
<title>Point Of Sale - Change Payments</title>
<style type="text/css">
/*
:Author: David Goodger (goodger@python.org)
:Id: $Id: html4css1.css 8954 2022-01-20 10:10:25Z milde $
:Copyright: This stylesheet has been placed in the public domain.
Default cascading style sheet for the HTML output of Docutils.
See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to
customize this style sheet.
*/
/* used to remove borders from tables and images */
.borderless, table.borderless td, table.borderless th {
border: 0 }
table.borderless td, table.borderless th {
/* Override padding for "table.docutils td" with "! important".
The right padding separates the table cells. */
padding: 0 0.5em 0 0 ! important }
.first {
/* Override more specific margin styles with "! important". */
margin-top: 0 ! important }
.last, .with-subtitle {
margin-bottom: 0 ! important }
.hidden {
display: none }
.subscript {
vertical-align: sub;
font-size: smaller }
.superscript {
vertical-align: super;
font-size: smaller }
a.toc-backref {
text-decoration: none ;
color: black }
blockquote.epigraph {
margin: 2em 5em ; }
dl.docutils dd {
margin-bottom: 0.5em }
object[type="image/svg+xml"], object[type="application/x-shockwave-flash"] {
overflow: hidden;
}
/* Uncomment (and remove this text!) to get bold-faced definition list terms
dl.docutils dt {
font-weight: bold }
*/
div.abstract {
margin: 2em 5em }
div.abstract p.topic-title {
font-weight: bold ;
text-align: center }
div.admonition, div.attention, div.caution, div.danger, div.error,
div.hint, div.important, div.note, div.tip, div.warning {
margin: 2em ;
border: medium outset ;
padding: 1em }
div.admonition p.admonition-title, div.hint p.admonition-title,
div.important p.admonition-title, div.note p.admonition-title,
div.tip p.admonition-title {
font-weight: bold ;
font-family: sans-serif }
div.attention p.admonition-title, div.caution p.admonition-title,
div.danger p.admonition-title, div.error p.admonition-title,
div.warning p.admonition-title, .code .error {
color: red ;
font-weight: bold ;
font-family: sans-serif }
/* Uncomment (and remove this text!) to get reduced vertical space in
compound paragraphs.
div.compound .compound-first, div.compound .compound-middle {
margin-bottom: 0.5em }
div.compound .compound-last, div.compound .compound-middle {
margin-top: 0.5em }
*/
div.dedication {
margin: 2em 5em ;
text-align: center ;
font-style: italic }
div.dedication p.topic-title {
font-weight: bold ;
font-style: normal }
div.figure {
margin-left: 2em ;
margin-right: 2em }
div.footer, div.header {
clear: both;
font-size: smaller }
div.line-block {
display: block ;
margin-top: 1em ;
margin-bottom: 1em }
div.line-block div.line-block {
margin-top: 0 ;
margin-bottom: 0 ;
margin-left: 1.5em }
div.sidebar {
margin: 0 0 0.5em 1em ;
border: medium outset ;
padding: 1em ;
background-color: #ffffee ;
width: 40% ;
float: right ;
clear: right }
div.sidebar p.rubric {
font-family: sans-serif ;
font-size: medium }
div.system-messages {
margin: 5em }
div.system-messages h1 {
color: red }
div.system-message {
border: medium outset ;
padding: 1em }
div.system-message p.system-message-title {
color: red ;
font-weight: bold }
div.topic {
margin: 2em }
h1.section-subtitle, h2.section-subtitle, h3.section-subtitle,
h4.section-subtitle, h5.section-subtitle, h6.section-subtitle {
margin-top: 0.4em }
h1.title {
text-align: center }
h2.subtitle {
text-align: center }
hr.docutils {
width: 75% }
img.align-left, .figure.align-left, object.align-left, table.align-left {
clear: left ;
float: left ;
margin-right: 1em }
img.align-right, .figure.align-right, object.align-right, table.align-right {
clear: right ;
float: right ;
margin-left: 1em }
img.align-center, .figure.align-center, object.align-center {
display: block;
margin-left: auto;
margin-right: auto;
}
table.align-center {
margin-left: auto;
margin-right: auto;
}
.align-left {
text-align: left }
.align-center {
clear: both ;
text-align: center }
.align-right {
text-align: right }
/* reset inner alignment in figures */
div.align-right {
text-align: inherit }
/* div.align-center * { */
/* text-align: left } */
.align-top {
vertical-align: top }
.align-middle {
vertical-align: middle }
.align-bottom {
vertical-align: bottom }
ol.simple, ul.simple {
margin-bottom: 1em }
ol.arabic {
list-style: decimal }
ol.loweralpha {
list-style: lower-alpha }
ol.upperalpha {
list-style: upper-alpha }
ol.lowerroman {
list-style: lower-roman }
ol.upperroman {
list-style: upper-roman }
p.attribution {
text-align: right ;
margin-left: 50% }
p.caption {
font-style: italic }
p.credits {
font-style: italic ;
font-size: smaller }
p.label {
white-space: nowrap }
p.rubric {
font-weight: bold ;
font-size: larger ;
color: maroon ;
text-align: center }
p.sidebar-title {
font-family: sans-serif ;
font-weight: bold ;
font-size: larger }
p.sidebar-subtitle {
font-family: sans-serif ;
font-weight: bold }
p.topic-title {
font-weight: bold }
pre.address {
margin-bottom: 0 ;
margin-top: 0 ;
font: inherit }
pre.literal-block, pre.doctest-block, pre.math, pre.code {
margin-left: 2em ;
margin-right: 2em }
pre.code .ln { color: grey; } /* line numbers */
pre.code, code { background-color: #eeeeee }
pre.code .comment, code .comment { color: #5C6576 }
pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold }
pre.code .literal.string, code .literal.string { color: #0C5404 }
pre.code .name.builtin, code .name.builtin { color: #352B84 }
pre.code .deleted, code .deleted { background-color: #DEB0A1}
pre.code .inserted, code .inserted { background-color: #A3D289}
span.classifier {
font-family: sans-serif ;
font-style: oblique }
span.classifier-delimiter {
font-family: sans-serif ;
font-weight: bold }
span.interpreted {
font-family: sans-serif }
span.option {
white-space: nowrap }
span.pre {
white-space: pre }
span.problematic {
color: red }
span.section-subtitle {
/* font-size relative to parent (h1..h6 element) */
font-size: 80% }
table.citation {
border-left: solid 1px gray;
margin-left: 1px }
table.docinfo {
margin: 2em 4em }
table.docutils {
margin-top: 0.5em ;
margin-bottom: 0.5em }
table.footnote {
border-left: solid 1px black;
margin-left: 1px }
table.docutils td, table.docutils th,
table.docinfo td, table.docinfo th {
padding-left: 0.5em ;
padding-right: 0.5em ;
vertical-align: top }
table.docutils th.field-name, table.docinfo th.docinfo-name {
font-weight: bold ;
text-align: left ;
white-space: nowrap ;
padding-left: 0 }
/* "booktabs" style (no vertical lines) */
table.docutils.booktabs {
border: 0px;
border-top: 2px solid;
border-bottom: 2px solid;
border-collapse: collapse;
}
table.docutils.booktabs * {
border: 0px;
}
table.docutils.booktabs th {
border-bottom: thin solid;
text-align: left;
}
h1 tt.docutils, h2 tt.docutils, h3 tt.docutils,
h4 tt.docutils, h5 tt.docutils, h6 tt.docutils {
font-size: 100% }
ul.auto-toc {
list-style-type: none }
</style>
</head>
<body>
<div class="document" id="point-of-sale-change-payments">
<h1 class="title">Point Of Sale - Change Payments</h1>
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:6f1462f67df774d51a30919678de62e275d7e3561144dde4841a3cc6893f9cf7
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<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/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/pos/tree/14.0/pos_payment_change"><img alt="OCA/pos" src="https://img.shields.io/badge/github-OCA%2Fpos-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/pos-14-0/pos-14-0-pos_payment_change"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/pos&amp;target_branch=14.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p>This module extends the functionnality of the Odoo Point of Sale to
allow the cashier to change the payments of a PoS order.</p>
<p>This feature is usefull when the user realized that he did a mistake,
just after he marked the order as paid, or during the close of the session,
Only if entries has not been generated.</p>
<p><strong>Table of contents</strong></p>
<div class="contents local topic" id="contents">
<ul class="simple">
<li><a class="reference internal" href="#configuration" id="toc-entry-1">Configuration</a></li>
<li><a class="reference internal" href="#usage" id="toc-entry-2">Usage</a></li>
<li><a class="reference internal" href="#bug-tracker" id="toc-entry-3">Bug Tracker</a></li>
<li><a class="reference internal" href="#credits" id="toc-entry-4">Credits</a><ul>
<li><a class="reference internal" href="#authors" id="toc-entry-5">Authors</a></li>
<li><a class="reference internal" href="#contributors" id="toc-entry-6">Contributors</a></li>
<li><a class="reference internal" href="#other-credits" id="toc-entry-7">Other credits</a></li>
<li><a class="reference internal" href="#maintainers" id="toc-entry-8">Maintainers</a></li>
</ul>
</li>
</ul>
</div>
<div class="section" id="configuration">
<h1><a class="toc-backref" href="#toc-entry-1">Configuration</a></h1>
<ul class="simple">
<li>Go to Point of Sale &gt; Configuration &gt; Point of Sale</li>
<li>Edit your point of sale, and select a value for the field
Payment Change Policy.</li>
</ul>
<p>Two options are available:</p>
<ul class="simple">
<li>Refund and Resale: Odoo will refund the current
Pos Order to cancel it, and create a new PoS Order
with the correct payment lines</li>
<li>Update Payments: Odoo will change payment lines.</li>
</ul>
<div class="figure">
<img alt="https://raw.githubusercontent.com/OCA/pos/14.0/pos_payment_change/static/description/pos_config_form.png" src="https://raw.githubusercontent.com/OCA/pos/14.0/pos_payment_change/static/description/pos_config_form.png" />
</div>
<p><strong>Note</strong>
In some countries the Update Payments Option
is not allowed by law, because orders history shouldnt not be altered.</p>
<p>For that purpose, a constrains is present to check the value of this
field. If the module <tt class="docutils literal">l10n_fr_certification</tt> is installed and if the
current company has an inalterable accounting, it will not be possible
to select the value Update Payments.</p>
</div>
<div class="section" id="usage">
<h1><a class="toc-backref" href="#toc-entry-2">Usage</a></h1>
<ul class="simple">
<li>Go to a PoS Order</li>
<li>Click on the button Change Payments</li>
</ul>
<div class="figure">
<img alt="https://raw.githubusercontent.com/OCA/pos/14.0/pos_payment_change/static/description/pos_order_form.png" src="https://raw.githubusercontent.com/OCA/pos/14.0/pos_payment_change/static/description/pos_order_form.png" />
</div>
<ul class="simple">
<li>In the pop up wizard, select the real payment(s) that have been
used to pay the order</li>
</ul>
<div class="figure">
<img alt="https://raw.githubusercontent.com/OCA/pos/14.0/pos_payment_change/static/description/pos_payment_change_wizard_form.png" src="https://raw.githubusercontent.com/OCA/pos/14.0/pos_payment_change/static/description/pos_payment_change_wizard_form.png" />
</div>
<ul class="simple">
<li>Then click on the button Change Payments</li>
</ul>
<p><strong>Note</strong></p>
<p>If the option Refund and Resale is selected, changing the payments will
display the three PoS orders. the oringal one, the refund one, and the new one.</p>
<div class="figure">
<img alt="https://raw.githubusercontent.com/OCA/pos/14.0/pos_payment_change/static/description/pos_order_tree.png" src="https://raw.githubusercontent.com/OCA/pos/14.0/pos_payment_change/static/description/pos_order_tree.png" />
</div>
</div>
<div class="section" id="bug-tracker">
<h1><a class="toc-backref" href="#toc-entry-3">Bug Tracker</a></h1>
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/pos/issues">GitHub Issues</a>.
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
<a class="reference external" href="https://github.com/OCA/pos/issues/new?body=module:%20pos_payment_change%0Aversion:%2014.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>
</div>
<div class="section" id="credits">
<h1><a class="toc-backref" href="#toc-entry-4">Credits</a></h1>
<div class="section" id="authors">
<h2><a class="toc-backref" href="#toc-entry-5">Authors</a></h2>
<ul class="simple">
<li>GRAP</li>
</ul>
</div>
<div class="section" id="contributors">
<h2><a class="toc-backref" href="#toc-entry-6">Contributors</a></h2>
<ul class="simple">
<li>Sylvain LE GAL &lt;<a class="reference external" href="https://twitter.com/legalsylvain">https://twitter.com/legalsylvain</a>&gt;</li>
<li>Julien WESTE</li>
<li>Foram Shah &lt;<a class="reference external" href="mailto:foram.shah&#64;initos.com">foram.shah&#64;initos.com</a>&gt;</li>
</ul>
</div>
<div class="section" id="other-credits">
<h2><a class="toc-backref" href="#toc-entry-7">Other credits</a></h2>
<p>The development of this module has been financially supported by:</p>
<ul class="simple">
<li>GRAP, Groupement Régional Alimentaire de proximité (www.grap.coop)</li>
<li>Vracoop (www.vracoop.fr)</li>
</ul>
</div>
<div class="section" id="maintainers">
<h2><a class="toc-backref" href="#toc-entry-8">Maintainers</a></h2>
<p>This module is maintained by the OCA.</p>
<a class="reference external image-reference" href="https://odoo-community.org"><img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" /></a>
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.</p>
<p>Current <a class="reference external" href="https://odoo-community.org/page/maintainer-role">maintainer</a>:</p>
<p><a class="reference external image-reference" href="https://github.com/legalsylvain"><img alt="legalsylvain" src="https://github.com/legalsylvain.png?size=40px" /></a></p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/pos/tree/14.0/pos_payment_change">OCA/pos</a> project on GitHub.</p>
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
</div>
</div>
</div>
</body>
</html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

View File

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

View File

@ -0,0 +1,204 @@
# Copyright (C) 2018 - 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 fields
from odoo.exceptions import UserError
from odoo.tests.common import TransactionCase
class TestModule(TransactionCase):
"""Tests for 'Point of Sale - Change Payment' Module"""
def setUp(self):
super().setUp()
self.PosSession = self.env["pos.session"]
self.PosOrder = self.env["pos.order"]
self.PosPaymentMethod = self.env["pos.payment.method"]
self.PosPayment = self.env["pos.payment"]
self.PosMakePayment = self.env["pos.make.payment"]
self.PosPaymentChangeWizard = self.env["pos.payment.change.wizard"]
self.PosPaymentChangeWizardNewLine = self.env[
"pos.payment.change.wizard.new.line"
]
self.product = self.env.ref("product.product_product_3")
self.pricelist = self.env["product.pricelist"].create(
{
"name": "Test pricelist",
"item_ids": [
(
0,
0,
{
"applied_on": "3_global",
"compute_price": "formula",
"base": "list_price",
},
)
],
}
)
self.pos_config = self.env.ref("point_of_sale.pos_config_main").copy(
{
"available_pricelist_ids": [(6, 0, self.pricelist.ids)],
"pricelist_id": self.pricelist.id,
}
)
def _initialize_journals_open_session(self):
account_id = self.env.company.account_default_pos_receivable_account_id
self.bank_payment_method = self.PosPaymentMethod.create(
{
"name": "Bank",
"receivable_account_id": account_id.id,
}
)
self.cash_payment_method = self.PosPaymentMethod.create(
{
"name": "Cash",
"is_cash_count": True,
"receivable_account_id": account_id.id,
"cash_journal_id": self.env["account.journal"]
.search(
[("type", "=", "cash"), ("company_id", "=", self.env.company.id)],
limit=1,
)
.id,
}
)
# create new session and open it
self.pos_config.payment_method_ids = [
self.bank_payment_method.id,
self.cash_payment_method.id,
]
self.pos_config.open_session_cb()
self.session = self.pos_config.current_session_id
def _sale(self, payment_method_1, price_1, payment_method_2=False, price_2=0.0):
price = price_1 + price_2
line_vals = {
"name": "OL/0001",
"product_id": self.product.id,
"qty": 1.0,
"price_unit": price,
"price_subtotal": price,
"price_subtotal_incl": price,
}
order = self.PosOrder.create(
{
"session_id": self.session.id,
"amount_tax": 0,
"amount_total": price,
"amount_paid": price,
"amount_return": 0,
"lines": [[0, False, line_vals]],
}
)
order.add_payment(
{
"pos_order_id": order.id,
"amount": price_1,
"payment_date": fields.Date.today(),
"payment_method_id": payment_method_1.id,
}
)
if payment_method_2:
order.add_payment(
{
"pos_order_id": order.id,
"amount": price_2,
"payment_date": fields.Date.today(),
"payment_method_id": payment_method_2.id,
}
)
order.action_pos_order_paid()
return order
def _change_payment(
self, order, payment_method_1, amount_1, payment_method_2=False, amount_2=0.0
):
# Switch to check journal
wizard = self.PosPaymentChangeWizard.with_context(active_id=order.id).create({})
self.PosPaymentChangeWizardNewLine.with_context(active_id=order.id).create(
{
"wizard_id": wizard.id,
"new_payment_method_id": payment_method_1.id,
"amount": amount_1,
}
)
if payment_method_2:
self.PosPaymentChangeWizardNewLine.with_context(active_id=order.id).create(
{
"wizard_id": wizard.id,
"new_payment_method_id": payment_method_2.id,
"amount": amount_2,
}
)
wizard.button_change_payment()
# Test Section
def test_01_payment_change_policy_update(self):
self.pos_config.payment_change_policy = "update"
self._initialize_journals_open_session()
# Make a sale with 35 in cash journal and 65 in check
order = self._sale(self.cash_payment_method, 35, self.bank_payment_method, 65)
order_qty = len(self.PosOrder.search([]))
with self.assertRaises(UserError):
# Should not work if total is not correct
self._change_payment(
order, self.cash_payment_method, 10, self.cash_payment_method, 10
)
self._change_payment(
order, self.cash_payment_method, 10, self.bank_payment_method, 90
)
self.bank_payment = self.session.order_ids.mapped("payment_ids").filtered(
lambda x: x.payment_method_id == self.bank_payment_method
)
self.cash_payment = self.session.order_ids.mapped("payment_ids").filtered(
lambda x: x.payment_method_id == self.cash_payment_method
)
# check Session
self.assertEqual(
self.cash_payment.amount,
10,
"Bad recompute of the balance for the statement cash",
)
self.assertEqual(
self.bank_payment.amount,
90,
"Bad recompute of the balance for the statement check",
)
# Check Order quantity
self.assertEqual(
order_qty,
len(self.PosOrder.search([])),
"In 'Update' mode, changing payment should not create" " other PoS Orders",
)
def test_02_payment_change_policy_refund(self):
self.pos_config.payment_change_policy = "refund"
self._initialize_journals_open_session()
# Make a sale with 35 in cash journal and 65 in check
order = self._sale(self.cash_payment_method, 35, self.bank_payment_method, 65)
order_qty = len(self.PosOrder.search([]))
self._change_payment(
order, self.cash_payment_method, 50, self.bank_payment_method, 50
)
# Check Order quantity
self.assertEqual(
order_qty + 2,
len(self.PosOrder.search([])),
"In 'Refund' mode, changing payment should generate" " two new PoS Orders",
)

View File

@ -0,0 +1,30 @@
<?xml version="1.0" encoding="utf-8" ?>
<!--
Copyright (C) 2020-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>
<record id="view_pos_config_form" model="ir.ui.view">
<field name="model">pos.config</field>
<field name="inherit_id" ref="point_of_sale.pos_config_view_form" />
<field name="arch" type="xml">
<xpath expr="//div[hasclass('o_settings_container')][2]" position="inside">
<div class="col-12 col-lg-6 o_setting_box">
<div class="o_setting_right_pane">
<span class="o_form_label">Payment Change Policy</span>
<div class="content-group mt16">
<field
name="payment_change_policy"
colspan="4"
nolabel="1"
/>
</div>
</div>
</div>
</xpath>
</field>
</record>
</odoo>

View File

@ -0,0 +1,24 @@
<?xml version="1.0" encoding="utf-8" ?>
<!--
Copyright (C) 2015-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>
<record id="view_pos_order_form" model="ir.ui.view">
<field name="model">pos.order</field>
<field name="inherit_id" ref="point_of_sale.view_pos_pos_form" />
<field name="arch" type="xml">
<button name="refund" position="before">
<button
name="%(action_pos_payment_change_wizard)d"
context="{'pos_session_id' : session_id}"
string="Change Payments"
type="action"
states="paid,invoiced"
/>
</button>
</field>
</record>
</odoo>

View File

@ -0,0 +1,3 @@
from . import pos_payment_change_wizard
from . import pos_payment_change_wizard_new_line
from . import pos_payment_change_wizard_old_line

View File

@ -0,0 +1,114 @@
# Copyright (C) 2015-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 _, api, fields, models
from odoo.exceptions import UserError
from odoo.tools import float_compare
class PosPaymentChangeWizard(models.TransientModel):
_name = "pos.payment.change.wizard"
_description = "PoS Payment Change Wizard"
# Column Section
order_id = fields.Many2one(comodel_name="pos.order", string="Order", readonly=True)
old_line_ids = fields.One2many(
comodel_name="pos.payment.change.wizard.old.line",
inverse_name="wizard_id",
string="Old Payment Lines",
readonly=True,
)
new_line_ids = fields.One2many(
comodel_name="pos.payment.change.wizard.new.line",
inverse_name="wizard_id",
string="New Payment Lines",
)
amount_total = fields.Float(string="Total", readonly=True)
# View Section
@api.model
def default_get(self, fields):
PosOrder = self.env["pos.order"]
res = super().default_get(fields)
order = PosOrder.browse(self._context.get("active_id"))
old_lines_vals = []
for payment in order.payment_ids:
old_lines_vals.append(
(
0,
0,
{
"old_payment_method_id": payment.payment_method_id.id,
"amount": payment.amount,
},
)
)
res.update(
{
"order_id": order.id,
"amount_total": order.amount_total,
"old_line_ids": old_lines_vals,
}
)
return res
# View section
def button_change_payment(self):
self.ensure_one()
order = self.order_id
# Check if the total is correct
total = sum(self.mapped("new_line_ids.amount"))
if (
float_compare(
total,
self.amount_total,
precision_rounding=self.order_id.currency_id.rounding,
)
!= 0
):
raise UserError(
_(
"Differences between the two values for the POS"
" Order '%s':\n\n"
" * Total of all the new payments %s;\n"
" * Total of the POS Order %s;\n\n"
"Please change the payments."
% (order.name, total, order.amount_total)
)
)
# Change payment
new_payments = [
{
"pos_order_id": order.id,
"payment_method_id": line.new_payment_method_id.id,
"amount": line.amount,
"payment_date": fields.Date.context_today(self),
}
for line in self.new_line_ids
]
orders = order.change_payment(new_payments)
# Note. Because of the poor design of the closing session process
# in Odoo, we call _check_pos_session_balance() that sets
# balance_end_real with balance_end for "non cash" journals
if order.session_id.state == "closing_control":
order.session_id._check_pos_session_balance()
if len(orders) == 1:
# if policy is 'update', only close the pop up
action = {"type": "ir.actions.act_window_close"}
else:
# otherwise (refund policy), displays the 3 orders
action = self.env["ir.actions.act_window"]._for_xml_id(
"point_of_sale.action_pos_pos_form"
)
action["domain"] = [("id", "in", orders.ids)]
return action

View File

@ -0,0 +1,56 @@
# Copyright (C) 2015 - 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 api, fields, models
class PosPaymentChangeWizardLine(models.TransientModel):
_name = "pos.payment.change.wizard.new.line"
_description = "PoS Payment Change Wizard New Line"
wizard_id = fields.Many2one(
comodel_name="pos.payment.change.wizard",
required=True,
)
new_payment_method_id = fields.Many2one(
comodel_name="pos.payment.method",
string="Payment Method",
required=True,
domain=lambda s: s._domain_new_payment_method_id(),
)
company_currency_id = fields.Many2one(
comodel_name="res.currency",
store=True,
related="new_payment_method_id.company_id.currency_id",
string="Company Currency",
readonly=True,
help="Utility field to express amount currency",
)
amount = fields.Monetary(
string="Amount",
required=True,
default=0.0,
currency_field="company_currency_id",
)
@api.model
def _domain_new_payment_method_id(self):
PosOrder = self.env["pos.order"]
order = PosOrder.browse(self.env.context.get("active_id"))
return [("id", "in", order.mapped("session_id.payment_method_ids").ids)]
# View Section
@api.model
def default_get(self, fields):
res = super().default_get(fields)
if "new_line_ids" not in self._context:
return res
balance = self._context.get("amount_total", 0.0)
for line in self.wizard_id.old_line_ids:
balance -= line.get("amount")
res.update({"amount": balance})
return res

View File

@ -0,0 +1,39 @@
# Copyright (C) 2015 - 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 fields, models
class PosPaymentChangeWizardOldLine(models.TransientModel):
_name = "pos.payment.change.wizard.old.line"
_description = "PoS Payment Change Wizard Old Line"
wizard_id = fields.Many2one(
comodel_name="pos.payment.change.wizard",
required=True,
)
old_payment_method_id = fields.Many2one(
comodel_name="pos.payment.method",
string="Payment Method",
required=True,
readonly=True,
)
company_currency_id = fields.Many2one(
comodel_name="res.currency",
store=True,
related="old_payment_method_id.company_id.currency_id",
string="Company Currency",
readonly=True,
help="Utility field to express amount currency",
)
amount = fields.Monetary(
string="Amount",
required=True,
readonly=True,
default=0.0,
currency_field="company_currency_id",
)

View File

@ -0,0 +1,57 @@
<?xml version="1.0" encoding="utf-8" ?>
<!--
Copyright (C) 2015-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>
<record id="view_pos_payment_change_wizard_form" model="ir.ui.view">
<field name="model">pos.payment.change.wizard</field>
<field name="arch" type="xml">
<form>
<group col="4">
<field name="order_id" />
<field name="amount_total" invisible="1" />
<field name="old_line_ids" colspan="4">
<tree>
<field name="old_payment_method_id" />
<field name="amount" sum="Total" />
</tree>
</field>
<newline />
<field
name="new_line_ids"
colspan="4"
context="{'new_line_ids': new_line_ids, 'amount_total': amount_total}"
>
<tree editable="bottom">
<field
name="new_payment_method_id"
options="{'no_open': True, 'no_create_edit': True}"
/>
<field name="amount" sum="Total" />
</tree>
</field>
</group>
<footer>
<button
name="button_change_payment"
string="Change Payments"
type="object"
class="oe_highlight"
/>
<button string="Cancel" class="oe_link" special="cancel" />
</footer>
</form>
</field>
</record>
<record id="action_pos_payment_change_wizard" model="ir.actions.act_window">
<field name="name">Change Payments</field>
<field name="res_model">pos.payment.change.wizard</field>
<field name="view_mode">form</field>
<field name="target">new</field>
</record>
</odoo>

View File

@ -0,0 +1,94 @@
======================
POS Receipt Hide Price
======================
..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:525bb69c87ca2cab59bd88f100ef5410b278e1a60bcf4dcd8f6768b070a301ce
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/licence-LGPL--3-blue.png
:target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html
:alt: License: LGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fpos-lightgray.png?logo=github
:target: https://github.com/OCA/pos/tree/14.0/pos_receipt_hide_price
:alt: OCA/pos
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/pos-14-0/pos-14-0-pos_receipt_hide_price
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/pos&target_branch=14.0
:alt: Try me on Runboat
|badge1| |badge2| |badge3| |badge4| |badge5|
This module adds a button in the receipt view to hide price from the receipt for printing and emailing purpose.
Clicking the hide price button transforms the receipt from:
.. figure:: https://raw.githubusercontent.com/OCA/pos/14.0/pos_receipt_hide_price/static/description/price-shown.png
To:
.. figure:: https://raw.githubusercontent.com/OCA/pos/14.0/pos_receipt_hide_price/static/description/price-hidden.png
The price will also be hidden on the printed receipt and the sent email.
**Table of contents**
.. contents::
:local:
Usage
=====
Click the Hide Price button in the receipt view before printing / emailing the receipt.
Bug Tracker
===========
Bugs are tracked on `GitHub Issues <https://github.com/OCA/pos/issues>`_.
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
`feedback <https://github.com/OCA/pos/issues/new?body=module:%20pos_receipt_hide_price%0Aversion:%2014.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.
Credits
=======
Authors
~~~~~~~
* Akretion
Contributors
~~~~~~~~~~~~
* `Akretion <https://www.akretion.com>`_:
* Florian Mounier
Maintainers
~~~~~~~~~~~
This module is maintained by the OCA.
.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org
OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.
This module is part of the `OCA/pos <https://github.com/OCA/pos/tree/14.0/pos_receipt_hide_price>`_ project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

View File

@ -0,0 +1,18 @@
# Copyright 2021 Akretion - Florian Mounier
{
"name": "POS Receipt Hide Price",
"summary": "Add button to remove price from receipt.",
"author": "Akretion, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/pos",
'category':'Odex25-POS/Odex25-POS',
"version": "14.0.1.0.1",
"license": "LGPL-3",
"depends": ["point_of_sale"],
"data": ["views/assets.xml"],
"qweb": [
"static/src/xml/OrderReceipt.xml",
"static/src/xml/HidePrice.xml",
"static/src/xml/ReceiptScreen.xml",
"static/src/xml/ReprintReceiptScreen.xml",
],
}

View File

@ -0,0 +1,62 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * pos_receipt_hide_price
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 14.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2024-01-02 18:34+0000\n"
"Last-Translator: Anna Martínez <anna080678@gmail.com>\n"
"Language-Team: none\n"
"Language: es\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 4.17\n"
#. module: pos_receipt_hide_price
#. openerp-web
#: code:addons/pos_receipt_hide_price/static/src/xml/HidePrice.xml:0
#, python-format
msgid "Hide Price"
msgstr "Ocultar precio"
#. module: pos_receipt_hide_price
#. openerp-web
#: code:addons/pos_receipt_hide_price/static/src/xml/HidePrice.xml:0
#, python-format
msgid "Show Price"
msgstr "Mostrar precio"
#. module: pos_receipt_hide_price
#. openerp-web
#: code:addons/pos_receipt_hide_price/static/src/xml/ReceiptScreen.xml:0
#: code:addons/pos_receipt_hide_price/static/src/xml/ReprintReceiptScreen.xml:0
#, python-format
msgid "hidePriceState"
msgstr "hidePriceState"
#. module: pos_receipt_hide_price
#. openerp-web
#: code:addons/pos_receipt_hide_price/static/src/xml/OrderReceipt.xml:0
#: code:addons/pos_receipt_hide_price/static/src/xml/OrderReceipt.xml:0
#: code:addons/pos_receipt_hide_price/static/src/xml/OrderReceipt.xml:0
#: code:addons/pos_receipt_hide_price/static/src/xml/OrderReceipt.xml:0
#: code:addons/pos_receipt_hide_price/static/src/xml/OrderReceipt.xml:0
#: code:addons/pos_receipt_hide_price/static/src/xml/OrderReceipt.xml:0
#: code:addons/pos_receipt_hide_price/static/src/xml/OrderReceipt.xml:0
#: code:addons/pos_receipt_hide_price/static/src/xml/OrderReceipt.xml:0
#: code:addons/pos_receipt_hide_price/static/src/xml/OrderReceipt.xml:0
#: code:addons/pos_receipt_hide_price/static/src/xml/OrderReceipt.xml:0
#: code:addons/pos_receipt_hide_price/static/src/xml/OrderReceipt.xml:0
#: code:addons/pos_receipt_hide_price/static/src/xml/OrderReceipt.xml:0
#: code:addons/pos_receipt_hide_price/static/src/xml/OrderReceipt.xml:0
#: code:addons/pos_receipt_hide_price/static/src/xml/OrderReceipt.xml:0
#: code:addons/pos_receipt_hide_price/static/src/xml/OrderReceipt.xml:0
#: code:addons/pos_receipt_hide_price/static/src/xml/OrderReceipt.xml:0
#: code:addons/pos_receipt_hide_price/static/src/xml/OrderReceipt.xml:0
#, python-format
msgid "{'oe_hidden': priceHidden}"
msgstr "{'oe_hidden': priceHidden}"

View File

@ -0,0 +1,46 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * pos_receipt_hide_price
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 14.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2023-03-16 16:32+0000\n"
"Last-Translator: mymage <stefano.consolaro@mymage.it>\n"
"Language-Team: none\n"
"Language: it\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 4.14.1\n"
#. module: pos_receipt_hide_price
#. openerp-web
#: code:addons/pos_receipt_hide_price/static/src/xml/HidePrice.xml:0
#, python-format
msgid "Hide Price"
msgstr "Nascondi prezzo"
#. module: pos_receipt_hide_price
#. openerp-web
#: code:addons/pos_receipt_hide_price/static/src/xml/HidePrice.xml:0
#, python-format
msgid "Show Price"
msgstr "Mostra prezzo"
#. module: pos_receipt_hide_price
#. openerp-web
#: code:addons/pos_receipt_hide_price/static/src/xml/ReceiptScreen.xml:0
#: code:addons/pos_receipt_hide_price/static/src/xml/ReprintReceiptScreen.xml:0
#, python-format
msgid "hidePriceState"
msgstr "hidePriceState"
#. module: pos_receipt_hide_price
#. openerp-web
#: code:addons/pos_receipt_hide_price/static/src/xml/OrderReceipt.xml:0
#, python-format
msgid "{'oe_hidden': priceHidden}"
msgstr "{'oe_hidden': priceHidden}"

View File

@ -0,0 +1,3 @@
* `Akretion <https://www.akretion.com>`_:
* Florian Mounier

View File

@ -0,0 +1,12 @@
This module adds a button in the receipt view to hide price from the receipt for printing and emailing purpose.
Clicking the hide price button transforms the receipt from:
.. figure:: ../static/description/price-shown.png
To:
.. figure:: ../static/description/price-hidden.png
The price will also be hidden on the printed receipt and the sent email.

View File

@ -0,0 +1 @@
Click the Hide Price button in the receipt view before printing / emailing the receipt.

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

View File

@ -0,0 +1,438 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils: https://docutils.sourceforge.io/" />
<title>POS Receipt Hide Price</title>
<style type="text/css">
/*
:Author: David Goodger (goodger@python.org)
:Id: $Id: html4css1.css 8954 2022-01-20 10:10:25Z milde $
:Copyright: This stylesheet has been placed in the public domain.
Default cascading style sheet for the HTML output of Docutils.
See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to
customize this style sheet.
*/
/* used to remove borders from tables and images */
.borderless, table.borderless td, table.borderless th {
border: 0 }
table.borderless td, table.borderless th {
/* Override padding for "table.docutils td" with "! important".
The right padding separates the table cells. */
padding: 0 0.5em 0 0 ! important }
.first {
/* Override more specific margin styles with "! important". */
margin-top: 0 ! important }
.last, .with-subtitle {
margin-bottom: 0 ! important }
.hidden {
display: none }
.subscript {
vertical-align: sub;
font-size: smaller }
.superscript {
vertical-align: super;
font-size: smaller }
a.toc-backref {
text-decoration: none ;
color: black }
blockquote.epigraph {
margin: 2em 5em ; }
dl.docutils dd {
margin-bottom: 0.5em }
object[type="image/svg+xml"], object[type="application/x-shockwave-flash"] {
overflow: hidden;
}
/* Uncomment (and remove this text!) to get bold-faced definition list terms
dl.docutils dt {
font-weight: bold }
*/
div.abstract {
margin: 2em 5em }
div.abstract p.topic-title {
font-weight: bold ;
text-align: center }
div.admonition, div.attention, div.caution, div.danger, div.error,
div.hint, div.important, div.note, div.tip, div.warning {
margin: 2em ;
border: medium outset ;
padding: 1em }
div.admonition p.admonition-title, div.hint p.admonition-title,
div.important p.admonition-title, div.note p.admonition-title,
div.tip p.admonition-title {
font-weight: bold ;
font-family: sans-serif }
div.attention p.admonition-title, div.caution p.admonition-title,
div.danger p.admonition-title, div.error p.admonition-title,
div.warning p.admonition-title, .code .error {
color: red ;
font-weight: bold ;
font-family: sans-serif }
/* Uncomment (and remove this text!) to get reduced vertical space in
compound paragraphs.
div.compound .compound-first, div.compound .compound-middle {
margin-bottom: 0.5em }
div.compound .compound-last, div.compound .compound-middle {
margin-top: 0.5em }
*/
div.dedication {
margin: 2em 5em ;
text-align: center ;
font-style: italic }
div.dedication p.topic-title {
font-weight: bold ;
font-style: normal }
div.figure {
margin-left: 2em ;
margin-right: 2em }
div.footer, div.header {
clear: both;
font-size: smaller }
div.line-block {
display: block ;
margin-top: 1em ;
margin-bottom: 1em }
div.line-block div.line-block {
margin-top: 0 ;
margin-bottom: 0 ;
margin-left: 1.5em }
div.sidebar {
margin: 0 0 0.5em 1em ;
border: medium outset ;
padding: 1em ;
background-color: #ffffee ;
width: 40% ;
float: right ;
clear: right }
div.sidebar p.rubric {
font-family: sans-serif ;
font-size: medium }
div.system-messages {
margin: 5em }
div.system-messages h1 {
color: red }
div.system-message {
border: medium outset ;
padding: 1em }
div.system-message p.system-message-title {
color: red ;
font-weight: bold }
div.topic {
margin: 2em }
h1.section-subtitle, h2.section-subtitle, h3.section-subtitle,
h4.section-subtitle, h5.section-subtitle, h6.section-subtitle {
margin-top: 0.4em }
h1.title {
text-align: center }
h2.subtitle {
text-align: center }
hr.docutils {
width: 75% }
img.align-left, .figure.align-left, object.align-left, table.align-left {
clear: left ;
float: left ;
margin-right: 1em }
img.align-right, .figure.align-right, object.align-right, table.align-right {
clear: right ;
float: right ;
margin-left: 1em }
img.align-center, .figure.align-center, object.align-center {
display: block;
margin-left: auto;
margin-right: auto;
}
table.align-center {
margin-left: auto;
margin-right: auto;
}
.align-left {
text-align: left }
.align-center {
clear: both ;
text-align: center }
.align-right {
text-align: right }
/* reset inner alignment in figures */
div.align-right {
text-align: inherit }
/* div.align-center * { */
/* text-align: left } */
.align-top {
vertical-align: top }
.align-middle {
vertical-align: middle }
.align-bottom {
vertical-align: bottom }
ol.simple, ul.simple {
margin-bottom: 1em }
ol.arabic {
list-style: decimal }
ol.loweralpha {
list-style: lower-alpha }
ol.upperalpha {
list-style: upper-alpha }
ol.lowerroman {
list-style: lower-roman }
ol.upperroman {
list-style: upper-roman }
p.attribution {
text-align: right ;
margin-left: 50% }
p.caption {
font-style: italic }
p.credits {
font-style: italic ;
font-size: smaller }
p.label {
white-space: nowrap }
p.rubric {
font-weight: bold ;
font-size: larger ;
color: maroon ;
text-align: center }
p.sidebar-title {
font-family: sans-serif ;
font-weight: bold ;
font-size: larger }
p.sidebar-subtitle {
font-family: sans-serif ;
font-weight: bold }
p.topic-title {
font-weight: bold }
pre.address {
margin-bottom: 0 ;
margin-top: 0 ;
font: inherit }
pre.literal-block, pre.doctest-block, pre.math, pre.code {
margin-left: 2em ;
margin-right: 2em }
pre.code .ln { color: grey; } /* line numbers */
pre.code, code { background-color: #eeeeee }
pre.code .comment, code .comment { color: #5C6576 }
pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold }
pre.code .literal.string, code .literal.string { color: #0C5404 }
pre.code .name.builtin, code .name.builtin { color: #352B84 }
pre.code .deleted, code .deleted { background-color: #DEB0A1}
pre.code .inserted, code .inserted { background-color: #A3D289}
span.classifier {
font-family: sans-serif ;
font-style: oblique }
span.classifier-delimiter {
font-family: sans-serif ;
font-weight: bold }
span.interpreted {
font-family: sans-serif }
span.option {
white-space: nowrap }
span.pre {
white-space: pre }
span.problematic {
color: red }
span.section-subtitle {
/* font-size relative to parent (h1..h6 element) */
font-size: 80% }
table.citation {
border-left: solid 1px gray;
margin-left: 1px }
table.docinfo {
margin: 2em 4em }
table.docutils {
margin-top: 0.5em ;
margin-bottom: 0.5em }
table.footnote {
border-left: solid 1px black;
margin-left: 1px }
table.docutils td, table.docutils th,
table.docinfo td, table.docinfo th {
padding-left: 0.5em ;
padding-right: 0.5em ;
vertical-align: top }
table.docutils th.field-name, table.docinfo th.docinfo-name {
font-weight: bold ;
text-align: left ;
white-space: nowrap ;
padding-left: 0 }
/* "booktabs" style (no vertical lines) */
table.docutils.booktabs {
border: 0px;
border-top: 2px solid;
border-bottom: 2px solid;
border-collapse: collapse;
}
table.docutils.booktabs * {
border: 0px;
}
table.docutils.booktabs th {
border-bottom: thin solid;
text-align: left;
}
h1 tt.docutils, h2 tt.docutils, h3 tt.docutils,
h4 tt.docutils, h5 tt.docutils, h6 tt.docutils {
font-size: 100% }
ul.auto-toc {
list-style-type: none }
</style>
</head>
<body>
<div class="document" id="pos-receipt-hide-price">
<h1 class="title">POS Receipt Hide Price</h1>
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:525bb69c87ca2cab59bd88f100ef5410b278e1a60bcf4dcd8f6768b070a301ce
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<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/OCA/pos/tree/14.0/pos_receipt_hide_price"><img alt="OCA/pos" src="https://img.shields.io/badge/github-OCA%2Fpos-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/pos-14-0/pos-14-0-pos_receipt_hide_price"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/pos&amp;target_branch=14.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p>This module adds a button in the receipt view to hide price from the receipt for printing and emailing purpose.</p>
<p>Clicking the hide price button transforms the receipt from:</p>
<div class="figure">
<img alt="https://raw.githubusercontent.com/OCA/pos/14.0/pos_receipt_hide_price/static/description/price-shown.png" src="https://raw.githubusercontent.com/OCA/pos/14.0/pos_receipt_hide_price/static/description/price-shown.png" />
</div>
<p>To:</p>
<div class="figure">
<img alt="https://raw.githubusercontent.com/OCA/pos/14.0/pos_receipt_hide_price/static/description/price-hidden.png" src="https://raw.githubusercontent.com/OCA/pos/14.0/pos_receipt_hide_price/static/description/price-hidden.png" />
</div>
<p>The price will also be hidden on the printed receipt and the sent email.</p>
<p><strong>Table of contents</strong></p>
<div class="contents local topic" id="contents">
<ul class="simple">
<li><a class="reference internal" href="#usage" id="toc-entry-1">Usage</a></li>
<li><a class="reference internal" href="#bug-tracker" id="toc-entry-2">Bug Tracker</a></li>
<li><a class="reference internal" href="#credits" id="toc-entry-3">Credits</a><ul>
<li><a class="reference internal" href="#authors" id="toc-entry-4">Authors</a></li>
<li><a class="reference internal" href="#contributors" id="toc-entry-5">Contributors</a></li>
<li><a class="reference internal" href="#maintainers" id="toc-entry-6">Maintainers</a></li>
</ul>
</li>
</ul>
</div>
<div class="section" id="usage">
<h1><a class="toc-backref" href="#toc-entry-1">Usage</a></h1>
<p>Click the Hide Price button in the receipt view before printing / emailing the receipt.</p>
</div>
<div class="section" id="bug-tracker">
<h1><a class="toc-backref" href="#toc-entry-2">Bug Tracker</a></h1>
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/pos/issues">GitHub Issues</a>.
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
<a class="reference external" href="https://github.com/OCA/pos/issues/new?body=module:%20pos_receipt_hide_price%0Aversion:%2014.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>
</div>
<div class="section" id="credits">
<h1><a class="toc-backref" href="#toc-entry-3">Credits</a></h1>
<div class="section" id="authors">
<h2><a class="toc-backref" href="#toc-entry-4">Authors</a></h2>
<ul class="simple">
<li>Akretion</li>
</ul>
</div>
<div class="section" id="contributors">
<h2><a class="toc-backref" href="#toc-entry-5">Contributors</a></h2>
<ul class="simple">
<li><a class="reference external" href="https://www.akretion.com">Akretion</a>:<ul>
<li>Florian Mounier</li>
</ul>
</li>
</ul>
</div>
<div class="section" id="maintainers">
<h2><a class="toc-backref" href="#toc-entry-6">Maintainers</a></h2>
<p>This module is maintained by the OCA.</p>
<a class="reference external image-reference" href="https://odoo-community.org"><img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" /></a>
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.</p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/pos/tree/14.0/pos_receipt_hide_price">OCA/pos</a> project on GitHub.</p>
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
</div>
</div>
</div>
</body>
</html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 79 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 96 KiB

View File

@ -0,0 +1,19 @@
odoo.define("pos_receipt_hide_price.OrderReceipt", function (require) {
"use strict";
const OrderReceipt = require("point_of_sale.OrderReceipt");
const Registries = require("point_of_sale.Registries");
const HidePriceOrderReceipt = (OrderReceipt) =>
class extends OrderReceipt {
constructor(_, {hidePriceState}) {
super(...arguments);
this.hidePriceState = hidePriceState;
}
get priceHidden() {
return this.hidePriceState.priceHidden;
}
};
Registries.Component.extend(OrderReceipt, HidePriceOrderReceipt);
return OrderReceipt;
});

View File

@ -0,0 +1,23 @@
odoo.define("pos_receipt_hide_price.ReceiptScreen", function (require) {
"use strict";
const {useState} = owl.hooks;
const ReceiptScreen = require("point_of_sale.ReceiptScreen");
const Registries = require("point_of_sale.Registries");
const HidePriceReceiptScreen = (ReceiptScreen) =>
class extends ReceiptScreen {
constructor() {
super(...arguments);
this.hidePriceState = useState({priceHidden: false});
}
hidePrice() {
this.hidePriceState.priceHidden = !this.hidePriceState.priceHidden;
}
get priceHidden() {
return this.hidePriceState.priceHidden;
}
};
Registries.Component.extend(ReceiptScreen, HidePriceReceiptScreen);
return ReceiptScreen;
});

View File

@ -0,0 +1,23 @@
odoo.define("pos_receipt_hide_price.ReprintReceiptScreen", function (require) {
"use strict";
const {useState} = owl.hooks;
const ReprintReceiptScreen = require("point_of_sale.ReprintReceiptScreen");
const Registries = require("point_of_sale.Registries");
const HidePriceReprintReceiptScreen = (ReprintReceiptScreen) =>
class extends ReprintReceiptScreen {
constructor() {
super(...arguments);
this.hidePriceState = useState({priceHidden: false});
}
hidePrice() {
this.hidePriceState.priceHidden = !this.hidePriceState.priceHidden;
}
get priceHidden() {
return this.hidePriceState.priceHidden;
}
};
Registries.Component.extend(ReprintReceiptScreen, HidePriceReprintReceiptScreen);
return ReprintReceiptScreen;
});

View File

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8" ?>
<templates id="template" xml:space="preserve">
<t t-name="pos_receipt_hide_price.hide_price" owl="1">
<div class="button price_hidden" t-on-click="hidePrice">
<i
class='fa'
t-att-class="{ 'fa-eye': priceHidden, 'fa-eye-slash': !priceHidden }"
/>
<t t-if="priceHidden"> Show Price</t>
<t t-else=""> Hide Price</t>
</div>
</t>
</templates>

View File

@ -0,0 +1,92 @@
<templates id="template" xml:space="preserve">
<t t-inherit="point_of_sale.OrderReceipt" t-inherit-mode="extension">
<!-- Attributes position xpath only apply to first match for some reason: -->
<!-- https://github.com/odoo/odoo/issues/23862 -->
<!-- Simple price -->
<xpath expr="//t[@t-if='isSimple(line)']/div/span" position="attributes">
<attribute name="t-att-class">{'oe_hidden': priceHidden}</attribute>
</xpath>
<!-- Extended discounts -->
<xpath expr="//t[@t-else='']/t[@t-if]/div" position="attributes">
<attribute name="t-att-class">{'oe_hidden': priceHidden}</attribute>
</xpath>
<xpath expr="//t[@t-elif='line.discount !== 0']/*" position="attributes">
<attribute name="t-att-class">{'oe_hidden': priceHidden}</attribute>
</xpath>
<xpath expr="//t[@t-if='line.discount !== 0']/*" position="attributes">
<attribute name="t-att-class">{'oe_hidden': priceHidden}</attribute>
</xpath>
<!-- Quantity x price -->
<xpath expr="//t[@t-else='']/div[last()]" position="attributes">
<attribute name="t-att-class">{'oe_hidden': priceHidden}</attribute>
</xpath>
<xpath expr="//t[@t-else='']/div[last()]" position="after">
<t t-if="priceHidden">
<div class="pos-receipt-left-padding">
x
<t
t-esc="Math.round(line.quantity * Math.pow(10, env.pos.dp['Product Unit of Measure'])) / Math.pow(10, env.pos.dp['Product Unit of Measure'])"
/>
<t t-if="!line.is_in_unit" t-esc="line.unit_name" />
</div>
</t>
</xpath>
<!-- Tax included -->
<xpath expr="//t[@t-if='!isTaxIncluded']/div[1]" position="attributes">
<attribute name="t-att-class">{'oe_hidden': priceHidden}</attribute>
</xpath>
<xpath expr="//t[@t-if='!isTaxIncluded']/div[2]" position="attributes">
<attribute name="t-att-class">{'oe_hidden': priceHidden}</attribute>
</xpath>
<xpath expr="//t[@t-if='!isTaxIncluded']/t/div" position="attributes">
<attribute name="t-att-class">{'oe_hidden': priceHidden}</attribute>
</xpath>
<!-- Separator -->
<xpath expr="//div[3]" position="attributes">
<attribute name="t-att-class">{'oe_hidden': priceHidden}</attribute>
</xpath>
<!-- Total -->
<xpath expr="//div[hasclass('pos-receipt-amount')]" position="attributes">
<attribute name="t-att-class">{'oe_hidden': priceHidden}</attribute>
</xpath>
<xpath
expr="//t[@t-if='receipt.total_rounded != receipt.total_with_tax']/div[1]"
position="attributes"
>
<attribute name="t-att-class">{'oe_hidden': priceHidden}</attribute>
</xpath>
<xpath
expr="//t[@t-if='receipt.total_rounded != receipt.total_with_tax']/div[2]"
position="attributes"
>
<attribute name="t-att-class">{'oe_hidden': priceHidden}</attribute>
</xpath>
<!-- Payment -->
<xpath expr="//t[@t-foreach='receipt.paymentlines']/*" position="attributes">
<attribute name="t-att-class">{'oe_hidden': priceHidden}</attribute>
</xpath>
<!-- Change -->
<xpath expr="//div[hasclass('receipt-change')]" position="attributes">
<attribute name="t-att-class">{'oe_hidden': priceHidden}</attribute>
</xpath>
<!-- Total discount -->
<xpath expr="//t[@t-if='receipt.total_discount']/div" position="attributes">
<attribute name="t-att-class">{'oe_hidden': priceHidden}</attribute>
</xpath>
<!-- Total Taxes -->
<xpath expr="//t[@t-foreach='receipt.tax_details']/div" position="attributes">
<attribute name="t-att-class">{'oe_hidden': priceHidden}</attribute>
</xpath>
<xpath expr="//t[@t-if='isTaxIncluded']/div" position="attributes">
<attribute name="t-att-class">{'oe_hidden': priceHidden}</attribute>
</xpath>
</t>
</templates>

View File

@ -0,0 +1,10 @@
<templates id="template" xml:space="preserve">
<t t-inherit="point_of_sale.ReceiptScreen" t-inherit-mode="extension">
<xpath expr="//div[hasclass('button', 'print')]" position="before">
<t t-call="pos_receipt_hide_price.hide_price" />
</xpath>
<xpath expr="//OrderReceipt" position="attributes">
<attribute name="hidePriceState">hidePriceState</attribute>
</xpath>
</t>
</templates>

View File

@ -0,0 +1,10 @@
<templates id="template" xml:space="preserve">
<t t-inherit="point_of_sale.ReprintReceiptScreen" t-inherit-mode="extension">
<xpath expr="//div[hasclass('button', 'print')]" position="after">
<t t-call="pos_receipt_hide_price.hide_price" />
</xpath>
<xpath expr="//OrderReceipt" position="attributes">
<attribute name="hidePriceState">hidePriceState</attribute>
</xpath>
</t>
</templates>

View File

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<template id="assets" inherit_id="point_of_sale.assets">
<xpath expr="." position="inside">
<script
type="text/javascript"
src="/pos_receipt_hide_price/static/src/js/ReceiptScreen.js"
/>
<script
type="text/javascript"
src="/pos_receipt_hide_price/static/src/js/ReprintReceiptScreen.js"
/>
<script
type="text/javascript"
src="/pos_receipt_hide_price/static/src/js/OrderReceipt.js"
/>
</xpath>
</template>
</odoo>

View File

@ -0,0 +1,79 @@
==========================
POS report Session Summary
==========================
..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:065052ba12aaddc9ea250c21426f339daf1879de4cf4c655cad8c784af4db7f6
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/licence-LGPL--3-blue.png
:target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html
:alt: License: LGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fpos-lightgray.png?logo=github
:target: https://github.com/OCA/pos/tree/14.0/pos_report_session_summary
:alt: OCA/pos
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/pos-14-0/pos-14-0-pos_report_session_summary
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/pos&target_branch=14.0
:alt: Try me on Runboat
|badge1| |badge2| |badge3| |badge4| |badge5|
Add the POS Session Summary report removed in 10.0
see : https://github.com/odoo/odoo/commit/e741de8b0c152279eb2d20faa77d06df8e50b91a
**Table of contents**
.. contents::
:local:
Usage
=====
In a POS Session use Print -> Session Summary
Bug Tracker
===========
Bugs are tracked on `GitHub Issues <https://github.com/OCA/pos/issues>`_.
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
`feedback <https://github.com/OCA/pos/issues/new?body=module:%20pos_report_session_summary%0Aversion:%2014.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.
Credits
=======
Authors
~~~~~~~
* Akretion
* Odoo SA
Maintainers
~~~~~~~~~~~
This module is maintained by the OCA.
.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org
OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.
This module is part of the `OCA/pos <https://github.com/OCA/pos/tree/14.0/pos_report_session_summary>`_ project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

Some files were not shown because too many files have changed in this diff Show More