Purpose
=======
If a user specifies a language on a company (res.partner), chances are children
of said company will speak the same language. It is at least most likely than
having them speak the default DB language.
Specifications
==============
If a language is set on the parent, the child contact created from the o2m
should have by default the same language.
Before this commit, we set lang in the context of the o2m field but it not
taken into account and is overriden by the default DB lang.
After this commit, the default lang value is forced in the default get to
be the same than the parent, if any. Else, we fallback to the default DB lang.
Link
====
Task ID: 2210350
PR #48077
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Display the kanban view for the `picking_ids` field in the picking batch
form when user is on mobile mode.
closesodoo/odoo#48313
X-original-commit: 2c022a285fde3ccc34398c94e331ae3473d79559
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
Display the operations (`stock.move`) in the picking form view as
kanban view when the user is in mobile mode.
X-original-commit: c3488d625a5e939de6a5b2d41b5029640e0790f5
This module define same `export.integer` model that is in `test_impex`
module, but do not define model access.
So if you only install `test_xlsx_export` the test will work but you
will get a warning over "The model export.integer has no access rules,
consider adding one".
opw-2204111
closes#48293closesodoo/odoo#48308
X-original-commit: 92761b7877d63e2432cb246f5078c22b1b0f24ea
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Commit abef168389 adds the fields
'product_description_variant' on mrp.production and purchase.requisition
models. This text is taken from the product variant.
This commit make them invisible in case they are empty.
closesodoo/odoo#47716
Related: odoo/upgrade#948
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
Sales Order notes were not passed in when generating the invoices.
* [IMP] When generating an Invoice from several SO's the lines sequences
were copied from the SO's. Because of that the resulting Invoice
could have lines mixed-up between the different SO's which could
be confusing, especially as notes are now passed in too.
* [IMP] Down payments where not sent into a separated section on invoices.
This could confuse the user, especially when the down payment was
included in a section created that was created in a previous SO
line.
Closes odoo#47279
Task ID #2206228closesodoo/odoo#47279
Related: odoo/enterprise#9465
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
+ Add helper method to retrieve the contract wage.
Those methods are supposed to be overriden in some cases.
closesodoo/odoo#48258
Taskid: 2222984
Related: odoo/enterprise#9454
Related: odoo/upgrade#980
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Fixes#47147
Followup on 39e2dfca0a4a2cf641a50ee9af510180fff6eb9c and 737eaf9333
Before this commit, Accounts with single character code was setting non-existing `root_id` which crashes on Grouping by using that field. (and also Accounts were not visible search panel)
With this commit we support computing `root_id` with Single Character.
closesodoo/odoo#48261
X-original-commit: d93ccdc5a25c061468870359ad8f749496140d19
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Context:
Since 7593b887df an entry of ir.model.fields.selection is created
for each entry in a selection field. This allow a more modular
approach of tagging entries with an external id and translating
selections in the module that defined the selection (and not the one
that defined the field)
Problem:
When removing a selection, every record that used this selection is
updated with a 'set null'.
This was also intented on abstract models that do not have a table.
To reproduce:
1. create two models:
class ModelA(models.Abstract):
_name = 'abstract.a'
select = fields.Selection([
('foo', 'Foo'),
('bar', 'Bar'),
])
class ModelB(models.Model):
_name = 'model.b'
_inherit = 'abstract.a'
2. update code and removes the key 'foo'
3. update the module
-> error
psycopg2.errors.UndefinedTable: relation "abstract_a" does not exist
LINE 1: UPDATE "abstract_a" SET "select"=NULL WHERE "re...
When updating the values in db, only update on real models
closesodoo/odoo#48288
X-original-commit: 6b20a8241300ebfc185500eb64e210db755574a8
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
Add position top in popup snippet and cookie bar.
Properly center content when full size and position center because
before this commit the content was at the top and not centered.
Part of https://github.com/odoo/odoo/pull/46503
task-2194309
closesodoo/odoo#46503
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Add an input field to define the value of the progress bar instead of
the previous system by mousedown. Disable animated by default.
Part of https://github.com/odoo/odoo/pull/46503
task-2194309
Copy the absolute path in the clipboard instead of the relative for
anchor links. So the link still works if it is pasted on another page.
Part of https://github.com/odoo/odoo/pull/46503
task-2194309
Removes option to move card to the right/left from the left panel
and add this option on the element overlay.
Makes the snippet responsive and other improvements.
Part of https://github.com/odoo/odoo/pull/46503
task-2194309
Add a wrap div around overlay options so we are able too add more
specific options that are separate from the move options.
Part of https://github.com/odoo/odoo/pull/46503
task-2194309
Before, only accounts, fiscal position, tags and taxes were
translatable, now account groups are too.
X-original-commit: da571b354293e852c1c4828f758eace8e6ededa4
PURPOSE
Merge rendering tools used in mail and sms templates and move them
directly in mail.render.mixin
SPECIFICATIONS
Clean rendering methods API and calls. Ensure they are private. Improve
naming and docstrings to ease understanding.
Move rendering methods on mail.render.mixin. It makes no senss to have to
create a void mail.template recordset just to invoke jinjna rendering engine.
Now rendering will be available
* either directly through inherit;
* either by calling env['mail.render.mixin']._render_template();
Move local to global links convertion as well as links shortening tool methods
on mail.render.mixin . That way this mixin holds tools related to rendering
and its post-processing.
This impacts mail.template, sms.template and mailing.mailing as side effect
without any functional change.
LINKS
Task ID 1963529
Community PR odoo/odoo#32397
Enterprise PR odoo/enterprise#8634
Upgrade PR odoo/upgrade#911
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Canada(l10n_ca): Apply fiscal positions automatically based on partner's state.
EU nations: Apply fiscal positions automatically for national or EU/Non EU partners.
closes odoo/odoo#48250
Task: 1952975
Closes: #32126
X-original-commit: 15e0026bdeaefd7a915718781bf3f6ee0389365e
Signed-off-by: Josse Colpaert <jco@openerp.com>
PURPOSE
Move links shortening tools on mail.render.mixin to have rendering and
post procesing tools available on that mixin.
SPECIFICATIONS
Move html and text links shortening methods on mail.render.mixin class.
That way rendering and post processing is done in that mixin instead of
being specific to link.tracker model. Indeed those methods are tools and
not really business related methods.
Future commits will improve the way mail and sms composer use the render
mixin. This commit is therefore both a cleaning and preparing commit.
LINKS
Task ID 1963529
Community PR odoo/odoo#32397
PURPOSE
Move links shortening tools on mail.render.mixin to have rendering and
post procesing tools available on that mixin.
LINKS
Task ID 1963529
Community PR odoo/odoo#32397
PURPOSE
Merge rendering tools used in mail and sms templates as well as partially
in mailings and move them directly in mail.render.mixin.
SPECIFICATIONS
Move tools related to language computation from mail.template model to the
mail.render.mixin. It allows to update both
* mail.template: simply update calls accordingly;
* sms.template: remove code doing what is now available through mail.render
.mixin inherit;
Lang field is moved to mail.render.mixin as it is used notably for the language
computation. It therefore adds the field on mailing.mailing model although
not used currently.
LINKS
Task ID 1963529
Community PR odoo/odoo#32397
We also have to update code calling directly the rendering itself. Indeed
some code bits does some rendering directly on jinja-enabled input and not
through templates. Those calls have to be updated accordingly.
LINKS
Task ID 1963529
Community PR odoo/odoo#32397
PURPOSE
Clean and rename code about language management and template rendering in mail
template model.
SPECIFICATIONS
Clean method naming and try to make code easier to understand and call. Also
add and/or clean docstrings of rendering methods.
Notably
* ``_classify_per_lang``: for each lang-contextualized template, give the list
of record ids;
* ``_render_template``: now working only on a valid list of IDs instead of
allowing both int / list and having a return type depending on the input
type. It allows to simplify code and delegate some processing to callers;
Introduce new API method
* ``_render_lang``: for each record id return the lang matching it;
* ``_render_field``: render a field of mail.template, on given set of record
ids. Usage: template._render_field('body_html', records.ids). Language
computation is available for this method;
Remove the "multi mode" support of rendering that either returned a rendered
value, either a dict based on given ids. Now all methods always work in batch
and caller have to fetch the correct result if necessary.
LINKS
Task ID 1963529
Community PR odoo/odoo#32397
PURPOSE
Clarify mail.template, mail.render.mixin and sms.template code organization.
SPECIFICATIONS
Reorganize fields according to their main use.
Remove an unnecessary onchange in mail template model. As "model" field on mail
template is a computed field its computation is sufficient.
Add some docstrings and code separations.
Prepare future code change.
LINKS
Task ID 1963529
Community PR odoo/odoo#32397
Rewrite code parsing name (_parse_partner_name) to make it easier to
understand. Tweak find_or_create to return directly a recordset with the
found partner / new partner instead of a name_get result.
Also inherit Partner.find_or_create() in mail in order to benefits from
email_normalized field, allowing to improve the search on matching emails
and avoid duplicates.
LINKS
Task ID 1963529
Community PR odoo/odoo#32397
As find_or_create API and code will be slightly improved soon let us add some
tests to ensure behavior and avoid (too much) regressions. Notably about the
fallback on faulty emails support aka "name email@domain)" which in parsing
is considered as valid. This may happen when people copy-paste emails.
LINKS
Task ID 1963529
Community PR odoo/odoo#32397
If employee is not set, the default picture will be user-slash
instead of camera.
Task ID 2221250
closesodoo/odoo#48114
Related: odoo/enterprise#9398
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Before this commit, coming back on a view when in 'debug=assets' would erase the
previously loaded favorites with an 'undefined' value. This was due to an incorrect
cache invalidation mechanism in the DataManager's load_views' method.
Now the views and filters caches are properly loaded if any of them has been invalidated.
closesodoo/odoo#48085
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Purpose of the task is to add Kanban views on the Configuration menu
of the Lunch Application for a better interface on smaller devices.
So in this commit added for kanban for alert, location and product
category but keep the current list view by default for all this menu.
closes odoo/odoo#47905
Taskid: 2210929
Closes: #47905
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Before Commit:
-Current Functionality doesn't Restrict Unlink of Order Based on States.
-if we delete the invoice linked to repair order the state button of invoice
still visible in reapir order and when we click on state button it open
new draft invoice.
After Commit:
-Add Validation on Unlink the order based on State,link unlink order only
on draft and cancel state.
-Always show the "cancel" button on repair orders.When the orders have been
cancelled, only allow to delete them if there is no invoice linked, or if
the invoice which is linked can be deleted (is still draft and has never
been posted). If we are not in one of those conditions, raise the following
error "You cannot delete a repair order which is linked to an invoice which
has been posted once."
-Add wizard when cancelling a repair order which has a draft invoice linked.
task-id: 2198997
Before this commit, when PDF viewer opens, it opens the sidebar forcefully.
Now with this commit, we have restricted to open the sidebar on initial load
by passing the false value to the forceOpen flag, we did this changes directly
in the library file itself as the file loads in iframe so we can not change the
file from outside by overriding the existing function or parameter.
task-2209742
closesodoo/odoo#47458
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Website sale order confirmation email is broken by design. Indeed it has
jinja markers between html elements that do not allow them, like between
table and tr, between tr, ...
In this commit we completely rewrite the structure to correctly include
jinja markers where they are not moved or stripped by standard browsers
and editors.
Translations are updated accordingly as changing a mail template content
imply updating the whole body translation.
Followup of 74c5c00
website_sale: add website on some demo orders
Purpose is to showcase orders using website field, used notably for some
template rendering.
Forward port of afd173652214000ed and f74c86d448246b796d
closesodoo/odoo#48228
X-original-commit: d3bdb0a42eb052281b4652bf78e82b1c6c1c1d24
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>