Commit Graph
36 Commits
Author SHA1 Message Date
Laurent Smet 5ee61b4af1 [FIX] account: Fix take money in/out in cashbox
'account_id' & 'name' are no longer valid fields to create a statement line since:
https://github.com/odoo/odoo/commit/caeb782841fc5a7ad71a196e2c9ee67644ef9074

closes odoo/odoo#52343

Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
2020-06-03 11:19:11 +00:00
Robin Heinz 2eb1cde534 [IMP] account, point_of_sale: take money from cash journal
When you have a cash journal, you have the opportunity to use a wizard
to easily create the statement. There are two wizards, one to add money
in the journal, and one to remove money.

To simplify the code and remove some duplication, we are now using only
one wizard, that will allow to add and/or remove money from the cash
journal.

TASK-ID: 1934784
2019-07-23 07:41:20 +00:00
Adrian Torres 4b38cc6590 [REM] *: calls to @api.multi
Multi is the default api for methods, it is not necessary to explicitly
decorate methods with it, adds clutter and most people use it because
they see that the rest of the code uses it.

Done with `find . -type f -name '*.py' | xargs sed -i '/@api.multi/d'`
2019-07-17 14:13:12 +02:00
Adrian Torres 9e71d57d11 [REM] *: remove calls to api.one and adapt code
Adapt all code that was using `api.one` to recordset-style method and
remove any and all calls to `api.one` in preparation for its removal.
2019-07-05 09:04:45 +00:00
Nimesh Jethva 7246170de6 [IMP]account_*: Improvement in model description
Purpose of this commit is to give description more "business oriented"
because those descriptions appears in Odoo Studio which is supposed to be used by end users, not only by developers.

Related Task ID : 37311
2018-09-21 11:45:14 +02:00
Benjamin Stiens 6383120f3b [IMP] all: Improve error messages
Many error messages are misleading or too "vague"
This task aims to improve all error message.

Task #47042
PR #23321
2018-05-28 16:45:48 +02:00
Yannick Tivisse d6e1d41128 [MIG] account: Migrate remaining old API chuncks of code 2016-08-08 12:24:40 +02:00
Nicolas Martinelli 6d51bce057 [FIX] account: money in/out in PoS
It is not possible to take money out or put money in for a PoS since it
leads to a traceback.

The decorator `@api.one` returns a list, which is something we don't
want when the method returns a dictionary.

opw-681417
2016-06-28 14:17:39 +02:00
Christophe Simonis 57168a9e90 [MERGE] forward port of branch saas-6 up to a669433 2015-09-23 14:34:26 +02:00
Christophe Simonis 71d03fa5b2 [FIX] glitches introduced during last forward-port (as always) 2015-09-22 16:08:49 +02:00
Joren Van Onder f5ad251686 [FIX] account: _compute_values_for_statement_line is not a valid compute
This allows people to use point of sale > sessions > put money in again.
2015-09-16 13:01:52 +02:00
Christophe Simonis 88eaa7dad8 [MERGE] forward port of branch 8.0 up to 35233db 2015-09-11 17:28:07 +02:00
Goffin Simon ba74cb9144 [FIX] account: Cash registers
In Accounting > Bank and Cash > Cash Registers, when clicking in "More" button
on 'Put Money In' or 'Take Money out', the date used for the bank statement line
created must be the date of the bank stattement(same behaviour then when clicking
on "Add item" in edit mode). It's forbidden to put/take money in/out for a bank
statement which is not open.

opw:647631
2015-09-08 13:16:02 +02:00
Christophe Simonis 3bb0cb2a50 [MERGE] forward port of branch 8.0 up to 9c8b99a 2015-09-04 18:30:48 +02:00
Goffin Simon ba8ef420eb [FIX] account: Put Money In
When a account.bank.statement.line is created by clicking on "Put Money In"
(Accounting(Menu)>Bank and Cash(Menu)>Cash Registers(Menu)>More(Button)>"Put Money In"),
the account.bank.statement linked to this line must be updated(by passing in the write of
this model) to compute the real closing balance. This fix allow to have the same
behaviour than when a line is manually added (with "Add Item) in an account.bank.statement.

opw:647631
2015-09-04 16:52:40 +02:00
qdp-odoo c04065abd8 [IMP] accounting v9. Yeeeeaah 2015-05-05 17:28:04 +02:00
Goffin Simon 0fd773a486 [IMP] Cleanup and refactoring of exception handling
Unify and refactor exception handling in framework and addons.

The generic `except_osv` is now deprecated, and replaced by more specialized exception subtypes:
 - `UserError` (renamed from Warning, as it conflicts with the built-in `Warning`) raised when a non-technical error occurs during a business operation. It could be a missing information in the data provided by the user, or a misconfiguration.
 - `AccessError`: raised when any operation is denied because the user conducting it does not have the required access rights.
 - `AccessDenied`: raised when an operation that requires authenticated access is attempted via an unauthenticated request.
 - `MissingError`: raised when an operation is attempted on a record that does not exist.
 - `ValidationError`: raised when an operation violates a SQL or Python constraint.
 - All other exceptions are internal errors due to a system problem or bug, and raised untouched to the client-side, which should display a traceback.

All exceptions take a single message argument.

The `test_exceptions` module has been updated to showcase both new and old (deprecated) exceptions.

A great many old `except_osv` had a useless title with "Error!" or "Warning", those have been removed, as this is handled by the client-side widget that displays the messages.

This commit introduces a more consistent policy for logging errors and warnings:
 - All messages that do not require administrator attention should be logged at INFO level or lower. This includes all errors that are notified to the user in a friendly manner, even for access right problems or validation errors during business operations.
 - All messages that indicate a likely misconfiguration or malicious use by the users should be logged at WARNING level, as they typically require administrator attention.
 - All other unhandled internal errors cannot typically be handled by the user and should be logged at ERROR or higher level, as they require immediate administrator attention.
2015-01-16 17:15:18 +01:00
qdp-odoo 5e20e7a302 [FIX] account, point_of_sale: fixed the feature to put money in or take money out of a cash register. Fix #1416 2014-08-11 13:18:17 +02:00
Jaydeep Barot 026e38b48f [REM] Unnecessary size parameters on char fields 2014-06-25 17:13:43 +02:00
qdp-odoo e3491ccb71 [IMP] account: bank statement reconciliation widget (part 2) 2014-05-30 18:47:50 +02:00
Olivier Dony 0f983a0146 [MERGE] Forward-port of latest 7.0 bugfixes, up to rev. 9183
rev-id launchpad_translations_on_behalf_of_openerp-20130531070107-7d2k818beg8965ll

bzr revid: odo@openerp.com-20130603121852-jdl6vlo9dmjk0rlc
2013-06-03 14:18:52 +02:00
Martin Trigaux 56a3b528f5 [MERGE] [FIX]account:in cash register if we put or take money its generate traceback
bzr revid: mat@openerp.com-20130528133435-v4b99yxh3hi523he
2013-05-28 15:34:35 +02:00
Thibault Delavallée a05b0bebbe [FORWARD] Forward port of 7.0 branch until revision 9143.
bzr revid: tde@openerp.com-20130521122359-b5vii7gv8arluz06
2013-05-21 14:23:59 +02:00
Martin Trigaux c8c298c83c [IMP] clean permissions and shebang in files
bzr revid: mat@openerp.com-20130514103113-8idhvhokt0e8jzea
2013-05-14 12:31:13 +02:00
Vo Minh Thu 39c88d0922 [IMP] account: cash.box.in defines its _columns, do the same for cash.box.out.
This is needed to solve an inheritance problem when adding a superclass
`base.model` (I guess this is related to the fact some code in the orm
does a copy from the class to the instance).

bzr revid: vmt@openerp.com-20130416132621-xo0lckimczqpvyos
2013-04-16 15:26:21 +02:00
Vo Minh Thu e69326ee3b [REF] removed explicit model instanciations.
bzr revid: vmt@openerp.com-20130415102349-vgcrfok2k5y10cwz
2013-04-15 12:23:49 +02:00
Raphael Collet 96ad608854 [IMP] general: use registry[X] instead registry.get(X) when X is dynamic
bzr revid: rco@openerp.com-20130329143720-80pkd4csemlk1aqz
2013-03-29 15:37:20 +01:00
Pinakin Nayi (OpenERP) 314ffef1be [FIX]account:in cash register if we put or take money its generate traceback
bzr revid: pna@tinyerp.com-20130215051334-rv7jppnn4q3fzkal
2013-02-15 10:43:34 +05:30
Cecile Tonglet a3939acfa5 [FIX] replace from/import decimal_precision by from/import openerp.addons.decimal_precision
bzr revid: cto@openerp.com-20121217152303-8e3b1x30rlw9cb0d
2012-12-17 16:23:03 +01:00
Vo Minh Thu e7f4891d46 [IMP] use the openerp namespace.
bzr revid: vmt@openerp.com-20121206145632-0h1coh5aaem65wsy
2012-12-06 15:56:32 +01:00
Stephane Wirtel 97de9d6d3f [FIX] point_of_sale: Set the right account for the internal account.
[REF] point_of_sale: Review the code for the Take Money Out and Push Money In.
[FIX] point_of_sale: Can post a session with an order in the invoiced state.

bzr revid: stw@openerp.com-20120905150538-v9ex7wehyebft7tu
2012-09-05 17:05:38 +02:00
Antonin Bourguignon 8a64e7580a [IMP] all the error messages now start with 'Error\!' (not 'Error' or 'Error \!')
bzr revid: abo@openerp.com-20120807113137-44vehm0mthqawlo3
2012-08-07 13:31:37 +02:00
Stephane Wirtel 85aec52251 [FIX] account: check if the journal exist on the account.bank.statement
bzr revid: stw@openerp.com-20120605120229-u37kbjcdp7nbpp6e
2012-06-05 14:02:29 +02:00
Fabien Pinckaers 341c6b0843 [IMP] PoS Backend
Improved layout of "PoS orders", "PoS Sessions" and "PoS Config" for useability
	Apply new design layouts for web client v7.0
	Rename PoS by Point of Sale everywhere
	Some typos, improved views
	Reviewed menu structure
"Default Point of Sale" field accessible through users preferences
PoS Config:
	Sequence is readonly
	Removed the "Draft" state --> easier, you do not need to active a PoS Config
	Default values on Shop and Journals
PoS Orders:
	Changed shop_id & journal_id on PoS Orders --> from normal fields to related field, depending on the session
Open Session:
	Fixed the wizard
	Several bugfixes and useability improvements
	Accounting Transactions posted at the close (not at the control)
Cash Registers:
	Lots of cleanups and bugfixes
Pos Sessions:
	Fixes and improved layout
	Better computation of all fields
	removed unused object "pos.config.journal"
PoS Orders:
	Default session_id

bzr revid: fp@openerp.com-20120512223743-b1vvbbybo8xq7e54
2012-05-13 00:37:43 +02:00
Stephane Wirtel 471bb6a67e [IMP] point_of_sale: show the opening and closing details
[FIX] point_of_sale: Use tools.translate library

bzr revid: stw@openerp.com-20120510074804-8jf12enzw3jghrrf
2012-05-10 09:48:04 +02:00
Stephane Wirtel ec308a08e7 [IMP] account: Add new wizard for the cash register "Take Money Out", "Put Money In"
[FIX] point_of_sale: Fix some bugs

bzr revid: stw@openerp.com-20120504125158-p45qfzo8mif6x9xe
2012-05-04 14:51:58 +02:00