The `cash_control` constraint [1] is only relevant when the field
`cash_control` is modified. Do not check it when opening the pos UI.
[1] added by 733fb360d2
when opening the sale promotion in mass mail, it creates a traceback
due to invoice compute method as it does not have invoice id because
of changes in account.move.
task-2036203
closesodoo/odoo#35202
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
The onboarding modal for setting up the few base fields of a company
has now been moved to a wizard
It is accessible from the general settings, but also in the onboarding
section of sale and account modules.
The following company settings are editable with that wizard:
- Set report **layout**:
The user can chose the overall look of the report. The current choices
are : *Standard* (default), *Background*, *Boxed* and *Clean*.
- Set company **logo**:
Changes the company logo.
- Set report **colors**:
The user can set the primary and secondary colors of the report through
a newly added widget allowing to pick a custom color.
When changing the **logo**, colors are automatically set to its most dominant
colors.
> A "Reset colors" button also triggers the color calculation.
- Set report **font**:
Changes the overall font of the report. Only Google Fonts are used
for enhanced compatibility.
- Company **tagline**, also called "header"
- **Footer**
- **Paper format**
- Report **preview**:
A mockup of a final report
Automatically updates when changing **layout**, **logo**, **colors** or **font**
Co-authored by: Julien Mougenot <jum@odoo.com>
closesodoo/odoo#33863
Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>
Co-authored-by: Lucas Perais <lpe@odoo.com>
Added a boolean option to toggle opacity settings on the colorpicker dialog widget.
When set to true, both the opacity slider and the opacity input are hidden in the
dialog. When not set or set to false, opacity settings remain unchanged.
The reason this widget was moved is that the next improvement
([IMP] base: Configure document layout) defines a new field (FieldColor)
which needs to call the colorpicker dialog inside of the base module.
This couldn't be done while the dialog was located in the wysiwyg assets.
The color field is necessary to be able to display some fields
(many2many_tags) and used in the kanban views
closesodoo/odoo#35216
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
The commit f3999314af introduces a
declaration of non-existing `uninstall_hook` in the manifest, causing
error when trying to uninstall the sale_timesheet_purchase module.
This commit simply removes it.
Task #2039731closesodoo/odoo#35106
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
Before this commit, the stock's setting Advanced Scheduling was always
visible, even when it's empty. Now, it is invisible until sale_stock or
purchase_stock makes it visible (it's needed because they each add an
option into it).
Task #2039731
In the picking form view, places the picking type field before location
fields, thus user is prompt to set it before locations because the
onchange on the picking type erases the location fields.
Task #2039731
How to reproduce:
- Active multilocation in inventory setting;
- Go on product form view;
- Click on Update Quantity / On Hand button;
- Create a new quant.
With stock_account, we encounter a traceback when creating a new quant
in some case where the `location_id` isn't set by default, because it
tries to compute the value and it checks location to know if the quant
must be valueted or not.
Task #2039731
On stock list view of a single product, when user click on "Inventory at
Date" button, the displayed report shows all products.
This commit makes the report only shows the current product.
Task #2039731
Before this commit, the field `lot_id` was hidden when useless for the
editable quant list, but was always present in the readonly quant list.
Now, the `lot_id` is hidden when appropriate in the two lists.
closesodoo/odoo#35008
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
Some quant can have no company_id (quant for partner locations).
But when user edit a quant, the stock move `company_id` is based on the
quant's one. As the `company_id` is required for a stock move, we force
to take the `company_id` of the user in case the quant don't have one.
Task #2035465
As quant from inventory loss location balances real quantity, it could
be really hazardous to able user to modify it. That said, modify it now
has no effect. So, with this commit, we exit the quant write method in
case of user tries to modify it manually if the quant location is
inventory loss, and we inform the user he can't modify it.
We could set the field as readonly in this case, but it's clearer for
user to inform him/her in case he/she tries to modify the quant than set
the field as readonly and take the risk user don't understand why he/she
can modify some quant and can't modify some other.
It would be preferabler to raise an UserError in the write than do
nothing in the write and return a warning in the onchange, but in case
we raise an error in the write method, user side the field is still in
edit mode and then, every time user clicks somewhere but on Discard, it
will raise the error again and it's not convenient for the user.
Task #2035465
Purpose
=======
Currently, when we click on “Settings” on the Home Dashboard, we arrive
on a new Dashboard with several pieces of information like Installed Apps,
invite new users, or translations. Some informations are reachable in
several ways, which is not necessary.
We would like to remove this page and replace it with the General Settings
page directly. That makes more sense to the user who click on “Settings”. The
present informations will be dispatched in the menu or in the general settings
for a better usability.
Specification
=============
This commit move code from web_settings_dashboard in order to put the features
in settings directly. To do so, we choose to move code to base_setup, and create
widget on the settings form view to keep features. Concerned features are: invite
users, dev tools, odoo edition number and IAP account link.
TaskID: 2006910
closesodoo/odoo#34290
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Purpose
=======
On a form view, it's possible to add a confirm attribute to open a
popup when clicking on a button.
This mechanism is not implemented on kanban views, and would imply to
create a specific wizard just for that in the referral application.
Coming from the sudo() modification. The mail.message is created in sudo,
but the user is still the public user, who doesn't have a email address,
leading to an raised error.
Previously, success message for promocode was visible only
when user clicked on "I have a promocode". even
when it was successfully applied.
After this commit, message will always appear once a promocode
has been successfully applied.
Task-2027008
closesodoo/odoo#34591
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
In the receipts, you can only scrap after the reception. This implies
that the source location of the scrap move is the destination location
of the picking.
Create the scrap move as draft, else in the receipt it used the state of
the picking (done) and calling _action_done again resulted in double
valuation layers
task-2042399
closesodoo/odoo#35179
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
Before this commit, the string containing all size units for binary fields
was comma separated.
The problem with this is that comma got also translated into the language's specific
comma-like, whereas in this case it is obviously a technical separator which shouldn't be translated
After this commit, we separate unit size with pipes (|), hoping that this character
- is easy to find on any keyboard
- has no language specific equivalent
OPW 2041975
closesodoo/odoo#35183
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
PURPOSE
Allow the user to schedule SMS communication on events
SPECIFICATION
In event.event form view:
* rename tab 'Email Schedule' to 'Communication'
* add a selection field at the beginning of event_mail_ids with label 'Send'
and values 'Email' and 'SMS Text Message' (required with default value
'Email');
* add support of SMS template and SMS sending in event communication;
When sending SMS on event registrations, keep a log of what has been sent.
Use mobile or phone field of event registration as both may contain valid
values, like partner model.
Add SMS template data
* Name: Event: Registration (see data)
* Name: Event: Reminder (see data)
Improve registration model
* add a mobile field to the attendees form view: https://nimb.ws/p0VvyS
Technically this task uses the newly-introduced API methods allowing to
send and schedule SMS.
LINKS
Task 1922187
Part of PR #34705
PURPOSE
Allow the user to schedule SMS communication on events
SPECIFICATIONS
In order to add tests this commit performs a quick cleaning of event common
class to speedup and prepare new tests.
Containing
* move data creation in class and use savepoint;
* move registration creation in its own method to allow calling it if
necessary;
* clean some unnecessary variables.
LINKS
Task 1922187
Part of PR #34705
Scale action took a string as argument.
It now takes a dict so parameters can be passed to action methods.
closesodoo/odoo#35136
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
Select fields were not `contenteditable=true`, which means they could
not be edited. Besides, being that each of their option was individually
considered a snippet, and that they were contained in `div` tags, they
were effectively unbreakable, which means that adding new options by
hitting `ENTER` did not work (note: this also currently doesn't work
properly in v12.0, for other reasons as the concept of an "unbreakable"
node didn't exist yet). This fixes those issues.
closesodoo/enterprise#4817
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
X-port/Cherry-pick of odoo/enterprise@af51d9ff2a
Fine-tuning of commit 5621ae3d6b.
While it focused on fixing the 'mass_mail' mode,
it forgot to keep the correct behaviour for the case where only one mail is sent.
In the latter case, it is typical to overwrite the template values, especially
for the body, before sending the mail.
In that case, applying the onchange on the templates overwrites the user input.
Note that in the case where the template is undefined it would set the composer
values to empty ones; while standard use would not allow in mass mail to both
send content and have no template, it could be done via a customisation.
opw 2041631
closesodoo/odoo#35164
Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
Before this commit, for the following view tree:
P (active)
|
I (inactive)
|
II (active)
When calling `get_related_views()` on 'P', it would wrongly return 'II'.
It shouldn't, since its parent 'I' is inactive.
Step to reproduce:
- Go to /shop
- Enable ecommerce categories
- Enable Collapsible Cateogories
- Disable ecommerce categories
- Collapsible categories is still shown even if its parent got archived
closesodoo/odoo#35154
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Error due to other module (e.g. purchase_stock, mrp) that will
define their own rules in order to merge or not moves together.
Usecase:
- Install purchase_stock
- Create a product MTO + buy with a vendor
- Create a SO of 1 unit
- On the PO receive 2 units
- On the delivery deliver 2 units
It will create an empty delivery and put the entire move in
a back order.
First issue the extra move is created as a MTO if it's copied from an
MTO move. So il will trigger all the pull rule. We won't it because it's
an extra quantity and the rules should be only trigger by the original
document (SO/MO).
Also an extra move in a picking do the hypothesis that the original move and
the extra move will always be merged together. But in the previous
usecase, the module purchase add the condition that 'created_purchase_line_id'
and 'purchase_line_id' should be the same in order to merge move.
'created_purchase_line_id' is also copy=False, so the move and the
extra move will not be merged. create_extra_move only returns the extra
move and _action_done only process the moves returned by _create_extra_move.
It result by an original move not merged and not processed by _action_done,
it will be automaticaly set in a back order and the extra move is
processed.
In order to fix it, check if the move and the original move will be
merged. If not, returns both moves.
opw-2008113
Close#34005closesodoo/odoo#34411
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
Before this commit, for the following view tree:
P (active)
|
I (inactive)
|
II (active)
When calling `customize_template_get()` on 'P', it would wrongly return 'II'.
It shouldn't, since its parent 'I' is inactive.
Step to reproduce:
- Go to /shop
- Enable ecommerce categories
- Enable Collapsible Cateogories
- Disable ecommerce categories
- Collapsible categories is still shown even if its parent got archived
Test writen in 12.0 with #35154closesodoo/odoo#35155
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>