Commit Graph
107205 Commits
Author SHA1 Message Date
Raphael Collet d0ca2d115e [REF] ir_config_parameter: remove group_ids and simplify
Add `sudo()` to call `get_param` where necessary, and make the web client use a
controller instead of directly accessing parameters.
2017-01-03 16:52:49 +01:00
Raphael Collet 7543afb070 [IMP] base, *: tighten ir.config_parameter access rights
Add `base.group_system` on existing parameters:
 - `auth_signup.allow_uninvited`,
 - `auth_signup.reset_password`,
 - `auth_signup.template_user_id`,
 - `google_redirect_uri`,
 - `mail.bounce.alias`,
 - `mail.catchall.alias`,
 - `mail.catchall.domain`.
2017-01-03 16:52:49 +01:00
Raphael Collet b392426295 [IMP] sale: tighten ir.attachment access rights
The salesmen and sales managers should belong to `group_user`.
2017-01-03 16:52:49 +01:00
Raphael Collet 1539887ce2 [IMP] base: tighten ir.actions.* access rights
All users have read access on `ir.actions.server`.  Add `group_system` on some
fields to make server actions a bit more discrete about what they do.
2017-01-03 16:52:49 +01:00
Martin Trigaux 19fce206ac [I18N] port of 44a6366b to master 2017-01-03 16:39:22 +01:00
jeffery chen fan f89c4c2002 [FIX] mrp: typo in the error message
Closes #14854
2017-01-03 15:35:39 +01:00
Denis Vermylen (dve) 8203cdb9ff [IMP] hr_attendance: code cleanup 2017-01-03 13:53:30 +01:00
Denis Vermylen (dve) 287968e66e [IMP] hr_attendance: remove entered PIN if wrong
So you don't have to click on Clear before re-entering the PIN.
2017-01-03 13:53:30 +01:00
Denis Vermylen (dve) c60b2c6a14 [FIX] hr_attendance: fix display issues
- in employee form view: separate "Status" group from "Attendance" group
- make "Attendance" group only visible to attendance officers
  this also fixes the use_pin group that would everyone to view pins if enabled
- in employee kanban view, fix the removal of the attendance widget to display
  the fa-user icon again, instead of a simple red dot. (commit c468cfdd69 )
2017-01-03 13:53:30 +01:00
hbh 158f779b46 [IMP] Various usability improvments on attendance and HR application,
- Print Badge report set as pdf instead of html
- Replace the 'Status' separator by 'Attendance' in HR Settings tab
- Add a new Stat button 'Attendance' and set icon as a last action of employee
- 'Manual Attendance' field should only be visible if 'Related User' field is set
- 'PIN' field should only be visible if in setting enabled
- 'Payslips' stat button not displayed if user has no access rights
- If no start/end dates selected then '-' will be removed on 'Trial Period Duration' field
- Rearrange fields on employee form's 'Contact Information'

[IMP] Various usability improvments on attendance and HR application
2017-01-03 13:53:30 +01:00
hbh 8cfd857b82 [IMP] web: set right alignment for float values on grouped records 2017-01-03 13:53:30 +01:00
dut-odoo 6c38bdaf35 [IMP] purchase: Improve the settings form view 2017-01-03 11:46:52 +01:00
dbh 22b91872ec [IMP] mail: add delay of 500ms to display the canned responses 2017-01-03 10:37:29 +01:00
Nicolas Lempereur 5d0b928544 [IMP] mail: don't clear undelivered chatter message
When a message is sent on the chatter and the call fails (for example
because of an internet connection failure), the message was still
cleared so the content was lost.

This change keep the same behavior for chat window and discuss, but
change the behavior in a chatter so the message is only cleared if the
rpc has passed.

closes #14759
opw-696971
2017-01-02 17:37:42 +01:00
Simon Lejeune 13af401bc2 [FIX] QWeb: xml namespaces and t-call
Before this commit, when a t-call attribute triggered the compilation of
a template, the compilation of this template was not aware of the nsmap
of the parent, resulting in redundant xml namespaces declaration.

With this commit, we pass the current nsmap through the `options` dict.
2017-01-02 16:12:22 +01:00
Simon Lejeune 0d3af7ce1c [FIX] ir.ui.view: locate_node of a ns prefixed element
According to [1], "If your XPath expression uses namespace prefixes, you
must define them in a prefix mapping.". It makes sense because an xpath
to a prefixed tag is not able to uniquely locate the tag in the parent
view (it is possible to redefine the ns definition of a prefix, so you
could have multiple elements matching).

We chose to define the nsmap to locate the element in the parent view by
using the lxml internal form to qualify a node ({ns def}tagname). This
form is not compatible with etree.xpath but is with etree.ETXPath.
Fortunately, etree.ETXPath is compatible with the classic xpath
expressions so we'll use this one by default in `locate_node`.

A test has been introduced to showcase the problem.

http://lxml.de/xpathxslt.html#namespaces-and-prefixes: Namespaces and prefixes
2017-01-02 16:07:06 +01:00
Simon Lejeune 2d3c928d47 [ADD] QWeb: xml namespaces support in dynamic template
This is very similar and almost copy pasted from the implementation in
static template, as the main method `compile_node` will either call
`_compile_static_node` (which we patched in the static implementation)
or `_compile_directives` which will call `_compile_tag` in the cases
where xmlns matter (at least that's my understanding for today). So we
patch `_compile_tag` the same way than `_compile_static_node`. It would
be nicer if the method wasn't completely different and in two parts, but
hey.

This method is not always called on leaves, so setting options['nsmap']
to a copy before processing the content of the node is necessary (a node
with a nsmap and a t-attf- having a child with an nsmap: the child has
to be aware of the nsmap of its parent).

Note that we set the xmlns attribtue before calling
`_compile_all_attribute`, which will probably break xmlns set by t-*
tag. However, we don't plan to support that the moment.
2017-01-02 16:05:58 +01:00
Simon Lejeune 45d26bc257 [ADD] QWeb: xml namespaces support in static template
With this patch, QWeb is able to support xml namespace declaration and
prefixes. As this patch only deals with static template, the only method
we have to patch is `_compile_static_node`. We make it able to serialize
etree node having an nsmap by formating them to restore the xml prefix
if present or to declare the xmlns attribute if needed. To know if the
namespace definition is needed, we compare the tuples of (xmlprefix,
xmldefinition) of the node and its parent. The namespace definition of
the parent is passed by a dict in the `options` key. We took care of
dealing with the mutable + recursion thing by working with copy of this
namespace definition dict.

Two tests have been introduced, basically what we pass to QWeb is what
it has to return.
2017-01-02 16:05:50 +01:00
Christophe Simonis b3a1109372 [MERGE] forward port branch 10.0 up to c08a590bb1 2017-01-02 15:31:58 +01:00
Raphael Collet 45352512a8 [REF] translate: rewrite XML translator to handle namespaces gracefully (#14816)
The class `XMLTranslator` is replaced by a function `translate_xml_node` that
takes an XML node and returns the translated XML node. The translation process
is done by a recursive function on XML nodes that returns the untranslated node
if it can be translated inline, or the translated node otherwise.
2017-01-02 15:16:18 +01:00
Christophe Simonis c08a590bb1 [FIX] purchase: correct fifo test
Oversight of previous forward-port.
2017-01-02 15:07:14 +01:00
Christophe Simonis 81f59cee2c [MERGE] forward port branch saas-11 up to b844d93889 2017-01-02 14:38:59 +01:00
Christophe Simonis b844d93889 [MERGE] forward port branch 9.0 up to 3805eb620a 2017-01-02 12:49:55 +01:00
Christophe Simonis 3805eb620a [MERGE] forward port branch saas-6 up to 7be1a1c55b 2017-01-02 11:42:52 +01:00
Christophe Simonis 7be1a1c55b [MERGE] forward port branch 8.0 up to 2b8fcfc08b 2017-01-02 11:22:45 +01:00
Damien Bouvy d3538dbe47 [FIX] payment_ogone: migration error
Only happens if Ogone answers with "wait", which explains why it
took so long to happen.
2017-01-02 11:11:49 +01:00
Goffin Simon 7fc1a3ca7b [FIX] mrp: Computing the qty of the BOM Structure report
Each qty of a line in the BOM Structure report must be computed in
the uom of its BOM line.

Example:

With 2 products: A, B

BOM A: 100 kg of A is produced by 5t of B

So 1kg of A needs how many t of B ?:

In the code:
qty_per_bom = 100 kg expressed in the uom of B => qty_per_bom = 0.1t
qty = 1 kg expressed in the uom of B => qty = 0.001t
l.product_qty = 5t
qty of B = (l.product_qty *qty)/ qty_per_bom = 0.05t

opw:697502
2017-01-02 10:37:08 +01:00
Leonardo Rochael Almeida 47536a3f7d [IMP] web: allows styling of the pager counters
Before this commit, the pager counters and buttons were at the same
level, and could not be styled independently (with some rules such as
nowrap).

Close PR #14865
2017-01-02 09:06:57 +01:00
Odoo Translation Bot e8b0c1db69 [I18N] Update translation terms from Transifex 2017-01-01 04:42:12 +01:00
Odoo Translation Bot 2b8fcfc08b [I18N] Update translation terms from Transifex 2017-01-01 02:58:08 +01:00
Odoo Translation Bot 072906795c [I18N] Update translation terms from Transifex 2017-01-01 00:30:05 +01:00
Fabien Pinckaers ee9341366e [IMP] account: invoice analysis type: done -> paid 2016-12-30 13:20:19 -08:00
qdp-odoo bdab2b9118 [FIX] account: fix cash based tax entry when registering a payment, in case of a 0% tax 2016-12-30 21:01:35 +01:00
qdp-odoo 4f29b77e3d [MERGE] foward port of 10.0 up to revision 84a650e33a 2016-12-30 17:21:25 +01:00
mdi-odoo 33a413eb29 [IMP] sale*: Improve the settings form view 2016-12-30 17:05:08 +01:00
Jérome Maes 7534f627b3 [IMP] base,forum: improve user preference view
Karma is now displayed on preference view. Also,
add a empty group to allow other module to set their
preference parameters on this form view.

Little big details are important !
2016-12-30 17:02:25 +01:00
Jérome Maes 2da8460a89 [IMP] mail: add integrations menuitems, but invisible
This allow modules to plug into mail configuration
on channel.
2016-12-30 17:01:55 +01:00
Thibault Delavallée 84a650e33a [FIX] resource: fix computation of limited attendances
Due to an error introduced when migrating the module at new API
at commit a4e57ea16c limited attendances
having date_from and / or date_to were not correctly taken into
account.

Tests have been added to avoid regression.
2016-12-30 16:38:02 +01:00
Nicolas Lempereur 5869cd6bd0 [FIX] website_customer: error if customer without countries
For customer without countries, we get False instead of tuple:
 (country_id, 'country name')

Introduced by a35cce2008.

opw-703234
2016-12-30 15:27:48 +01:00
Nicolas Martinelli a71cdd02ec [FIX] payment_paypal: documentation link
The Paypal URL doesn't exist anymore. Redirect to Odoo documentation
instead.

opw-697606
2016-12-30 15:01:43 +01:00
Haresh Shyara fa8561aa49 [IMP] hr_recruitment: Improve the settings form view 2016-12-30 14:14:18 +01:00
Nicolas Lempereur eb2d598935 [FIX] auth_oauth: dup fail if odoo oauth provider removed
It is unwise to delete it (it can simply be disabled) but it can be done
(and other part of the code take it into account).

opw-703196
2016-12-30 11:29:48 +01:00
Thibault Delavallée b46e6f4bb6 [REV] Revert "[IMP] base: code aestetic, res_country & state"
This reverts commit b70fe586f2. This commit
breaks the master branch.
2016-12-30 11:13:37 +01:00
Thibault Delavallée 56645335b7 [IMP] gamification: improve email sent when granting a badge
Give some details about the badge: its description, its image, who granted
it, ... Otherwise it is quite complicated to understand the email content.

Thanks to @mart-e who reviewed and tested.
2016-12-30 10:46:12 +01:00
Thibault Delavallée 64ea747824 [FIX] mail: fix record model and ids management when posting using a template
Posting on a document not inheriting from mail_thread was impossible
due to several crashes or wrongly set variables. Some cleaning is planned
in those methods as there are a lot of unnecessary computation. This will
be done in another commit. Probably.
2016-12-30 10:45:39 +01:00
Thibault Delavallée 72d988cba5 [FIX] mail: fix message creation for models not inheriting from mail_thread
You may want to send emails related to a document not inheriting from
mail.thread. In that case we have to use the default computation of
reply_to and not call a method defined only if the model inherits
from mail.thread.
2016-12-30 10:44:39 +01:00
Fabien Pinckaers b70fe586f2 [IMP] base: code aestetic, res_country & state
[FIX] base: country & state, enforce the max number of records to the requested limit
2016-12-30 01:38:42 -08:00
Thibault Delavallée 655c70319d [IMP] mail: hide Unsubscribe button in channels using group-based subscription
Group-based channels automatically add people belonging to user groups to the
channel. If a member leaves the channel he will be automatically added back
by the channel automatic subscription. This generates unnecessary changes and
messages in the channel.

We now prevent people from leaving group-based channels. All group members
have to be channel members. Unsubscribe buttons are therefore removed for
those channels.
2016-12-30 10:28:42 +01:00
Jérome Maes 082eef133d [FIX] account: invoice should be stored the first it is printed 2016-12-30 09:50:29 +01:00
Nicolas Martinelli e1deead1cb [FIX] account: reintroduce tax lines in invoice
Commit d861cdc1c4 introduced the tax group feature. The tax line
details were removed from the printed invoice in favor of the tax group.

However, it requires that all tax groups are correctly defined in the
localization, otherwise the printed invoice doesn't show the required
tax details.

The correct fix, which is the complete definition of the tax groups,
will be done for the upcoming v11 version. In the meantime, this simply
introduces back the tax details table.
2016-12-30 09:16:08 +01:00