- 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 )
- 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
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
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.
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
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.
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.
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.
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
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
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 !
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.
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.
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.
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.
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.
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.
[IMP] revert a serious usability issue: people creating an address can
not select a state: it's weird to have to set the country first.
This reverts commit 24aba6014c.