Adds the option clear so that, if set to false, only some elements of the
control panel can be updated while keeping the other ones unchanged.
The breadcrumbs can then be updated by simply calling update_control_panel(),
instead of triggering a specific event to do it.
A bit of documentation and refactoring as well, mainly for the
breadcrumbs to be handled as other control panel's elements.
In edit mode, if this field is readonly and empty, its main div has
height 0 but its border is displayed. This rev. simply hides the field
in this case.
Make XML/HTML fields translatable like views
Add support for translating fields not as a whole, but as a value containing terms to translate:
- for such fields, the table `ir_translation` contains a set of (term, translation) for each record;
- use this support for the `arch` field of views, and convert translations of type 'view' into those;
- add "fuzzy" remapping of translations when English value of such a field is updated.
Convert translation types 'field', 'help' into corresponding translated fields of `ir.model.fields`.
Note: We do not translate `<a>` elements inline. Translating `<a>` elements is
triggering issues in the website editor tool: menu items are screwed up. The
menu items are handled by bootstrap, which expects menu items to be `<a>`
elements inside `<li>` inside `<ul>` elements. The introduction of a `<span>`
in the middle of this hierarchy breaks its functionality. Therefore we decided
to not translate `<a>` elements inline.
When invoking `read()` with `'website_editor`' in the context, missing
translations are automatically created, so that translated terms are always
wrapped as `<span data-oe-translation-id="...">...</span>`.
In view inheritance, selecting an element based on the attribute `string` is
broken, since this attribute may be translated before the inheritance is
applied. This fixes existing views to avoid such selections.
Also add constraint to prevent using translated attributes in view inheritance.
You may no longer select elements based on attributes 'string', 'help', etc:
<page string="Stuff" position="inside">...</page>
<xpath expr="//page[@string='Stuff']" position="inside">...</xpath>
HTML phrasing elements (like `<a>`, `<b>`, etc.) should be included in
translations. This avoids splitting phrases when translating HTML content.
Note that elements with qweb-related attributes (t-*) are not translated
inline.
Add tests on xml_translate().
Using `field.translate(callback, value)` returns the translation of the given
field value by using the function `callback` to translate simple terms in
`value`. In practice, the function `callback` uses a translation mapping
retrieved from `ir.translation`.
* add missing columns in base.sql
* add missing fields 'help', 'readonly', 'required', 'selectable' in reflection
* add field 'help' in `ir.model.fields` views
* do not patch registry with translated field string and help upon `ir.model.fields` update
* add the necessary fields in `ir.model.fields`
* when loading translations, convert types 'field', 'help' into 'model'
* add specific methods to retrieve translations of field string and help
Move local get_real_price_currency() of product_visible_discount into a real
function, to make it inheritable.
Modify a copy of the context to limitate the propagation.
Fixes#3717
There is no need in recomputing each time the link between pack operations and
moves, when changing a pack operation. It would change the remaining qty
on the move, but this is not shown anywhere.
In the tests of wise_operator, when moving pack operations to another picking,
the links shoud be deleted as it is not done somewhere else
When creating new Employee and linking to the existed user, this fix will
populate not only email address field, but also full name and avatar image.
Closes#7397
Instead of having only outgoing, manufacturing, incoming, all... traceability on the product,
we can define on the product if there is no tracking, lot tracking or unique serial number tracking.
On the picking type we can define whether we will only create lots for the picking type or use existing lots.
The lots are required when the product and the picking type demand it.
The option for serial number will check that each piece (quantity 1) has its
own serial number.
A lot splitting wizard is added on the pack operations in the picking form.
We want to be able to handle the case where we receive a lot of iPads e.g. and we
only assign a serial number when the product is delivered. For this, when the product is
delivered, we see that we only have products with no lots. When we see that we take something
without lot for something that needed one, we assign the lot to that piece of stock.
For negative quants: a positive quant with no lot can reconcile with a negative quant with/without lot,
a positive quant with lot, will preferably reconcile with a negative quant with the same lot, afterwards
with that without lot.