Commit Graph
38 Commits
Author SHA1 Message Date
Yannick Tivisse 7978d4ba0f Revert "[IMP] *: Define groups on res.users models"
This reverts commit 99f497b390.
2018-09-10 14:23:42 +02:00
Yannick Tivisse 99f497b390 [IMP] *: Define groups on res.users models
The reified view on the res users will be dropped in the following commit.

The previous commit adds support to define each group as a computed field on the res users.

This commit defines:
- A boolean field for each 'isolated' res.group, i.e. a group in the hidden category.
- A selection field for each 'Application' res.group, i.e. a group in a application category.

Example:
- The group to manage pricelist in sales becomes a boolean field
- The groups project user/manager become a selection field
2018-04-26 15:13:38 +02:00
dip-odoo a582f00dfa [IMP] product,stock,lunch: Uniformize 'Product Category' accross views and menus
PURPOSE
=======

Ensure terms consistency across Odoo

Specification
=============

All the menus and fields labels which are related to product.category should be named "Product Category" (if field label) and "Product Categories" (if menu entry)
2017-12-01 14:52:28 +01:00
Olivier Colson 52ed76ec70 [IMP] calendar, lunch: "recurrence" instead of "recurrency" in field labels, templates and comments 2017-10-02 10:42:57 +02:00
Olivier Dony 695716efb0 [FIX] P3: remove pycompat.{keys,items,values} helpers
Now that we're closer to switching to P3 for good, these helpers have
outlived their usefulness, and mostly add noise.

All remaining dict.iter*() or dict.view*() must be converted to the
normal keys(), values() or items() calls.

Whenever the result is likely to be used for more than the scope of a
loop, or when the dict needs to be modified during iteration, the calls
must be wrapped in a ``list()``, to protect the new P3 semantics.
Those cases are very exceptional.

Also removed some dead code or improved the API to remove unnecessary
conversions.
2017-08-20 23:25:54 +02:00
Christophe Simonis dd43071638 [MERGE] forward port branch saas-16 up to 278e478d55 2017-06-27 14:19:31 +02:00
Jérome Maes 39bf31ef75 [FIX] lunch: don't break lunch widget
In order to sort lunch order by date desc, the commit
9ab9da235f modified the
json structure (dict to array) of serialized 'previous_order'
field, without changing js code.
The previous order field should respect the new order, so
using OrderedDict does the job !
2017-06-23 11:31:08 +02:00
Xavier Morel b897dcde15 [FIX] P3: import pattern which doesn't seem to work right
``import odoo.addons.foo as bar`` doesn't seem to properly trigger the
import hook in Python 3 (it blows up on decimal_precision and
base). Thus convert *all* examples of that pattern to the more
sensible ``from odoo.addons import foo as bar``.
2017-05-22 13:30:50 +02:00
xmo-odoo fffaf735f5 [FIX] P3: list -> iterable builtins (#16811)
In Python 3:

* various builtins and dict methods were changed to return
  view/iterable objects rather than lists
* and the separate Python 2 view/iterable builtins and methods were
  removed altogether

This is problematic when using these items as list (which the happens
repeatedly in Odoo), but more viciously when iterating *multiple times*
over them (which also happens, which I've messed up multiple times while
writing this, and which is a pain to debug even when you've just created
the issue).

Convert all code using these to semantics-matching cross-version
helper functions to get the LCD behaviour between P2 and P3, and
forbid the builtins via lint.

issue #8530
2017-05-10 09:39:55 +02:00
xmo-odoo b4429c2a91 [FIX] Various P3-related import changes
* LDAP import: python-ldap is not python3-compatible, pyldap is

  Warning: only supported from debian Stretch (current testing)?
  https://packages.debian.org/search?searchon=names&keywords=pyldap

* implicitly relative imports
* imports of moved or removed stdlib modules

issue #8530
2017-04-28 09:06:53 +02:00
Thibault Delavallée 9ab9da235f [IMP] lunch: display latest orders first in previous orders widget and menuitem
Ozeurouïze zizisse madnesse !
2017-04-25 14:11:48 +02:00
Richard Mathot 8f199e4f20 [FIX] lunch: avoid unassigned variable
Since 54245deebd, when you clicked twice
on the button "Confirm" on a slow connection, you could get an error as
values is not always defined.

This commit fixes the bad indentation level :)
2017-04-20 09:16:03 +02:00
Martin Geubelle 90d6573579 [FIX] lunch: adapt the code to new views
We also adapt the code to comply to the new guidelines and we have
added some tests.
2017-04-19 17:49:34 +02:00
Richard Mathot cdd839d29c [FIX] lunch: display most recent line on top
Because when I want to edit my order of the day, I do want to see the
last order I made on top of the list.
2017-03-15 11:20:03 +01:00
Nicolas Martinelli 018144b8ac [IMP] lunch: new lunch widget
The JS widget is simplified, which a cleaner approach.
For the rendering part:
  - the server reads the data
  - the JS widget formats/organizes the data
  - the template renders the data prepared by the widget

Quick summary of the modifications:
1. The associated field is a text field which contains JSON-encoded
data. The data are read server-side, and not client-side anymore.

2. The widget is an AbstractField, no need of ReinitializeWidgetMixin
anymore. No use of the FieldMonetary widget directly, but use a similar
format_value instead (inspired by ShowPaymentLineWidget).

3. Data formatting (call to format_value) is done in the widget, not in
the template anymore. This seems to be the standard way of doing, since
lunch was the only module where format_value was in the template and not
in the widget.

4. The addition of an order line is cleaner since all necessary data
are prepared server-side.
2016-11-03 11:41:39 +01:00
Martin Trigaux 583e92b18e [FIX] remove default attribute on computed field
Which is useless when there is no inverse method
2016-09-02 12:03:41 +02:00
Pierre Masereel 770c9c4607 [FIX] lunch: remove required on user_id
* Since the user_id field is required, it was impossible to delete
  user when he had 'lunch.order' or 'lunch.cashmove'.
  We removed required arguments on 'user_id' fields in model and set
   "required='1'" on the fields in the view.
* There was a 'ondelete="cascade"' on 'order_line_ids' which does
  nothing because it's not supported on One2many fields.
2016-08-26 10:57:13 +02:00
Christophe Simonis 235ed4b2c1 [MERGE] forward port branch saas-12 up to 9ad5f26 2016-08-20 18:08:19 +02:00
Christophe Simonis 9ad5f26b3f [MERGE] forward port branch saas-11 up to 3a2147d 2016-08-20 17:18:31 +02:00
Christophe Simonis 3a2147d95c [MERGE] forward port branch saas-10 up to bc1a0a3 2016-08-20 16:57:36 +02:00
Christophe Simonis bc1a0a32ca [MERGE] forward port branch 9.0 up to 58cbcba 2016-08-19 16:59:29 +02:00
Thibault Delavallée c8a313d51e [IMP] various: use odoo for imports instead of openerp and update class names 2016-08-10 15:48:07 +02:00
Thibault Delavallée 90a5079d01 [FIX] various: fix fields index parameter in new API still called select 2016-08-09 10:26:53 +02:00
rap-odoo a5e7a4c8ae [IMP] Account,...: Change 'string' attribute on some fields to avoid repeated names
In odoo at many places the filter items are having repeated strings eventhough the
fiter works differently , so find all the places where this happens and give
proper string to each filter..
2016-06-08 14:02:23 +02:00
Kinjal Mehta 1409de5d36 [IMP] Convert UserError into ValidationError when only a message to display
When only a message argument is given to the crash manager, the popup display
"Error while validating constarint" and "None" with the warning message
which does not make any sense for the common user.
2016-03-30 09:17:42 +02:00
Parth Mehta 54245deebd [IMP] lunch: view improvement of previous orders.
Purpose:
1/ In the lunch app, previous orders list: the products are not displayed.
It is written X Records but you don't see the products name. Therefore
the information is useless.

2/ It is dangerous to be able to delete a previous order that has been
received (it changes the lunch account amount)

What is done:
In Previous Orders list :
- The view should be based on the sales orders lines. In that case, each
  line = 1 product.
- add a note column (between product and status)
- add a user column (between status and total)
- Rename Total into Price
- If order.line status = ordered or received, it shouldn't be possible
  to delete it. An ir.rule has been added to achieve this.
- An additional group access right check is made in the actions 'confirm'
  'cancel' and 'order' because they can be called in batch under the
  Action button.
2016-03-10 10:18:17 +01:00
Yannick Tivisse 8641681400 [IMP] Lunch: Archive products
Add a stat/toggle button on form view
Add a stat/toggle action on tree view
2016-01-07 10:53:32 +01:00
Nicolas Martinelli a1d3be1546 [FIX] delivery, hr_timesheet, lunch, product_uos, purchase, sale: unsupported digits_compute
The new API does not support the keyword `digits_compute`, `digits`
should be used instead.

opw-653092
2015-11-02 09:35:38 +01:00
Rashik kalathiya 897ac590b2 [IMP] lunch: usability improvement
View improved, remove warning message and improve search modal
2015-09-16 11:28:51 +02:00
Nicolas Martinelli 20a2bcd2f7 [FIX] lunch: previous orders
For some reason, the computed Many2many or One2many field is not
received through the onchange RPC call when creating a new order, but
only once the order is saved. This makes the widget displaying previous
orders kind of useless. We use this workaround with the default value
in order to be sure to send the value in the default_get call.

We also display previous orders and the agressive alerts in edit mode.
2015-09-11 12:02:23 +02:00
Jérome Maes 1addd02390 [FIX] lunch : do not display empty alert on form view 2015-09-08 09:37:53 +02:00
Richard Mathot a43c0c1108 [FIX] lunch: some users run systems localized in other languages than English
%A returns the localized name of the weekday, so we prefer use the
%numeric code.
2015-08-06 09:05:36 +02:00
David Monjoie 1ecd161757 [FIX] lunch: fixed cash move balance stat button
The awful code of a067129 didn't even work when
there really wasn't any cash move for a user for
which you didn't have the rights to read the moves.

Because there wasn't any move, there wasn't any
access error either.

We finally decided to hard-code the rule that
allows you to read the balance or not, which
renders it dependent of the actual access rules
of the system.
2015-08-05 16:16:03 +02:00
Valerie Pirenne a067129d4d [IMP] lunch: account balance on new order view 2015-08-05 10:43:44 +02:00
Fabien Pinckaers 1fe10b5417 [IMP] Supplier --> Vendor. American English 2015-07-09 16:10:09 -07:00
Nicolas Martinelli e658017f76 [FIX] lunch: return warning instead of UserError if amount order is larger than balance 2015-05-27 20:50:27 +02:00
Nicolas Martinelli 3d63c15a56 [MIGR] lunch: migration to the new API, cleaning and new
widget for displaying previous orders.

Detailed changes :
- previous order is not a computed field, with its own custom widget that has been designed
according the new spec for widgets;
- useless wizards have been removed, and replaced by some server actions that perform the
same action with less code and views;
- removed deprecated or incomplete reporting;
- some renaming to follow the new specifications of module coding
2015-04-23 10:27:08 +02:00
Thibault Delavallée 058d403309 [MOV] lunch: moved files according to new specifications in order
to prepare the migration to the new API. Some files have not been renamed
because they will disappear soon.
2015-04-23 10:27:08 +02:00