Flow
====
Have one model field responsible of telling when the sales order has to be signed or paid to avoid inconsistencies.
The general rule is: sign & pay are only used upfront to confirm a sales order. If a sales person starts to modify (confirm) it manually, we don't need those features. Especially at that point pay should be done with invoices.
Modal
=====
For the sign, we want to force refresh the page to update its state, and thus we need to show the confirmation message on the reloaded page.
For sign and pay, we changed a bit the structure of the text in the modal to allow to translate it more easily. Also fixed the payment selection by moving it into the body instead of the footer.
For the reject modal, we want the feedback field to be required, so we can see in the chatter by who and why it has been rejected.
Misc
====
Moved remaining bits of code related to preview/pay/accept/decline from sale_management into sale, where it should have been in the first place.
Sales Order:
- Improved status/contextual alerts.
- Hide discount from small to fix responsive.
PR: #26801
task-1876864
remove sales help
Website generic: change "edit to backend" class to match other menu dropdown items.
Invoice: add "back to edit mode" banner.
Sales Order:
- "Reject" in red, we really don't want the user to click it.
- "Accept & Sign" renamed to better convey the meaning and match the button on the popup.
PR: #26801
task-1876864
*** Activate pay and sign, as well as quotation template, by default when using demo data.
Previously, the features would show by default on runbot because they activated on installing modules.
Now that they are settings of sale_management, we need to specifically activate them for demoing. However we don't want them for on-boarding.
*** Remove the default template from sale_management, move it into sale_quotation_builder
The default template was useless in sale_management because it was empty: it was previously a required field, which is not the case anymore.
It was only filled and used in sale_quotation_builder to display an example quotation, which is why it is now moved there.
*** Update manifests
Fix category of sale_quotation_builder and slightly improve its text.
PR: #26801
task-1876864
a7a89f3174 introduced a change that broke the invoice iframe.
The #wrapwrap corresponds to the client body, therefore the container must be inside it, and the scrollbar will now be on it instead of on the iframe body.
PR: #26801
task-1876864
The default value when creating a project is true for 'allow_timesheet'
field. This will automatically create an Analytic Account (if not
provided). However, the old onchange reset the allow_timesheet to false
if no AA was given, which is a contraction with the expected behavior
on project creation. But, we might want to uncheck 'allow_timesheet'
when we remove the AA on an existing project (Users can not log
timesheets without an active analytic account).
This commit fixes the erasing default value on creation by checking
the record is currently existing in the database.
Task #1886691
- Create a BOM kit for product F with:
2 Unit(s) of A
1 Unit(s) of B
- Create a SO for 1 Unit(s) of F, confirm
=> a picking with 2 Unit(s) of A and 1 Unit(s) of B is created
- Modify the Ordered Qty to 2 Unit(s)
The picking is not updated.
This is because `_get_qty_procurement` wrongly computed the product
quantity based on the moves' quantities. This is not correct since the
moves are for products A and B, not product F.
At this point, it is not possible to make sure of the real procurement
quantity. therefore, we use a very simple approach: we compare the sold
quantity before and after modification, and return the difference.
opw-1881227
closesodoo/odoo#27064
The method failed to enable views which were created by copying a
theme.ir.ui.view. This is because standard views were found with the
'ref' method while those particular ones were found thanks to the
copy_ids field... which only found the already active ones by default.
The priority was set to a low value while it was meant to be a high
value. Indeed, we want that if that template is active, the customize
modal is emptied no matter what, so it has to be called last.
This is to have an understandable behavior if our code fails to mark the
template as inactive on a theme installation. With this commit, the
customization dialog will be empty. Without this commit, it gives an
error which can lead to think we made a mistake writing the theme's own
customization dialog while it was in fact inheriting from an emptied
dialog.
- Remove theme specific parts and move them in theme_common
- Use IDs to ease theme overrides
- Use the same convention for all options: the default one is not bound
to any xml_id (that's just the default scss files)
Forward-port of fix 034e1d37d9
Since there is not link module between `sale` and `account_intrastat`,
we use a common method in `account.invoice`.
opw-1878590
The backend allows to map one source tax to various target taxes. The POS
diverged from this behaviour.
This commit alignes the behaviours and lets the point of sale handle mapping
to multiple taxes the same way the backend does.
Rev. 2f7c03d added a second admin user (id 2), the 'human' one, on
top of the 'technical' one (id 1, also known as the superuser).
Basically, all calls to _is_superuser() should have been changed to
_is_admin(). They weren't. As a consequence, some features that
were previously available for the admin weren't anymore (e.g.
tours).
This rev. replaces all calls to _is_superuser() by calls to
_is_admin().
- When receiving a 3DS payment notification from Ingenico the payment
transaction should be set to "pending" and not in "done".
Then a second notification is send by Ingenico to set the
payment.transaction to "done".
This is the reason for accepting "pending" as a valid state on the
feedback validation.
This was necessary because the rendering was always determining
which app item should have the class 'active'.
This was an issue with the 'Click Everywhere Test': at the beginning
of the script, it gets the jQuery element that matches all nodes
`a.o_app` in the app menu. When an app item is clicked, it re-renders
the whole app menu, so that older referenced nodes are detached from
the DOM. As a result, clicking on them no longer works, because it
never triggers the MouseEvent `click .o_app`.
This commit fixes the issue by rendering the whole app menu once.
When an item in the app menu is clicked, it dynamically changes
the `active` app.
Due to fccfd36 and 4ba7fbb the translations were only imported, considering the
.pot as the reference.
During import or a manual csv or po file, there is no pot file.
Add tests with Klingon and Dothraki
Fixes#27044
attrs use a field only accessible to members of group users.
If any user non member of group user, like user_id 1
during a migration, reach this view, you got an error.
On product packaging model, the uom is related to the product uom but
but editable. This can lead to some error in the database. This commit
set it as readonly to avoid any mistake.
Co-authored-by: Denis Roussel <denis.roussel@acsone.eu>
Before that, the administrator could use accounting features by default. This is not what we want, the group only gets assigned by default when installing account_accountant, on enterprise.
During an onchange, setting a many2one field automatically updates its inverse
one2many field. If the update raises an exception, catch it and put it in
cache, so that it is re-raised when the value is read from the cache.
Were no longer synchronized since 9.0
Commit 710f67ad4b mistakly reexported them too
Remove the .pot, keep only a few one like it actually makes sesne to have
translated content such as l10n_be_invoice_bba
`_action_done` could unlink a quant. This happens when moving a product from a
location to another one and makes null the quantity of this product in one of
theses locations. In this case, we unlink the quant because it is now useless
and could be confusing on reports based on quants.
The unwanted side effect is that unlinking a record will invalidate the cache. In
some pathologic cases, like making an inventory adjustment of 600 products
and reseting their quantity back to 0, the time of the operation is around 15
minutes. With this patch that tries to work carefully with the cache invalidation,
the same operations takes around 15 secondes.
This commit do not unlink quant anymore, instead it use a 'garbage
collector' on quants without quantity. The garbage collector is trigger
on the scheduler and when the user open the inventory view.
When invoicing only validated timesheet (enterprise feature), the actual
code also link other non validated timesheet from the same Sale line.
This
is not correct.
This commit provide a hook to extend the domain of timesheets to link
correctly. This came from 561ee39356.
We want to allow setting user that havent timesheeted yet
on the project, in the map. We keep the check that every
user with a timesheet should be in the map, but there
can have others.
Task #1883640
Speed up the import of a translation file by getting rid of the previous slow
find_expr and replace it by on conflict clauses
Add a new type of translation model_terms to simplify import
Closes#26925
The ir_translations were pretty slow to load, this was mainly caused by
the condition in variable 'find_expr' and the import of po values in the
temporary table.
To improve the load performance, we made two improvement:
1. Insert the row in the temporary table by batch instead of making an
insertion for each record.
2. Replacing the condition in the variable 'find_expr' by partial unique
index. To perform such a thing, we had to separate the type model in
two types, 'model' and 'model_terms' because it wasn't possible to
create a partial unique index on type 'model' because the type was
used for two different use cases. The type model is now used for
fields that have have a value not callable for the attribute
translate, these field can only have one record for the same field,
model, res_id and language. And the type 'model_terms' is used for
the fields callable, because they can have multiple sources for the
same res_id.
We also removed the deprecated types 'report', 'help', 'view', 'field'.
Thanks to @rco-odoo for the improvement of the first point.