The mimetime fetching in /web/image/... may fail if:
- calendar is installed
- `id` is a string (using ?id=42 in the URI)
- `id` is a negative number (company partners on odoo.com)
The `search` override of `ir.attachment` in calendar detects if a number is a
virtual ID when it contains a '-' and is a string.
While it is not optimal to allow both int and str format for paramter `id`, make
the verification of virtual ID in calendar more strict to only match the format
`<real>-<virtual>` and not `-<real>`
When we download a file (as can be done with attachments in Odoo),
firefox is opening the link in current window but cancel the action once
it is aware the resource is to be downloaded.
But this get firefox into a corrupt state for some contenteditable
features, for example document.queryCommandState which is needed for the
editor will after downloading a file throw an error consistently instead
of working as expected.
It can be reproduced on firefox (at least from version 32 to 46) with
the following snippet:
https://jsfiddle.net/s246u3ay/3/
The issue is probably linked to the following reported issue since 2005:
https://bugzilla.mozilla.org/show_bug.cgi?id=297494
This commit avoid the bug by opening attachments download links in a new
window instead of the current one.
closes#12109
opw-676918
- correct typos
- clarify some points, according to the community comments
- precise the xml notation : record tag vs act_window/menuitem/... tags
- add organization of report, wizard, data/demo, ... (directories and naming conventions)
- new conventions for 'symbols'
- ...
Thanks to @rim-odoo for its grammar extremist review, and @tde-banana-odoo for our long debates about wizard conventions.
The company logo file extension is always '.png', even if the logo is of
another type such as 'jpg' or 'gif'. This is not an issue for decent
browsers, but IE might not display the image under specific
circumstancies, e.g. in combination with nginx.
opw-676836
There is several override of create and write that assumes that a bank account
is present on only one account (see 4530e5d).
It is very hard to change or remove the account bank once linked to a journal
(see 4a65bc38) so it should not be set in the first place when duplicating a
journal.
opw-676374
When no stage has been defined for a project, the new issues are
set in an undefined stage(stage_id = False). Then these issues must
be counted.
opw:676985
The html_translate fields (e.g. website_descripton on product.product) were not
serialised and the raw value from the web_editor was saved as a translation.
This was an issue in case of special characters that may be present in the
translation. A translation containing non-breaking space was sent in html
(`foo bar`) while lxml converts such characters to unicode (`foo\xa0bar`).
When writing a translation, the value is checked against incorrect format using
```
value0 = field.translate(lambda term: None, record[fname])
value1 = field.translate({trans.src: trans.value}.get, value0)
value2 = field.translate({trans.value: trans.src}.get, value1)
if value2 != value0:
raise ValidationError(_("Translation is not valid:\n%s") % trans.value)
```
As value1 is the unicode version of the translation and `trans.value` is the
html version of the translation, the last substitution in the callback method
was never made and the ValidationError was raised.
This commit forces the serialisation through lxml to be sure the compared
strings are using the same parser instead of comparing value from summernote and
lxml that may be both valid but still different.
opw-675767
It makes no sense to recompute delivery costs at each update of the cart;
furthermore, it prevents users that already selected a carrier to remove
the last products of their carts
This fix is additional to e4e1e571c2
Used case:
-Configure company in EUR, and user in multi-currency
-Create a purchase order in USD and confirm it
-Click on the smart button "0 invoices" then click on "create"
Result before the fix:
The system created an invoice in EUR, currency of the company,
instead of in USD, currency of the purchase order.
Result after the fix:
The system created an invoice in USD, the currency of the related purchase order.
opw:677568
`debit_move_id` and `credit_move_id` of
`account.partial.reconcile` must be required.
Not having one of them set on this model
does not make sense, you cannot have a reconciliation
with a debit move but without a credit move, for instance.
Databases already having the trouble,
having partial reconciliations without
either a debit or a credit move,
had issues for the computation of the
`payment_move_line_ids` compute field,
which relied on the fact these fields
were supposed to be required. This revision
makes a retro-compatibility patch for these
databases already having the issue.
opw-677709
The left margin of the graph doesn't take into account the width of the
maximum Y-axis value. In case the values are high (> 10^7), they are
cropped.
The fix is to adapt the left margin as a function of the size of the
maximum value.
opw-676538
Add inputs e-mail address and country
when creating a newdatabase
This will provide the installation of the correct
chart of accounts at the installation of Accounting
Use the provided login as the admin login,
and set the email on the partner
if the login set is an email
Set the country on the company (and its partner)
The countries are parsed from XML country list
We take the opportunity to repair the `label for`
which bind the label with the input only if
the `id` attribute of the input is set with
what is set in the `for` attribute of the label
An issue occurs in the following situation. Several cash journal are
configured for a given PoS, and a user performs a refund (the
transaction contains only a refund). In this case, the wrong journal
might be selected. This is because a payment line of zero is not sent to
the backend, and therefore an arbitrary journal is selected.
opw-676229
The _auto_init method was overriden without keeping the return value of
the super on some models.
This break the new stored computed fields computation at field creation.
Closes#11985
opw-677232
Before this commit, in some cases, clicking on 'save' button, then on
other buttons (like 'validate' in invoices) had the unfortunate effect
of applying twice the changes in some cases.
More specifically the problem appears when:
1. an onchange is triggered (for example, taxes in invoices)
2. the user clicks on 'save', buttons are disabled
3. the 'save' actions is completed, the buttons are enabled, but
the on_button_save still does some work: triggering event, and
reloading the view
4. the user clicks on 'validate'
5. the onchange completes, this triggers some more work
Our only protection against such interactions is right now the fact that
buttons are disabled/enabled. In my opinion, there should be a way
to guarantee that actions are properly serialized (that is actually what
a mutex is for... just saying). But the code of the form view/list view is
too coupled, and such changes are quite dangerous. A real refactoring
of those is needed at some point in the future.
Before this revision, the installation instructions where
Community-centric, which led some customers to believe
that they had to install first Community then Enterprise.
This commit makes the instruction compatible for both editions.
purchase.order have been rewritten with cb01be2
It was not taken into account for intrastat who still used the now not
existing "location_id" on purchase order.
This commit use instead the method _get_destination_location which
should be equivalent.
opw-677497
The lang of the content of the "Share" widget was the one used when
inserting it in the view. Thus if someone see a page with it in another
language the title and url for sharing is not translated.
This commit use the current page language to set the widget data.
opw-676062
When dropping a record, it is updated and rerendered. The problem with
this behaviour is that if the record is redrag immediately after drop,
jquery-ui throws an error as the widget the user is trying to re-move
is being rerendered.
The solution provided by this commit is to block the draggable feature
while the record is being rerendered.
Commit 3ced0ff61 removed the support of Microsoft documents for
indexation. It makes sense for the old formats such as '.doc' since it
requires an external tool ('antiword'), which could lead to a security
issue. However, the new formats such '.docx' are simple xml files,
therefore they could be indexed with the usual XML parsing tools.
opw-677235
This reverts commit b0f02e31b2.
As pointed out by @nim-odoo [1], a similar patch has already been
uncommited few month ago [2].
Ref #11988
opw-676422
[1] https://git.io/vrYxY
[2] see a6badd2559