Commit Graph
33 Commits
Author SHA1 Message Date
Kinjal Mehta 16d993a134 [IMP] account_budget,analytic,project: Some display improvements
1/ An empty notebook was created in analytic and filled in account_budget
   That way, we had a horizontal line while the module wasn't installed yet
2/ The fields use_task and use_issue displayed on the account.analytic.account
   are just redundant information. The probable use case is to go on the project
   select the issues management on it, and it will be activated on the related
   analytic account. I don't think that anybody will come on the analytic account
   to activate the issues. So we hide them in group_no_one
3/ On the analytic account form view, display the title label only in edit mode
2016-03-23 16:35:34 +01:00
Kinjal Mehta a57592abe4 [IMP] analytic: Replaced account_type field by active field
Currently there is a selection field 'account_type' on the
account.analytic.account model with 2 values : Active or Archived

Let's use an active field instead and add a Archive stat button on the
form. That way, we can remove all the domain ('account_type','=','normal')
which are implicit with the generic active field behavior
2016-03-23 16:35:34 +01:00
Damien Bouvy 150d74b6ea [IMP] analytic: add tracking of customer in chatter 2016-03-01 17:12:25 +01:00
Olivier Dony 1e729c7c5a [FIX] analytic: name_search with negative operators
The algorithm for matching analytic accounts based
on search term is only meant to be used for
simple, positive operators.
In other cases the results will not be what the user
expects. Falling back to the default name_search
behavior will be more useful.
2016-02-17 10:49:00 +01:00
Goffin Simon c090d9992a [FIX] analytic: _default_user
The "user_id" linked to the employee_id set on the sheet must be used
when editing a sheet.

opw:659647
2015-12-16 16:48:20 +01:00
qdp-odoo f6d6762dc7 [FIX] analytic: workaround to re-enable the feature to close an analytic account that has been unfortunately removed by mistake in commit 2a8c077.
It is using an already existing field that wasn't used anymore ('account_type') but as a lot of domains on analytic accounts were
 - wrong (still using old fields state and type that have been removed as well in the same commit),
 - or defined directly in the views
so, an update of some modules may be needed in order to avoid further problems.
2015-12-11 14:57:46 +01:00
qdp-odoo 7909a4409a [FIX] analytic: fixed name_search() on analytic account. The partner_id field is not mandatory, but the previous domain was making an inner join with the partner table, which resulted in not finding the accounts matching the search criteria on name/code if they hadn't a partner set. 2015-12-02 14:35:27 +01:00
Olivier Dony 3b833b2039 [FIX] analytic: optimize name_search for large databases
On databases with a large number of res.partner entries,
the extended name_search of analytic accounts was prohibitively
slow, due to the expensive name_search on res.partner.

Restricting the search to the partner name is extremely
similar business-wise, but makes a huge difference in
terms of speed. E.g. sub-second results vs 10+ minutes
for a database with 30k analytic accounts and 600k partners.
2015-11-24 20:00:58 +01:00
Nicolas Martinelli d62be72759 [FIX] analytic: hide account_type
`account_type` is probably not necessary anymore, but too late to
remove it.
2015-09-30 11:32:00 +02:00
Nicolas Martinelli b460f9a2aa [FIX] analytic: remove deprecated code
The field 'state' has been removed, so this is now useless.
2015-09-23 19:33:23 +02:00
Olivier Laurent d0faf28154 [FIX] analytic: methods used in default attribute should return a RecordSet
If a method used as a default returns an id instead of a RecordSet,
it could fail in 'convert_to_write' (Many2One field) because it will try
to return "value.id". If "value" is an integer, it fails.

Also changed the method to a lambda expression and removed the
'_default_user' method because it's not used anywhere.
2015-09-09 13:36:33 +02:00
Martin Geubelle 3acf8879d1 [ADD] *: add color field on tags 2015-09-07 14:20:36 +02:00
Damien Bouvy c823399c16 [IMP] analytic: remove unnecessary sequence
$
2015-08-31 20:23:08 +02:00
Nicolas Martinelli 1dbccc8215 [IMP] analytic: adaptation due to the new Sale module
Major changes:
- Remove reports
- Simplify models

Reason: complete rewrite of the Sale module.

Responsible: fp, dbo, nim
2015-08-27 18:10:18 +02:00
Christophe Simonis 95ac2cfd10 [MERGE] forward port of branch saas-6 up to be58335 2015-08-06 16:09:19 +02:00
Olivier Dony d52e996816 [FIX] analytic: prevent deleting contract template when in use 2015-07-28 17:46:16 +02:00
Christophe Simonis 97073e2a73 [MERGE] forward port of branch saas-6 up to 51040b6 2015-07-28 13:56:16 +02:00
Christophe Simonis 9d6786bc43 [MERGE] forward port of branch 8.0 up to 5e6ec89 2015-07-27 14:56:49 +02:00
Damien Bouvy ecdb8a60cb [IMP] sale_contract: recurring view refactoring, new fields and unit of measure
- add contract_type field on account.analytic.account and real_quantity on account.analytic.invoice.line
- refactor contract form and list views for better clarity (hide unnecessary fields depending on the type of contract)
- divide account_analityc_account class according to contract type for future work
- divide contract template menu in 3 menus depending on contract_type
- add on_change_uom behaviour on account recurring lines
- rewrite tests in python
- add new report (pivot & graph)
- end date of contract is now computed from the template recurring rules
- small fixes & usability improvements
2015-07-23 11:40:30 +02:00
Christophe Simonis 2cf91d16a5 [MERGE] forward port of branch saas-6 up to 63e92cb 2015-07-22 16:17:54 +02:00
Christophe Simonis d215a08db1 [MERGE] forward port of branch 8.0 up to 86d7f52 2015-07-14 15:57:39 +02:00
Christophe Simonis fe92deaa1d [MERGE] forward port of branch 8.0 up to 2de301d 2015-07-07 18:13:57 +02:00
Olivier Dony 0bd4545348 [LEGAL] Use global LICENSE/COPYRIGHT files, remove boilerplate text
- Preserved explicit 3rd-party copyright notices
- Explicit boilerplate should not be necessary - copyright law applies
  automatically in all countries thanks to Berne Convention + WTO rules,
  and a reference to the applicable license is clear enough.
2015-06-02 03:16:04 +02:00
Gaurav Panchal 3fe06da634 [IMP] project,project_issue,sale: display the current contract state on some various objects like issues or tasks.
Implements a dynamic widget for selection fields to display this state with color codes.
2015-05-08 11:20:54 +02:00
qdp-odoo c04065abd8 [IMP] accounting v9. Yeeeeaah 2015-05-05 17:28:04 +02:00
odoo-tac 14183ba2be [REF] Refactored hr_timesheet: Refactored the "timesheet" model in several modules. hr.analytic.timesheet is removed, and account.analytic.line is used directly to represent timesheets.
Also removed worklogs on tasks and replaced them by generic timesheets, i.e. account.analytic.line(s)
2015-04-28 10:31:18 +02:00
Jamin Shah 5428d46280 [IMP] analytic: better chatter message at contract creation, based upon its type 2015-03-10 16:39:30 +01:00
Thibault Delavallée d4e9640e34 [REF] mail: _track update.
_track is now a method that returns the subtype to trigger in a given
tracking context. A tracking will now lead to only one subtype
being trigerred, instead of having multiple possible subtypes.

Now, one tracking leads to one message with one subtype, or without subtype
if there is none matching. This simplifies the model for future evolution of
chatter and mail.

[IMP] project, project_issue: cleaned task and issue subtypes, now having
opened for created / assigned.
2015-02-24 16:28:51 +01: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 b92c6b3101 [IMP] base, ir_sequence: added use_date_range field on ir.sequence, that allows to have several sequences running for the same one depending on date ranges (similar to what was existing previously on accounting with FY, which is now deprecated) + port to new API 2014-11-21 10:09:29 +01:00
Christophe Simonis 709c9868de [MERGE] forward port of branch 8.0 up to e883193 2014-10-01 19:18:14 +02:00
Christophe Simonis 31bf30d2d0 [MERGE] forward port of branch 8.0 up to ed1c173 2014-09-05 15:28:22 +02:00
cod-odoo a301b4c7fc [MOVE] account: moved account/project files to analytic or account, depending on which module the moved code belongs to. This allows to remove references to project in account module. Also added some improvements in project when deleting a project (delete account if void) or when deleting an account (delete project if void). 2014-08-04 13:23:46 +02:00