First of all we restrict the domain, of the action that shows product
packagings, to only show the packagings having a 'product_id' which
means that they are 'Product packagings' and not 'delivery' or 'stock'
packagings.
We also add the field product packaging to the 'product.packaging' form
view to easily create product packagings from the product packaging tree
view.
The menu item showing product packaging types was stored in
'stock_quant_views.xml' instead of 'product_views.xml' which seems a
more appropriate location, because the related action, only use products
and packaging, and not quants.
When our warehouse is configured to work as 'pick -> pack -> ship'
only the last picking (ship) has the information of which carrier
is set for this delivery.
This is a problem, because we also need the information in the packing
zone, to put in a pack with the correct package type.
To fix this problem, instead of overriding the function 'action_confirm'
which put the 'carrier_id' only on the 'ship' location. We set the
'sale_order_id' on the procurement groups created from the sales
order, and propagate it to the picking through the stock moves
from the procurement group.
Currently, the packaging of products are set on product.template, which
will cause problem if we use vatiants and packaging.
So we move the packaging from product.product to have the possibility to
have different packaging on different product variant of the same
product template.
When you activate the use of products packaging in 'stock' module, it
doesn't change anything in the product view if the app 'purchase' is not
installed.
We have this problem because the insert of the product_packaing view in
the product_template form is done in 'purchase' module instead of
'product' module.
To fix this issue, we had to move the page 'Inventory' from 'stock'
moduile to 'product' module. And the group 'packaging' form 'purchase to
'product' module.
On the website settings, it was intended to have a link to the Sales Settings when sale_ebay is installed.
As there's no link between the website and sale_ebay modules and we didn't want to create a bridge module only for that, we decided to remove the link.
The warning in not coherent anymore and should be changed
The computed field `domain` was formerly read as the current user to evaluate
the rule's domain for the current user. As we restrict the access of `ir.rule`
to advanced users only, the computed field has no purpose anymore.
Remove unrestricted "read" access. To make code internally using `ir.model`
work, add a private method `_get` on `ir.model` to retrieve the record
corresponding to a model name, without access rights issue.
Change signature of method `get_authorized_fields` to make it use a model name
instead of a model id. This removes the necessity of a search on `ir.model`.
- 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