The witdh and height auto has apply on image, when the mass_mailing
clean_for_save is called, the image is considered as invisible because
the with is temporary null.
opw-692805
- Y axis : according to 12 hour or 24 hour format
- Event title : following time format in preferenced language
NB: The conversion from 'A' to 'TT' to match fullcalendar v1 should be
removed when fullcalendar is updated to v2, as the syntax will change.
See : http://fullcalendar.io/wiki/Upgrading-to-v2/
Backport of commit c1d813ec1c
opw-704237
By default, the default warehouse of a sale order is the first warehouse
of the company of the user creating the sale order.
In the case of a sale order created from the website,
the user who is creating the sale order is the superuser,
a.k.a the administrator.
There was a big issue in the context of a multicompany database,
with an administrator changing of company:
the sale orders coming from the website would suddenly change
of company, which is wrong.
This was even more severe when the admin changed to a company
which had no warehouse defined:
It was then impossible to create the website cart, as no default warehouse
was found, while the warehouse is a required field on the order.
This revision ensures that the cart / sale order is always created
under the website company
opw-704557
The price suggested thanks to the "Compute from BoM" button only takes
into account the price of the products listed in the BoM lines.
In v9, there was a "Recursive" option that provided the possibility to
compute the prices of all products implied in the BoM, recursively. This
option has been removed since it was leading to a "black box" behavior
that was unclear to the users.
However, limiting the price computation to the BoM lines only is too
restrictive since it doesn't even take into account the phantom BoMs.
By using the `explode` method, we have access to:
- all products not manufactured
- all products manufactured which are not kits (phantom BoM)
It means that the cost of manufactured products (not kits) should still
be computed before the product itself.
opw-697866
When a product template UoM is different from its BoM UoM, the price
suggested thanks to the "Compute from BoM" is incorrect, since it doesn't
apply the conversion rate between the product template UoM and the BoM UoM.
This is because we try to fetch the product UoM through the BoM. However,
if the BoM is not specific to a product.product, the field bom.product_id
is empty.
The issue is introduced by revision
d465346f1e
Raphaël actually meant
`res_ids = data.mapped('res_id')`
Indeed, there is no `res_ids` field on `ir.model.data`,
but there is a `res_id`.
In addition, the same code is written correctly in the method
just above this one, `_object_find`
opw-704592
In 07bf7bf4f3 a fix was introduced for windows server UTC timezone.
It is possible it would be helpful in some situation to also have it in
setup/odoo (for example if odoo was installed on windows in some other
way than the Installation bundle).
opw-693764
Up to now, there was no possibility to format a date
within a specific language, such as the customer
language. The date was always displayed with the format
YYYY-mm-dd.
(There was for the datetime, thanks to format_tz, but
not for a simple date without time)
This revision adds this possibility, but doesn't change
the according email templates
(such as the invoice date on the invoice email template)
as it would require to update all translations, in
the .po files and on transifex.
If a user absolutely want this, he has to add
the call to `format_date` himself, manually.
opw-704260
With the previous condition, the `final_date`
was not recomputed when the number of repetitions
(count) was changed alone, without changing `recurrency`
(nor with other fields, such as start/stop date)
This revision makes sure to recompute the `final_date` when
there is a change in the number of repetitions without
changing the `recurrency` fields, when the event is recurrency
and the end type is `count`
opw-703812
The double inversion introduced by 6e063188 is done to catch default 0
values.
For example '>= -3' is transformed in "NOT what is found by < -3".
There was an issue with '> 0' and '< 0' since in these instance 0 don't
match and the inversion must not be done.
opw-703929
If the user enters an incorrect grouping format, login won't be possible
anymore since the web client will crash when parsing the field value.
For example, "[3, 0,]" will trigger the issue.
Complement of commit 5959c41631
opw-704388
In 3041efb, it was introduced a partner_id reset when project_id is
False, but this causes you can't apply default values to partner_id
directly.
One use case where happens:
* Go to Sales > Customers.
* Select one customer.
* Click on the smart-button "Tasks".
* Create new task.
Before this commit, the customer where you come from is assigned.
After this, no partner is selected.
If the user writes a password larger than 4096 characters at the login
screen, it causes a crash instead of displaying the "Wrong
login/password" message.
The Python library used to hash password (passlib) is by default limited
to 4096 characters. Above this limit, it raises an error (source:
https://pythonhosted.org/passlib/lib/passlib.exc.html).
Allowing a password larger than 4096 is not necessary, we just limit the
field maximum length since such a situation should happen because of an
incorrect copy/paste.
opw-704110
When you pass a dict to `.with_context()`, it completely replaces the context,
removing the language from it.
This causes that when the publisher publishes a slide in another language, the
template gets mixed languages rendering.
Closes#15017
Fine tuning of this commit: 69c41c7
When cancelling a payment, the remove_move_reconcile function was called and
it removed the payment from the invoice and in the payment history, only the
validated payments were kept.
This commit keeps the behavior before this commit: 69c41c7
opw:691692
Invoices created automatically by the payment acquirer must use the
correct accounts/journals, which may not always be the case if not
explicitly set in the context.
Set the company rounding policy to "Round Globally". Create the
following SO (or PO), with a 7 % excluded tax:
- Qty Price
- 880.000 5.79
- 120.000 4.36
- 28.000 2.88
- 68.000 11.09
- 35.000 5.20
- 35.000 5.32
The total tax on the SO is 477.48, while it is 477.50 on the invoice
generated from the SO.
FORWARDPORT UP TO 10.0
Fixes#13687
opw-703519
In the worst case, user is not logged in and he will really have no access and
will have a perm read error after login. We cannot check if an unknow user has
access or not.
In most cases, user will be logged in and will see the document directly if
he has access or will be redirected to messaging if no access.
In the best case, he will be redirected to login page before to see the message.
task-22505
The forward-port of the above revision missed
the conversion to the new api and that
`context` had to be replaced by `self.env.context`
Fixes#14922Closes#14923
An italic node would be taken as a basic node containing text and thus
would be merged unexpectedly.
For example with the following content : "<i>hello</i> world" removing a
letter of 'world' would merge the text node with hello making it italic.
opw-703722
This commit fix wrong grouping when we format price via price_to_str.
where '[3,0]' was interpreted as string and not array in intersperse.
Thousand separator was duplicated ",,,320.00" e.g.
This commit fix also product page where amount for variant was formatted
js side before that RPC translation (website.ready() defered) was resolved.
'/website/translations' is only called when user have rights to edit page.
So a standard user didn't call it and l10n is not initialized.
After an update, now we format the amount with the l10n value.
To stay retro compatible, if l10n is not initialized (value = [])
we use [] for grouping as 'fallback value'.
To fix decimal precision you need to update the template product_price.
To fix the grouping, you need to update the website.layout
To fix the decimal separator, (and previous fix), you just need to pull the JS
This commit is related to #1103, #11553, #14772, #14874, ...
And fix the previous fix odoo/odoo@1f10ef8055
It should also fix (by side-effect) the translation JS for user without editor
right.
Already fixed in V9 - don't forward this commit...
In the Lead Automation module, the module is working as expected when
the activity type is 'Email'. In other cases, the corresponding methods
are not implemented and raise an error.
opw-697829
According to the routes set on the products of the raw materials, a
procurement may have to be created for the consumed lines of the MO.
A route may also be set on a product category. Before this patch, we
only look for procurement rules for the routes defined on the products
and on its category, ignoring the inherited route of the parent category.
Fortunetaly, we have a computed field on the product model returning
all the routes from the current category, so we use this one in the
search for procurement rules.
A test has been added to show the failure.
Before, when the routing of a production order was empty (no operations),
it got into an inconsistent state (you click on "plan" and nothing happens).
Empty routings were used before to do subcontracting or 2-steps inventeory
(we did not set any operations on the routing but we set a location).
Here, we change the related routing field on the production order into a
calculated field which becomes empty when the routing has no operations.
This way, the "produce" button is displayed (as for production orders
without routing) and working/
This is a temporary patch to workaround the issuein a stable release.
In master, we might remove the location on routing and place it on the
workcenters and put a constraint that does not allow an empty routing.