When more than one parameter is present in a message, it helps the
translation to use named placeholder. This way, the order can be
changed. It also helps the comprehension of the message.
Do not construct a message by putting together translatable bits, it
makes it hard to translate (out of context) and may not work for some
languages constructing the sentences differently.
Do not try to save bits, be explict.
Clarify constructions for long oneliners.
Using a few regex like
\((_\(.*%s.*)(\) % )([\w\[\]][\w .\[\]\(\)'"]*)\)
($1, $3))
Old syntax is still compatible but starts the migration to the new
syntax that catches error.
Mimic the syntax of logging to use placeholders in translatable
message.
The main advantage is to be able to fallback on the source term if the
translation can not be formatted properly.
It is very common to have errors in translations with missing
placeholders or badly translated (ie. the source
"%(subject)s" -> "%(sujet)s").
Instead of blocking the execution of the code, fallback on source
string.
Task-id: 1853119
Issue
- Install Sales
- Enable discounts & pricelists
- Create a product
- 2 variants:
- first with "create variant" set to Always
- second set to Never
- Create a SO
- Pricelist setting "without_discount"
- Add the product with product configurator
The line price is not correct (only Always taken in account)
Cause
When the variant has Create Variant set to Never
we pass the extra money in the context.
When we have a pricelist with "without_discount"
this context is not propagated correctly and it's lost
Solution
Pass the product directly if it's not empty which
have the context set.
OPW-2246102
closesodoo/odoo#53216
X-original-commit: 68628206c5883adc614045706fcc2ea085efd252
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Signed-off-by: Jason Van Malder (jvm) <jvm@odoo.com>
On a SO, you can set a default delivery address or a default invoicing address according to the customer.
The same behavior has been applied on repair order.
opw:2277679
closesodoo/odoo#53194
X-original-commit: 5dfedd9fa452ad5a7ea5ee25209a4d31da379f2d
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
Previously the option to choose preferred routes in the replenish wizard
was only possible when stock setting: group_stock_adv_location (Multi-Step
Routes) was activated.
Part of specification 4 of overall inventory onboarding improvement task.
Task: 2220129
Related Enterprise PR: odoo/enterprise#10719closesodoo/odoo#51676
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
This commit makes it so products can be replenished without any other
module. This is achieved by adding a "pull" rule to the default receipt
route generated when a warehouse is created. "Pull" rule is added to 1-,
2-, and 3-step receipt routes. Previous to this commit, an additional
module (e.g. purchase, mrp, etc.) was needed for a pull rule to trigger
with the existing receipt route rules. Replenishments can be triggered
via "Replenish" button in product form, recording rules (auto trigger),
and replenishment (manual trigger).
Additionally, this commit makes it so when other modules (mrp, purchase)
that handle replenishment are installed, this additional "pull" rule is
removed from the default receipt route to prevent undesired behavior
(e.g. MTO manufacturing components magically being received from no
where). Unfortunately this means 2 undesirable situations:
1. If a user adds adds/changes rules to the receipt route and then installs
mrp or purchase then their additions/changes will be removed.
2. If a user removes either (when only 1 installed) or both of these
modules then stock module will again not be able to replenish as the
pull rule will not be re-added to the receipt route.
It is expected that these 2 cases do not need to be handled in most
cases or can be handled by advanced users.
Stock tests have also been updated to accomodate this new pull rule.
Specification 4 of overall inventory onboarding improvement task.
Task: 2220129
Related Enterprise PR: odoo/enterprise#10719
This commit makes it so having a stock.picking unlocked will no longer
make the action buttons invisible. This change is expected to make it
easier for new users to not get as confused while using stock.picking.
Buttons now visible that previously were not are: "Check Availability",
"Validate", "Sign", "Print", "Return", "Unreserve", "Scrap", "Cancel".
Additionally the "Lock" button is no longer highlighted.
Additionally, relax 'is_initial_demand_editable' restriction on 'qty_done'
in 'stock_move_line_operation_tree' so that readonly status is only
dependent on 'is_locked' status.
Note that after this change picking.is_locked will only affect things
related to its move lines, including the visibility of the "Operations"
stat button.
Specification 3 of inventory onboarding improvement task.
Task: 2220129
Related Enterprise PR: odoo/enterprise#10719
Previous to this comment, creating new products during an inventory
adjustment was not possible (within stock app, was possible within
barcode app). Now it is possible to create new products within
stock.inventory form 'product_ids'. Additionally the
stock.inventory.line tree 'product_id' will also allow creation of
new products only when there are no 'product_ids' assigned. By
default these new products will have 'type'='product' (storable).
Specification 2 of inventory onboarding improvements
Task: 2220129
Related ENT PR: odoo/enterprise#10719
Since a recent commit[1], we have a utility method in tools named
'is_html_empty' that checks whether the given html content is
void(containing only formatting tags) or not. However, the re from
this method does not consider the case of self closing tags, fox ex
`<br/>`. In such cases, the method returns Falsy value even if the
content is void.
This commit fixes the issue by considering self-closing void tags
in the regular expression.
commit[1] - https://github.com/odoo/odoo/commit/974f512f5f5d3b9f80a8c3fcde290e4f55cf1230
Task - 2267689
closesodoo/odoo#53167
X-original-commit: 0fd6c9388dc959a9b6b7828850683175edb05b9d
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Currently, when a user created with default access rights,
but doesn't have employee linked with user then it will generate a
traceback because if user is not linked with employee then
it will return null so due to that while rednering the template
error was generated.
So in this commit, fix the treaceback by returning default values
if the current user had no employee
closes odoo/odoo#53161
Taskid: 2262636
Closes: #51687
X-original-commit: 96de35eda1a8e6e5086eb8221e939f3f737a9a6c
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Create a SO, Validate it.
Create Invoice: down payment (fixed amount) and validate invoice
Now back to the SO. Create Invoice: Invoiceable lines (deduct down payments).
A draft invoice is created. Try to delete it.
User gets an error, this occur because the second invoice creation bind
another invoice_line to the downpayment sale order line (first line was
added when making the downpayment). When the user delete the invoice
the sale order line should be deleted as well, but is still linked to an
invoice so the error raise.
Unlinking only unbinded sol fix the issue
opw-2258218
closesodoo/odoo#53144
X-original-commit: 7c7275b8a943196975182a8e66cef0e82f87b21d
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Allow the user to archive the payment methods and the floor plans.
Change some typo.
Allow manager to have access to the cash closing control wizard.
Allow the user to set cash in or out in the wizard.
closesodoo/odoo#45719
Task-id: 2125227
Related: odoo/enterprise#8562
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
New populate feature (#48479) now allows to define model generation methods to populate the database with model records for performance testing.
This PR aims to implement database population for the `project` App.
Furthermore, to reduce population time, a first performance improvement is applied to create `project.task` records in batch.
--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
closesodoo/odoo#50405
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
This commit is fine tuning of 9f142c8ff5a383.
Apparently, context_get callback is never called. I
guess this is due to the fact that we are higher.
context_get is defined in public/public_root.js and
we are in core/session.js
The only way to fix is to retrieve the HTML tag language.
OPW-2244843
closesodoo/odoo#53155
X-original-commit: 2bbb8fbf7ae909da03d97d16b228ae5a95de7d18
Signed-off-by: Jason Van Malder (jvm) <jvm@odoo.com>
The purpose of this commit is to hide the icon fa-map-marker in the event
kanban view in case no address_id is set on the event.
Task ID 2184037
PR #53119closesodoo/odoo#53152
X-original-commit: 7aab71db8588286d6b746f0243fa356d220439d8
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Currently if you configure an user without sales and mass mailing
rights you run into issues with links modules as
* sales data is computed on form view and requires sales access
rights;
* invite and contact buttons lead to tracebacks as their action
require mailing access rights;
In this commit we fix those issues by correctly setting groups
on fields.
Task ID 2184037
PR #53119
X-original-commit: af1a5d294b235e33a48b87c89886b24ea145450d
This commit fix the in and not in operators
in domain.js.
_.contains works only if you have an array
in the left part.
So if you have an array in the right part
it will not work correctly.
Using _.intersection solves the problem.
OPW-2274990
closesodoo/odoo#53150
X-original-commit: 7e3fbfaf5a39f7e26b3a9073144f682086265920
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Jason Van Malder (jvm) <jvm@odoo.com>
This commit makes it so the default "Product Type" = "Storable
Product" ('type'='product') when creating a new product in a
manufacturing order or an inventory transfer. Previously the default
was "Consumable".
Specification 1 of Inventory Onboarding task.
Task: 2220129
Enterprise PR: odoo/enterprise#10719
- Use an User with Accounting access rights, but without Admin access rights (e.g. Marc Demo)
- Go to Accounting > Reporting > Tax Report
An access rights error is triggered.
opw-2275552
opw-2275115
closesodoo/odoo#53184
X-original-commit: 517a13b967a07fe1e71b9c5308d185c4e45f1a2d
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
- Create 2 companies A & B
- Create a product with automatic valuation
- Switch to company A
- Create a SO for 1 unit of the product, validate and deliver
- Genrerate the invoice
- Switch to company B, but keep company A allowed
- Post the invoice
An error is raised because of inconsistent company:
> Some records are incompatible with the company...
This occurs because the anglo-saxon lines are created in accounts
belonging to company B instead of company A.
Since the product accounts are property fields, using `force_company` in
the context allows the selection of the right accounts.
opw-2276657
closesodoo/odoo#53183
X-original-commit: 603ce0f408a4479324a0905f5bc569c9f08567dd
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Translate the sale description for products and operations.
opw-2274120
closesodoo/odoo#53176
X-original-commit: df364e64e75523533b86fb8d488cb081eb2e5b77
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Since the header effects are now done without duplicating the header
into a fixed element, link anchors towards it were not working anymore
as they could be redirected to the fixed-positioned header. This commit
solves the problem "generically" for all fixed elements (I am not sure
any link towards a fixed element except the header makes sense though).
closesodoo/odoo#53156
X-original-commit: 1a2827f80bd7a66d4190977b22d4bc5846737b08
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Currently, the SOL field is visible on task form view even if there are
no timesheets linked to the task.
So in this commit the SOL field should not be visible on task form view
if there are no timesheets linked to the task. The SOL field is only
visible incase when there is multiple soline is linked with timesheet
so to make that field visibile/invisible there is has_multi_sol
compute field. so we will only display the field if timesheet_id is
exist.
closes odoo/odoo#52218
Taskid: 2266104
Closes: #52218
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
A recent refactoring of mail.message induced a crash when redering the
front side of an event with messages/notes in its chatter. As there is
no use to such a feature, we simply remove the part that displays those
messages.
Task ID 2279183
Linked to task ID 2071556 (message publish management cleaning)
closesodoo/odoo#53135
X-original-commit: c4700d379e3286fb75c0d1f48f67671f841151b7
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Every call of initialize_sys_path was adding two new hooks to the
sys.meta_path, resulting in very long loading times on databases having
a lot of modules.
For example, 2.27s instead of 752 on a database having 130 installed
modules.
References:
- odoo/odoo#45780
- odoo/odoo#45662closesodoo/odoo#53121
X-original-commit: 2444fde7f852787d87589a93c4bc385d76ff20e9
Signed-off-by: Christophe Simonis <chs@odoo.com>
Signed-off-by: Olivier Dony (odo) <odo@openerp.com>
Steps to reproduce the bug:
- Let's consider a new instance with default installed language 'en_US'
- Install CRM
- Activate a second language (e.g. en_GB)
- Set that language in all users
- Inactivate default language 'en_US'
- Reset the language of your current user (no value)
- Go to contact and try to create a new one
Bug:
A traceback was raised because the lang en_US did not exist.
opw:2267711
closesodoo/odoo#53064
X-original-commit: c43647f085a7f62c9c81db6553be6a6e402943d0
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
- Create 4 products A, B, C, D
- Create a product AB, which is a kit made from A & B
- Create a product CD, which is a kit made from C & D
- Create a product ABCD, which is a kit made from AB & CD
- Create a SO with 1 unit of ABCD, validate
=> a picking with A, B, C and D is created
- Validate the picking
The delivered quantity remains zero on the SO.
This happens because we don't find any `relevant_bom`. Indeed, the
`bom_line_id` written on the stock moves correspond to products AB & CD,
but they do not correspond to ABCD.
We fall back on the 'all-or-nothing' policy.
opw-2273392
closesodoo/odoo#53091
X-original-commit: 972eab4bcdcc9ee246621a6991d064f96ccd5ccb
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
- restore "solid" icon
- restore muted style when no notification
- opportunity is taken to fix off-pixel of activity menu
task-2278416
closesodoo/odoo#53094
X-original-commit: 1164b37c5fb33d124ede52356c613b7cd31ac8e1
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Usecase to reproduce:
- Create 2 table(MTO)
- Produce 1 and use BO button
Traceback due to a reference to enterprise field.
closesodoo/odoo#53077
X-original-commit: 2fffc12f8e3cdccba4b1c9820f997f4b10dac330
Related: odoo/enterprise#11191
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
When we print a ticket status with a thermal printer we need printer's device-id
But if we add manually a printer this device-id doesn't exist
So now we update de devices list with a supported = True if
printer are manually added
closesodoo/odoo#53072
X-original-commit: 89bbc555ecf520ee34a9b1292a2bdb5c937b18e2
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
[FIX] l10n_cl: format RUT/VAT as used in Chile (99999999-X)
[FIX] l10n_cl: prevent errors with domain of available documents in invoice view.
[FIX] l10n_cl: allow to select document types when partner is empty
[ADD] l10n_cl: add ILA taxes (purchase and sale) and assign account to taxes
[ADD] l10n_cl: add fiscal position exempt for purchases and sales
[IMP] l10n_cl: configure accounts used in inventory valuation
[FIX] l10n_cl prevent to put unneeded sales documents in sales journal
[FIX] l10n_cl limit revision of document types and partner constrains only for sale and purchase journals
[FIX] l10n_cl: add extra validation to know wether there is a latam_document_type_code selected
[ADD] l10n_cl: add document type '801' Orden de compra
[WIP] add tag to costo de ventas account
[FIX] l10n_cl: fiscal position templates: fix supermarket tax
[FIX] l10n_cl: change order for boletas
[WIP] l10n_cl: fix the compute document types method
[FIX] l10n_cl: prevent expected singleton error (checked in tests) in post
[I18N] l10n_cl: add new translations
[I18N] l10n_cl: reduce size of taxes names and abbreviation for invoices (probably more work to add here)
[FIX] l10n_cl: remove countries from accounts
[FIX] l10n_cl: remove recalc of domain when journal changes
[FIX] l10n_cl: remove sale constraint
closesodoo/odoo#53068
X-original-commit: 060f083879f6094941f746928832fec253a23bb0
Signed-off-by: Josse Colpaert <jco@openerp.com>
Purpose
=======
Improve the lunch categories and mutli-company environment.
Specifications
============
- Able to archive a product category and this should archive/unarchive
all the products in that category also added the filter for same.
when unrchive the product if category is archived then raise the
Validation to change the category OR unarchive the category.
- add a default image for lunch categories
- Adapt the size of the default image, currently it's too big,
- On lunch order form view if product images is not set then display
the category image same as kanban image.
- Add a company field on the Product categories (it's already there
but it should be visible on the view form). Added the multi company
rule for the product category and if company is not set on category
then it will be sharable by all the company. so default company on
product category null.
also on lunch product and report check the multi company and display
the product accroding to company.
closes odoo/odoo#45797
Taskid: 2200002
Closes: #45797
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
PURPOSE
Currently, there is an on-change to set an activity summary to the default
summary of an activity type. This can be useful if types are properly
configured. The problem is, the activity summary will be updated even if there
isn't any default summary on the type. Meaning that it simply removing a
relevant custom summary the user might have already entered.
SPECIFICATIONS
When triggering the on-change on activity_type_id, only update the activity
summary to the default summary if there is a default summary defined on the
activity type.
LINKS
Task-2254825
PR #51373
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Configure a catchall address in Odoo, send an email to that very
address, it should bounce back to the user asking him not to send any
email to the catchall but the email is never sent.
Internally, Odoo reply to the user using the `To` header of the original
email as `From` of the bounced email. It should never use the catchall
address as it is not a valid email to send email from.
closesodoo/odoo#53036
Task: 2277661
X-original-commit: 86c8f0960f709692aa787ae62d446b4427a7c312
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
PURPOSE
Fix various issues spotted in 13.3 when testing event. Notably
computation of 2many fields coming from template.
SPECIFICATIONS
When updating template on an event, one2many fields should be better managed.
Previous heuristic was
* if event type uses o2m configuration (use_ticket / _schedule / _question)
and has lines
* erase existing lines;
* create new lines based on old one;
This has the drawback of loosing information of what is sent (mail) or
sold (tickets) or answered( questions). Another drawback is that only
types having line are synchronized. This means that if updating several
times the event type you could end up with an XMas configuration with
lines coming from different event types, depending on their o2m configuration.
We choose a better heuristic that should solve this issue
* every time we change type, independently of its use_* field that is used
mainly for UX on the type itself:
* erase existing lines that have not been used yet (no mail sent, no
ticket linked to registrations, no answer linked to registrations)
* create new lines based on old one; if type has no lines, event will
have its old empty line erased as well;
It means that we try to synchronize more the type to the event while keeping
configuration line already used in some registrations.
Also provide some other fixes like deletion restrictions or better domain
for UX purpose. See sub commits for more details.
LINKS
Task ID 2244487
PR odoo/odoo#52923closesodoo/odoo#53034
Forward-port-of: odoo/odoo#52998
Forward-port-of: odoo/odoo#52923
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Add a domain on question_id. Its event should be the same as registration
event. Otherwise when editing in backend all questions are available while
only those related to the registration's event should be.
Task ID 2244487
PR odoo/odoo#52998
FwdPort of odoo/odoo#52923
X-original-commit: 25d53430f32598a5db65be807756182d2063b3ee
Prevent to unlink tickets when having registrations by adding an ondelete
restrict attribute. Otherwise billing information may be lost.
Task ID 2244487
PR odoo/odoo#52998
FwdPort of odoo/odoo#52923
X-original-commit: 5322d76d378e4bd88a42dc0e4b01bb46c7b3546a