*account_payment, l10_in(_sale), sale(_stock), web
With this commit:
The invoice preview in portal (/my/invoices..) is now the HTML version of the
PDF report.
The HTML preview is based on the invoice report to closely match what is
already done in Odoo.
The invoice preview is displayed in an 'iframe', it is mandatory since:
1. Reports are rendered as a separate page as it returns the whole page after
rendering, which has tag <html>, <head> etc
2. Reports are having their own layouts and their own assets that we we cannot
load in the page directly or it will break the website layout.
3. We can not use report template with t-call because internally reports are
using extra params like context_timestamp, company, DateTime, user etc which
is used in header/footer
--
There will be a chatter (as a modal) to display/see the history of the document
--
For responsive purpose, we use new tables with limited column (Description,
Quantity and Amount) for responsive purpose (small screen).
It also adds some bootstrap classes to reports for responsive purpose.
--
The 'Pay Now' button remains if you already paid with 'wire transfer'.
--
Add margin after the header and before the footer to look like the real printed
document, without alterating the real printed version
Task ID: 39876
with this commit, this generic widget allow to basic functionality for portal sidebar like: print btn (direclty print the document),
set due or delay label of the document (based on given date), used affix to locked to an area on the page for sidebar.
Purpose is to reuse it in account customer portal and online quotes notably.
some css code convert to the less file to have working portal sidebar skeleton, which is already used in website_quote
Task ID: 39876
Since https://github.com/odoo/odoo/commit/a473453b3166a381130d9bd6ec4851b9e1ecab26,
a newly cropped image gets a base64 src until the user choose to save
the page (where we create an attachment for the cropped picture). The
problem is that when reentering the crop edition at once... it was not
able to be performed because we did not handle base64 images there.
This commit solves this and accidentally adds a feature: allow cropping
base64 images.
This reverts commit bf64efb5a0.
Indeed, it was in fact necessary as more complex bugs of the library
can appear if we do not reset before. They even do that themself in
their library demo: https://fengyuanchen.github.io/cropperjs/
Usecase to reproduce:
- Create a bom without line
- Add a new line without filling the product_id
Click on bom cost button that appears
It crashes because the xml try to access item dict instead
of using get and 'components' and 'lines' both not exist.
Use case to reproduce:
- Create a BoM with a bom line that have at least 2 quantity to process and
this line should be a manufacturable product with also a BoM.
- Open the BoM cost report.
The line has its correct BoM cost multiplied by the quantity to consume.
It happens because the price of the BoM line is computed with the right
quantity to consume however it's result is multiply one more time to the
quantity to consume.
Before this commit, there was a visual bug on the attachment button
of a composer in discuss: instead of being next to the emoji button,
it was places below it.
This is due to the intent of displaying the attachment button only
for threads that are not the support channel. To do so, it uses the
jQuery methods `$.show()` and `$.hide()` on the considered DOM element.
The problem is that these methods change the `display` attribute of the
DOM element, so that when `$.show()` is called, it sets the display to
`block`, which causes the visual glitch.
With this commit, we use the classname `o_hidden` instead of the jQuery
methods, so that the attribute `display` is unchanged.
This revision follows revisions
- 9cd982bcc8
- df4072b0b4
We noticed modules implementing multi-websites features
override `_get_asset` to be able to provide their
own overriden `AssetsBunble` class.
Private methods are meant for internal usage of the code/module,
overriding is never a good idea given the fact their signature
can change. As this is the case in commit
9cd982bcc8.
That said, we understand their was no other way to go.
We therefore decide to provide one,
by adding a method that can be overriden to pass
their own AssetsBunble class instance.
opw-1860136
*: hr_gamification, point_of_sale, web
Before this commit, no content helper in some form view fields were broken,
due to the style of the classname `.o_view_nocontent` that uses an absolute
position.
This is due to some templates that wrongly use this style for displaying a
help message, although this is only valid for views with no record.
This commit solves the issue by using another classname for those fields
with the nocontent helper, namely `.o_field_nocontent`.
Since e94702d8 when transcoding an element for the purpose of sending it
by mail, if the element had:
border-bottom-style: solid;
in the CSS resulting from classes, it would be simplified to:
border-style: 0 0 solid 0;
which is wrong since 0 is invalid for border-style, the default being:
none
opw-1852839
closes#25423
Backport of 5f105d144d from v11.0
Commit 45c5a07d89 deals with displaying on the aged balance reports
the lines that zero out each other: an invoice and a payment of the same amount for the same partner
However, that commit overlooked that when there is a chain of reconciliation
that puts the report line to zero, it was displayed as well.
This present commit corrects this by making sure there are amls that detail the report lines
OPW 1857860
closes#25421
Before this commit, the point of sale displayed a loading message
every 5 secondes if the barcode scanner was configured.
This issue is due to the following commit: @1aacc96
After this commit,some calls may block the interface when they did
not do it before.
It concerns all rpc done with ajax.rpc and all done with a new
session.
We have now to explicitly set shadow property.
opw-1860493
Have an event starting *now* with a reminder, let's say 15 minutes
After saving the event, the notification pops up.
Click "OK"
Before this commit no call to the server was done, implying that the notification
will keep on popping up untimely
This was because, the widget was destroyed, hence its parents got removed
before the triggering up of rpc call
After this commit, we make sure we destroy the widget *after* the rpc
OPW 1860169
closes#25399
Return of _get_assets has been altered with commit 9cd982bcc8
We keep it for retro compatibility, but devs that override it before need to
override now _get_asset_node to be called correctly by t-call-asset.
Let's assume a one2many A inside a form view, such that the one2many
views (list, not editable, and form) are defined inline, and there is an
onchange on A. There is another inline one2many B editable list
displayed in the inner form view (and B isn't in the list). There are
two records on the one2many A, both of them having one record in their
one2many B. Edit the first record of A, and edit it's subrecord in B.
Click on save. This triggers an onchange on A and the onchange returns a
command 5 (DELETE_ALL), and two commands 1 (UPDATE). Now edit the second
record of A, and simply close the dialog (e.g. 'Discard'). Save the main
record: the record in one2many B of the second record of A has been duplicated.
This occured because the code in BasicModel messed up information coming
from the onchange (UPDATE command) and from the read (performed when
opening the second record), thus producing a CREATE command instead of
an UPDATE one.
This rev. ensures to properly mix the read data with the onchange
result, by transfering the changes over the list datapoint created after
the read.
opw-1836785
closes#25330
The sales journal graph should show the cash-in forecast of invoices.
In order to do that we need to display residual amount to be received
based on the invoice due date.
The purchase journal graph should show the cash-out forecast from
invoices. In order to do that we need to display the residual amount to
be paid based on the invoice du date.
Was task: 1855081
Was PR #25344
Before this commit:
* Install `sale_management`, `crm`
* Uninstall `crm`
* Go to sales -> sales channels
* Boom! The view is broken
This happens because both CRM and Sales share the sales teams view, yet
CRM's override of the model adds a selection_add to the
dashboard_graph_model selection field, when it is uninstalled, records
whose dashboard_graph_model field are set to one of the values
introduced by CRM keep this no-longer-valid value and upon accessing the
view it crashes.
This is a known limitation of selection fields and the selection_add
feature.
To solve this, an uninstallation hook has been created for CRM which
will fetch all records whose dashboard_graph_model is set to
`crm.opportunity.report`, and update the field of all these records to
None (NULL).
Fixes#25363
In website_sale setting, there is a field 'Confirmation Email' that is not used,
and which purpose is to have a conveninent link to edit the mail templates.
Since it is an editable setting, this confuses the users.
It was in readonly before commit:
https://github.com/odoo/odoo/commit/65a7531c8b5c713969e49a5fab9d4672524c3ba8#diff-3f25fe0e27881e9c6655bbb6974c84abR59
which removed the readonly without any apparent reason.
We put it back into readonly mode.
opw 1860167
Steps to reproduce the bug:
- Set a language on your user
- Change the date format in this language and set '%d/%m/%y' (two digit year)
- Open the calendar and select day or week view
Bug:
- The date displayed on the column headings has 'y' where it should have the year.
To check the right date format: http://fullcalendar.io/docs1/utilities/formatDate/
opw:185924
Use case to reproduce:
- Create a production warehouse that manufacture and a supply warehouse that deliver your product (manufacture and supply dist. WH checked on prod WH.)
- Create a product with a BoM and resupply, MTO and manufacture checked on its routes.
- Modify the resupply pull rule that go from prod/WH to transit location
from MTS to propagate
- Create a Quotation and confirm it.
The user error 'no procurement rule found' is raise.
It happens because the move from customer to Prod/WH are correctly
created but the rule manufacture is not found. It couldn't be find
due to a wrong warehouse on the stock.move. The pull rule use the
supply warehouse instead the warehouse that they serve when they
generate the stock move value.
This commit remove the propagate_warehouse_id on the second rule between
the stock location and the transit location.
The fact the pos config name get was doing
`config.session_ids[0].state`
led to the prefetch of fields of all the session_ids of this config
on reading `config_id` for the session form
Therefore, if a pos config had 1000 sessions,
it was prefetching fields of 1000 sessions when you actually
wanted only one session to display in the form.
Among others, the `picking_count` field which is
not stored and quite heavy to compute
In term of time, it went from 1 minute to 1 second
to open the form view of one pos session.
Let's assume a one2many list with two fields A and B, and an
onchange on A that sets B. Before this rev., on new records, the
onchange was only triggered if the one2many list was defined
inline.
Rev. 13c885195 was an attempt to fix the onchange issue in x2manys
with non inline views, but it only worked on existing records. This
rev. fixes the problem for both cases (existing and new records),
and thus reverts the fix of 13c885195.
The idea of this fix is to make both cases behave similarly, w.r.t.
fields and viewFields stuff in the fieldsView. In the inline case
(like in the main view case), fields and viewFields are the same.
In the non inline case, viewFields contained more information than
fields. As fields is used everywhere in BasicModel (and viewFields
is basically ignored), the fix is to set fields to viewFields.
Let's assume a one2many list with two fields A and B, and an
onchange on A that sets B. Before this rev., on new records, the
onchange was only triggered if the one2many list was defined
inline.
Rev. 13c885195 was an attempt to fix the onchange issue in x2manys
with non inline views, but it only worked on existing records. This
rev. fixes the problem for both cases (existing and new records),
and thus reverts the fix of 13c885195.
The idea of this fix is to make both cases behave similarly, w.r.t.
fields and viewFields stuff in the fieldsView. In the inline case
(like in the main view case), fields and viewFields are the same.
In the non inline case, viewFields contained more information than
fields. As fields is used everywhere in BasicModel (and viewFields
is basically ignored), the fix is to set fields to viewFields.
This revs. add a new test suite for the im_support module. Defining
a new suite was necessary as the im_support JS feature needs
specific keys to be defined in the session, otherwise its files are
simply skipped.
In the mocked version of the longpolling bus used in tests, the
is_odoo_focused function should be defined to prevent crashes when
we simulate incoming messages.
Since the ChatWindowManager is a service, this is no longer
necessary to set the webclient as parent of ChatWindow's instances.
This rev. sets the ChatWindowManager itself as parent, which makes
much more sense, and which allows to properly mock the whole
ChatManager-ChatWindowManager environment in tests.
Those test utils files should be in the test assets bundle such
that they are available for potential other test suites (e.g. the
new im_support suite).
Have an action that opens a dialog, with a specific callback
to execute when the dialog closes
In the dialog, have a button linked to an action that opens
another dialog in target = new
Close this 2nd dialog
Before this commit, the callback was not executed
After this commit the callback is executed
OPW 1853136
closes#25180
Previous implementation was wrong as it did not care about the ability
to discard a crop edition. Indeed, whenever a crop dialog was saved,
a crop attachment was created or updated at once. Discarding the editor
would then either:
- Seem to discard a first-time cropped image but would have created an
attachment for nothing (just the image src was reset)
OR
- Fail to discard a second-time cropped image as the cropped attachment
would have been directly updated and the image src would not have
changed
This commit changes the way it works:
- On crop dialog save, the image is marked with required data for a
potential future save of the cropped image (as a DB attachment) and
the src is set to the base64 cropped image directly.
Note that the code ends up being clearer and efficient that way too.
* website, website_mail_channel
Before this commit, when using the 'number of columns' option from a
column's snippet editor, the snippet overlay remained floating in the
void if the current column was removed by the option. This was because
the option did a simple "destroy" on the column without caring about
the snippet editors.
This commit introduces a new event which can be trigger_up'ed to ask
the editor to properly remove a DOM portion (destroy related editors,
call the 'onRemove' callbacks, ...).
As indicated in a code comment, destroying and rebuilding all snippet
editors when a snippet is moved is more accurate as the snippet options
may depend on the new locations in a way the 'onMove' callback cannot
handle. That operation seemed however too costly for no visual benefit
at the time. Now, not implementing it is a source of bugs and redundant
code (as with the new "number of columns" option which is not properly
updated once a column is moved in another row), so this commit
implements the feature.
This also allows for some improvement: the 'cleanForSave' part of
snippet editors is always performed when they are destroyed.
If this proves to be ok and safe, we might want to backport this in
previous versions.
Loads the barcode nomenclature only if one has been is defined. Indeed,
from commit 80e89c7a11, the POS config unset the
`barcode_nomenclature_id` field if the barcode support is not activated.
opw-1859928