New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[IMP] point_of_sale: forbid locking the fiscal year or period in case there is an open POS session into it #28257

Open
wants to merge 1 commit into
base: master
from

Conversation

Projects
None yet
4 participants
@oco-odoo
Copy link
Contributor

oco-odoo commented Oct 29, 2018

Without that, it is impossible to close these sessions, as the lock date forbids posting accounting entries for them.

@qdp-odoo
Copy link
Contributor

qdp-odoo left a comment

almost ok

sessions_in_period = pos_session_model.search([('state', '!=', 'closed'), '|', ('start_at', '<=', record.period_lock_date), ('start_at', '<=', record.fiscalyear_lock_date)])
if sessions_in_period:
sessions_str = ', '.join(sessions_in_period.mapped('name'))
raise ValidationError(_("Please close all the point of sale sessions in this period before closing it. Open sessions are: %s " % (sessions_str)))

This comment has been minimized.

@qdp-odoo

qdp-odoo Nov 22, 2018

Contributor

wrong string to translate

@oco-odoo oco-odoo force-pushed the odoo-dev:master-account-lock-pos-imp-oco branch from 4f38f46 to df52f7e Nov 26, 2018

@robodoo robodoo added CI 🤖 and removed CI 🤖 labels Nov 26, 2018

@oco-odoo oco-odoo force-pushed the odoo-dev:master-account-lock-pos-imp-oco branch from df52f7e to 175e2b7 Jan 11, 2019

@robodoo robodoo removed the CI 🤖 label Jan 11, 2019

[IMP] point_of_sale: accounting lock dates and POS sessions
Forbid locking the fiscal year or period in case there is an open POS session into it. Without that, it will be impossible to close these sessions, as the lock date will not allow posting accounting entries for them.

Also forbid to create a session before lock date, as it would be impossible to close.

@oco-odoo oco-odoo force-pushed the odoo-dev:master-account-lock-pos-imp-oco branch from 175e2b7 to 8c2022e Jan 11, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment