Skip to content
Snippets Groups Projects
  1. Jan 03, 2017
  2. Jan 02, 2017
    • Nicolas Lempereur's avatar
      [IMP] mail: don't clear undelivered chatter message · 5d0b9285
      Nicolas Lempereur authored
      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
      5d0b9285
    • Simon Lejeune's avatar
      [FIX] QWeb: xml namespaces and t-call · 13af401b
      Simon Lejeune authored
      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.
      13af401b
    • Simon Lejeune's avatar
      [FIX] ir.ui.view: `locate_node` of a ns prefixed element · 0d3af7ce
      Simon Lejeune authored
      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
      0d3af7ce
    • Simon Lejeune's avatar
      [ADD] QWeb: xml namespaces support in dynamic template · 2d3c928d
      Simon Lejeune authored
      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.
      2d3c928d
    • Simon Lejeune's avatar
      [ADD] QWeb: xml namespaces support in static template · 45d26bc2
      Simon Lejeune authored
      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.
      45d26bc2
    • Christophe Simonis's avatar
      b3a11093
    • Raphael Collet's avatar
      [REF] translate: rewrite XML translator to handle namespaces gracefully (#14816) · 45352512
      Raphael Collet authored
      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.
      45352512
    • Christophe Simonis's avatar
      [FIX] purchase: correct fifo test · c08a590b
      Christophe Simonis authored
      Oversight of previous forward-port.
      c08a590b
    • Christophe Simonis's avatar
    • Christophe Simonis's avatar
      b844d938
    • Christophe Simonis's avatar
    • Christophe Simonis's avatar
      7be1a1c5
    • Damien Bouvy's avatar
      [FIX] payment_ogone: migration error · d3538dbe
      Damien Bouvy authored
      Only happens if Ogone answers with "wait", which explains why it
      took so long to happen.
      d3538dbe
    • Goffin Simon's avatar
      [FIX] mrp: Computing the qty of the BOM Structure report · 7fc1a3ca
      Goffin Simon authored
      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
      7fc1a3ca
    • Leonardo Rochael Almeida's avatar
      [IMP] web: allows styling of the pager counters · 47536a3f
      Leonardo Rochael Almeida authored
      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
      47536a3f
  3. Jan 01, 2017
Loading