Commit Graph
801 Commits
Author SHA1 Message Date
Gorash 774a3fad0e [REF] base,all: Update modifier syntax: view migration
Apply of the migration script to update all view modifiers.

Part-of: odoo/odoo#104741
2023-08-18 09:49:13 +02:00
Gorash 1e12f68a1d [REF] base,all: Update modifier syntax: prepare view migration
These changes are made as a result of simplifying attrs and 'states' in
views.

Before applying the migration script, it is necessary to fix some views.
These views are erroneous and either work by chance or are simply
untested. We have for example wrong domains, elements used by modifiers
but not present in the view, obsolete domain operators, inherit views
not targeting the right views, xpaths using attributes as target, the
use of %(...)s in views, false attribute value types in python.

Part-of: odoo/odoo#104741
2023-08-18 09:49:12 +02:00
Victor Feyens 467619a244 [FIX] sale: show more lines on the order form view
Users are not able to reorder lines on order having more
than 40 lines as only 40 lines are shown by default.

In some advanced flows, new lines are automatically added to the
end of the lines and the user has no way to move them back in
the first ones (or in a specific section if it's not on the same
page).

opw-3437983

closes odoo/odoo#130956

X-original-commit: b316cd61bff1c05f8b07d036e9c0409998982a69
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2023-08-07 12:32:48 +02:00
Aaron Bohy 9d81cff6fd [REF] *: remove always_reload many2one option from archs
This option is no longer necessary since [1] as the value is now
reloaded by default.

[1] odoo/odoo#114024
Part of task~3179751

closes odoo/odoo#130169

Related: odoo/enterprise#44838
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
2023-08-01 09:40:55 +02:00
Damien Bouvy 22c47fb003 [FIX] sale, l10n_br: no dynamic t-calls
A recent trend in report design in Odoo has been to dynamically set the
report template to call using a python method. This was used e.g. to
detect that a document should use an alternative report layout created
by a localization package.

Unfortunately, doing so 'breaks' the new report editor, as it runs
without an underlying record, and therefore cannot call python methods
to determine what the template id to call actually *is*.

This commit removes this mechanism from the Sales app and the Brazilian
localization, relying instead on 'normal' qweb directives and
inheritance to generate the proper layout.

This commit does not introduce any functionnal changes, it simply makes
the templates compatible with the new report editor. No visible change
should occur.

X-original-commit: cd26f77adecc7036c845ed1d7c7094b63987a1a1
Part-of: odoo/odoo#129492
2023-07-25 00:54:54 +02:00
Vincent Larcin 74e710d70d [IMP] sale: refactor SOL form view
This commit refactors the readonly sol form view so that it can
easily be overriden to be made editable.

Task-3278895
2023-07-20 07:57:23 +02:00
Julien Carion (juca) 6c412be2ea [IMP] *: coherent hotkey uses
This commit makes hotkey uses more coherent throughout the entire
codebase by setting alt+q as main shortcurt for confirm and default
actions and alt+x for cancel actions.

task-3370463

closes odoo/odoo#127469

Related: odoo/enterprise#43694
Signed-off-by: Mathieu Duckerts-Antoine (dam) <dam@odoo.com>
2023-07-19 18:24:15 +02:00
Valentin Chevalier ac90aa077d [IMP] payment stripe: migrate to a direct payment flow
The Reserve Bank of India (RBI) issued a directive (amended subsequently
in December 2020 and March 2021) that introduces additional security
measures for recurring payments on India-issued cards. These measures
include:
    - Banks must register cardholders and create an e-mandate through a
      one-time process, using additional factor authentication (AFA)
      like 3D Secure (3DS).
    - Banks must alert cardholders at least 24 hours before charges take
      place and give them the ability to opt out of transactions.
    - Recurring transactions over 15,000 INR (or equivalent in other
      currencies) must go through AFA each time.

Stripe has worked with a partner platform to support that, but we must
manipulate the PaymentIntent and SetupIntent objects directly through
their dedicated API, which the Checkout API does not allow. Therefore,
we must now integrate with the Elements API and implement a direct
payment flow instead of the current payment with a redirection flow
powered by the Checkout API.

After this commit, Stripe will create an e-Mandate for every
Indian-based card newly saved in Odoo.

task-3322020

closes odoo/odoo#123573

Related: odoo/documentation#4719
Related: odoo/upgrade#4748
Related: odoo/enterprise#42196
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2023-07-19 13:13:13 +02:00
Gurupreet Singh 94d4205751 [IMP] sale: allow the customer to sign in the quotation
Previously, customers were not allowed to sign a draft quotation.
We consider that if the customer has access to the quote, he should be able to sign/pay it (instead of getting some strange feedback that the order is not in a state requiring signature/payment)

task-3340541

closes odoo/odoo#124486

Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2023-07-14 15:34:46 +02:00
Victor Feyens 40cc4a7b1a [FIX] sale: do not quick_create sales orders
closes odoo/odoo#127343

X-original-commit: 29c535069d1eee123b844aa89f8f3b43d3a7af71
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2023-07-06 16:23:59 +02:00
Florian Charlier 77f9ff50db [REF] *: use onboarding module
* = account{_payment}, base, onboarding, payment{_stripe},
sale{_management}, web, website_sale

Use the dedicated onboarding module introduced in 16.0 instead of
the res.company model to store onboarding progress.

It allows
 * onboarding steps to be reused across panels
 * to support steps that should be completed per-database or per-company
 * to clean the res.company model from many fields and methods,
 * to remove many views, controllers, actions

Module-specific notes:
* account: We also clean the remaining two steps that are not
part of an accounting panel but make the most sense to be kept here.
* account_payment: Following 8e4e8eb8, the payment provider step is
added to the invoicing onboarding panel. We apply this change here too.
Also impacts the website_sale_dashboard panel (see related ENT PR).
(The "sale tax" one is currently used for to the website sale dashboard).
* payment: Note that the step was already not part of an onboarding
panel within this module.
* website_sale: We clean
  * a field not used (The website_sale dashboard onboarding panel used
  the payment_provider_onboarding_state field).
  * a method that was only called from website_sale_dashboard, so it is
  moved there. See related ENT PR.

Includes a few tests.

Moving views/templates/styling, as well as cleaning residual onboarding-related fields and methods in base, including populate.

This also includes restoring the "onboarding_complete" overlay panel
animating it to disappear after a few seconds so that it doesn't hide
text and block buttons to re-open steps.

Task-3025136

Part-of: odoo/odoo#104223
2023-06-30 23:37:50 +02:00
Joren Van Onder 5921343c2a [ADD] l10n_br_sales: localize customer-facing quotations for Brazil
Brazilians don't expect to see tax-related info on quotations. This
modifies the quotation PDF and online quotation views. Adding t-ifs
with position="attributes" was considered but doesn't play well with
other modules who would want to modify the same elements in some way.

Therefore a similar approach to account.report_invoice was
taken. Small functions on sale.order will determine what views will be
used. This allows l10n_br_sale to dynamically return its own
primary=True views when Brazilian records are shown.

task-3325740

closes odoo/odoo#122987

Signed-off-by: Josse Colpaert <jco@odoo.com>
2023-06-30 00:20:45 +02:00
Victor Feyens 17bece3e79 [REF] sale,*: remove locked (done) SO state
It's not a specific state, it should be considered separately,
as a boolean.

This allows to reduce code complexity (flows should not rely (much) on
the locked logic) and to have a clearer flow.

Task-3163931

Part-of: odoo/odoo#115871
2023-06-22 15:40:51 +02:00
Florian Damhaut 373321d062 [IMP] sale: flatten template
- Flatten the group list in sale's SO for cleaner UI.
- Modify wording to reflect changes in enterprise PR.

related to odoo/enterprise#36968

closes odoo/odoo#112433

Task-id: 2877341
Signed-off-by: Arnaud Joset (arj) <arj@odoo.com>
2023-06-05 13:31:04 +02:00
Damien Bouvy c1d55ba5f7 [IMP] sale: improve form layout
Having 2 groups one after the other like this caused the labels to have
different sizes.

closes odoo/odoo#122089

Signed-off-by: Bouvy Damien (dbo) <dbo@odoo.com>
2023-05-23 18:01:49 +02:00
Valeriya(vchu) b17ca2536a [IMP] sale: remove line decoration for orders
the color of the lines for quotation(sent) is too noisy and not informative as there is a colored status badge. 
Remove the decoration to clear the view and decorate total amount where invoice_status = 'to invoice'.

task-3290317

closes odoo/odoo#119986

Related: odoo/enterprise#40594
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2023-05-23 16:31:27 +02:00
Brieuc-brd ee75969979 [IMP] *: app icons: replace svg to png
The introduction of Milk has brought new app icons.
Using the svg format creates a lack of anti-aliasing on the edges of the
shapes, which makes the icons look bad.
Since the png size has been reduced, we can afford to use the png format
to have the best possible quality without having a lack of performance.

task-3326633
Part of task-3326263

X-original-commit: e07cb722f2b11407a3ad093bd688b7d37afd5a88
Part-of: odoo/odoo#121886
2023-05-22 13:54:07 +02:00
Horacio Tellez 2b1e2abda3 [IMP] payment,*: restrict access to payment.transaction records
Since 15.0, it is no longer possible to have partnerless transactions.
Nonetheless, migrated databases could contain transactions without a
`partner_id` set.
This commit cleans existing rules to make those transactions are not
accessible to unwanted users.

We take the opportunity to clean the security of payment.transaction
records globally.
Now only admin and accounting users have access to payment.transaction
records. The code of different applications has been adapted accordingly.

Task - 3102824

closes odoo/odoo#113515

Related: odoo/upgrade#4564
Related: odoo/enterprise#40939
Signed-off-by: Masereel Pierre <pim@odoo.com>
2023-05-15 15:07:13 +02:00
Florian Charlier 1fdca777a2 [IMP] onboarding, *: customize step image
* = account, sale

This commit allows users to modify the panel image for the
onboarding steps. This is especially necessary for additional
onboardings that can be/could have been created, or if the
appointment onboarding was modified, as it was chosen to not
overly complicate the upgrade and simply not modify these records.

We also customize the placeholder icon to be one of these icons
instead of the default "camera" image.

Finally, a few icons are renamed to be more generally usable.

closes odoo/odoo#121349

Related: odoo/enterprise#41031
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-05-15 11:41:42 +02:00
Damien Bouvy 1e706d3069 [IMP] web, *: milk adaptations
*: hr_holidays, stock, sale, product, web, sale, purchase, stock,
   website, survey

Adapt some custom control panels (mainly for custom reports) to the
milk controlpanel.

hr_holidays:
Move the buttons to create a new time off or a new allocation to the
"create button" slot and transform it into a dropdown (creating
allocation requests is clearly a secondary action, not a primary one)

stock:
3 lines does not fit, must be on 2 lines

Part-of: odoo/odoo#116641
2023-05-12 22:59:19 +02:00
Xavier Luyckx (xlu) c1080c8638 [IMP] *: onboarding, milk adaptations
*: onboarding, account, account_payment, sale.

Currently used in the appointment module (See c1cf8bfb).

Related Task-3297572

task-2818586

Part-of: odoo/odoo#116641
2023-05-12 22:59:16 +02:00
Horacio Tellezandchevalierv 216fa84fbe [ADD] sale: add a products catalog view on the sale order
Currently, Fields Sales are struggling to create quotations or sale
orders directly from the customer place. One of the issues is that it
is not easy to quickly add products to the SO. Products must be added
one by one and, in mobile, it requires completing a form with
quantities, ... for each new line.  

This commit introduces a catalog view that allows users to select
products in a faster and easier way than before, both in desktop and
mobile view.

Task - 3062080

closes odoo/odoo#106382

Related: odoo/enterprise#37915
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
Co-authored-by: chevalierv <vcr@odoo.com>
2023-05-12 20:51:51 +02:00
Victor Feyens 4b5ae09501 [IMP] sale: clarify that draft orders cannot be paid for
For orders that require "Online Signature" for confirmation,
it'll be clearly shown in the signature wizard (after trying
to submit the signature) that the order is not in a state
requiring customer signature.

But for orders requiring "Online Payment" for confirmation,
all the customer will see is "No suitable payment option could be found.".
This is confusing for the customer, and is mostly due to the fact that
payment providers & logic is only loaded when the order is in the right state.

With this commit, the user will see a clear message explaining that the order
cannot be paid in its current state (draft).

Fixes #120197

closes odoo/odoo#120255

Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2023-05-04 20:33:47 +02:00
Valentin Chevalier 17fc488e08 [IMP] product,sale(_product_configurator): refactor in OWL
The product configurator dialog was still in legacy code as it was not
required for the migration of the views to OWL. Now that we're moving
forward with the removal of other parts of the legacy code, this dialog
had to be converted as well.

Some parts of the logic have now been rewritten in OWL, getting a better
share of the logic between the server and the client.

The product configurator in e-commerce still uses the old implementation
and will be refactored in another task.

task-3056806

closes odoo/odoo#106511

Related: odoo/enterprise#39525
Related: odoo/upgrade#4550
Signed-off-by: Valentin Chevalier <vcr@odoo.com>
2023-04-24 08:38:11 +02:00
paso-odoo f1edebeaee [FIX] sale: fix singleton issue on portal view of sale order
If applied, this commit will solve the issue of QWebException when the user
clicks on the 'Customer Preview' button and the sale order have a section in
'Order Lines' and the pricelist is not set.

Steps to produce:
- Create a sale order without a pricelist.
- Add a section in Order Lines.
- Click on the 'Customer Preview' button.

Solve the issue by using the sale order's currency instead of the pricelist's
currency.

sentry - 4092292347
see - https://tinyurl.com/26gt5hoh

closes odoo/odoo#119361

X-original-commit: ad0ed4b9ff34ae8f785435845864dc5dbd6d5e0a
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2023-04-22 05:52:26 +02:00
Maruan Aguerdouh (magm) ae412254f3 [FIX] *: fix kanban_view_ref to work in newer versions
Steps to reproduce:

- Install Sales.
- Go to any quotation and toggle mobile device mode in the browser.
- Go to Other Info > click in Sales Team field.

Issue:

We stop supporting the 'kanban_view_ref' in newer versions of odoo. So
we won't be able to get proper view.

Solution:

Changed the way we ref the kanban view to use context to get the
referenced kanban view.

Related to #39499

opw-3152174

closes odoo/odoo#116031

Related: odoo/enterprise#39499
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-04-20 13:03:32 +02:00
amdi-odoo efac0ab86e [IMP] utm,sale,link_tracker,crm: change kanban icons to buttons
Change the icons of the utm campaign kanban cards to buttons.
This allows a faster access to concerned views.

Task-3240966

Part-of: odoo/odoo#116230
2023-04-19 11:00:59 +02:00
niyasraphy 51761f1918 [IMP] *: improve window title in portal
account, purchase, sale

before this commit, opening a record from
portal(sale, purchase, invoice, project)
shows the window title as Invoice Portal Template,
Purchase Order Portal Template and
Sales Order Portal Template etc

* navigate to portal
* click sales order
* click and open any sales order
* see the window title

after this commit, better title will be
displayed to the portal users.

Invoice Portal Template --> Invoice/Bill
Purchase Order Portal Template --> Purchase Order
Sales Order Portal Template --> Sales Order

closes odoo/odoo#118567

Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2023-04-14 11:49:27 +02:00
bve-odoo a1b1e54e66 [REM] sale: unused use_quotations field
task-1962182 introduce the field back in 12.5
but did not added any logic with it.

The tooltip suggested the need for it tho:
"Check this box if you send quotations to your customers
  rather than confirming orders straight away."

related to 0d2be38333
opw-3198202

closes odoo/odoo#115031

Related: odoo/upgrade#4449
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-04-13 15:25:55 +02:00
Valeriya(vchu) 419739cd5b [IMP] sale: replace stat button with the action one
for consistency reason as the button preview in Odoo is an action button rather than a stat button
task-3074608

closes odoo/odoo#116557

Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2023-03-31 18:14:30 +02:00
Valeriya(vchu) 305aac3045 [IMP] sale: promote create_invoices button
create invoice is a common action in sales orders listview that should be promoted for the better user experience

task-3037442

closes odoo/odoo#116495

Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2023-03-30 18:58:54 +02:00
Valeriya(vchu) 8a3af894f4 [IMP] sale: add placeholder for order many2one fields
make clear for the user that the keyboard can be used for the search

task-3175239

closes odoo/odoo#116546

Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2023-03-30 17:57:47 +02:00
niyasraphy 27049e1793 [FIX] sale: creating new invoice address missing context
before this commit, on creating new invoice address from
the sale order form, the created contact is assigned
by the type as contact, which is expected to be with
type invoice address.

this happens due to multiple field in the form for
partner_invoice_id field in the form and context
was missing during the creation.

after this commit, the invoice address will be
created with invoice address type

closes odoo/odoo#116542

X-original-commit: 10f0eced62fe6ce085ae1a694aa5debbdc06dc1d
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2023-03-25 04:10:20 +01:00
Victor Feyens bfb6dda897 [IMP] sale,*: factorize order & quotations tree views
task-3213457

Part-of: odoo/odoo#114221
2023-03-13 17:45:33 +01:00
John Laterre (jol) 7bd93cc64b [IMP] sale: add confirmed SO to reveivable
The goal is to take into account the confirmed
and un-invoiced sales orders in the total receivable of a client.
It will be useful in the scope of the credit limit trigger.

This is broken down in 3 steps:
1. Add the Remaining Amount to Invoice (RAI) in the
Invoice creation wizard of the Sales Order and store this data.
2. Add the RAI in the Total Receivable of the client.
3. The Remaining amount to invoice goes to optional="hide"
in the list view of "Orders to invoice" list view.

task-3122390

closes odoo/odoo#112905

Signed-off-by: William André (wan) <wan@odoo.com>
2023-03-10 17:54:51 +01:00
niyasraphy 1eee49d00f [FIX] account,sale: traceback field used in domain missing in view
before this commit, enabling the mass editing for the
invoice and sale order tree view using the studio,
 throws exception.

* install studio
* open sale order tree
* enable mass editing for the tree using studio app
* exception will be shown

after this commit, on enabling mass editing on this tree view, exception will not be shown.

closes odoo/odoo#114795

X-original-commit: 105cdc773f6673661d3fdf766084cbc85c97c589
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2023-03-09 15:55:13 +01:00
Andrea Grazioso (agr-odoo) 5efbdb0652 [FIX] sale: restriction on partner credit warning
In Settings>Accounting set 'Sales Credit Limit' to 10,000
Create a user with sales access but no accounting rights
Login with the sale user, create a quotation, set a partner
already exceeding the limit

No warning shows up.
This occurs because the field is restricted to users having account
access

opw-3202384

closes odoo/odoo#114685

X-original-commit: 317977e97d93f572697585d006b5bca5c7365428
Signed-off-by: John Laterre (jol) <jol@odoo.com>
2023-03-08 17:33:45 +01:00
Victor Feyens 24ccf7d9b0 [CLN] *: useless type info for actions
The type fields of actions already defaults to
the model name in the base model definition.

Therefore, specifying `ir.actions.server`, `ir.actions.act_window`
& so on as type is useless (and adds noise since it's the same as
the action model).

closes odoo/odoo#114539

Related: odoo/enterprise#37855
Signed-off-by: Julien Castiaux (juc) <juc@odoo.com>
2023-03-08 17:33:37 +01:00
maximilien(malb) ee2c82700e [IMP] account,sale,repair,website,purchase: remove setting and display correction
Before this commit, the accounting module had a setting on the selection of taxes used by the sales, purchase, website_sale, ... modules. In addition, the website_sale module had the same setting related to the accounting one.
This PR isolates the tax selection parameter in the website_sale module, and instead of using the tax selection, the accounting module will use rounding method (round per line, round globally).
Selecting one of the two will change the display of all account_move or other view using the tax selection setting.

Display changes:
In round per line, a column tax excluded will always be displayed while a column tax included will be in optional hide.
On the other hand, in the round globally, only the tax excluded columns will be available.

closes odoo/odoo#99209

Task-id: 2954332
Related: odoo/upgrade#3826
Related: odoo/enterprise#30853
Signed-off-by: William André (wan) <wan@odoo.com>
2023-03-02 19:24:45 +01:00
momegahed 01489bfab5 [FIX] sale: a missing space in mobile view
Steps to reproduce:

- go to any sale order
- force mobile view
- refresh

Bug:
there is no space between the quantity and the unit

Fix:
putting both in the same line makes odoo add the space between them

OPW-3185674

closes odoo/odoo#113273

X-original-commit: 1a0d4c32161444902467c3ec18003c24e885edd1
Signed-off-by: Mohamed Megahed Abbas Megahed SALLAM (mome) <mome@odoo.com>
2023-02-25 13:33:07 +01:00
ノウラ 477082212d [FIX] sale, purchase: fix product description overflow
Steps to reproduce:

- Install stock, purchase
- Create a product with a long name without whitespace
- Create a purchase order with that product
- Go to portal and access the purchase order

Current behavior:
- Product description overflows when accessing the PO from the portal

Behavior after the PR:
- To fix the problem in the Portal we add table-responsive to the table

opw-3133407

closes odoo/odoo#112672

X-original-commit: 5abccc5efc6e333c8a889a1c24419dadc9c6e7f0
Signed-off-by: Bouvy Damien (dbo) <dbo@odoo.com>
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-02-14 18:11:47 +01:00
jbw-odoo a11f402d6b [IMP] sale: down payment tax breakdown
Break down payments down per tax. When creating a down payment for a sale order, create one line per tax instead of one line for the enire order.

[Sale Order]
Product    Qty  Unit price    Tax   Subtotal
Product1   1    1000          10%   1000
Product2   1    1000          5%    1000
                                    ====
                            Untaxed 2000
                                Tax 150
                                    ====
                              Total 2150

Make a 50% (1000) down payment :

[BEFORE]
Product    Qty  Unit price    Tax   Subtotal
Product1   1    1000          10%   1000
Product2   1    1000          5%    1000
Down pay   1    1075                0
                                    ====
                            Untaxed 2000
                                Tax 150
                                    ====
                              Total 2150

[AFTER]
Product    Qty  Unit price    Tax   Subtotal
Product1   1    1000          10%   1000
Product2   1    1000          5%    1000
Down pay   1    500           10%   0
Down pay   1    500           5%    0
                                    ====
                            Untaxed 2000
                                Tax 150
                                    ====
                              Total 2150

closes odoo/odoo#105177

Task: 2678531
Related: odoo/enterprise#36331
Signed-off-by: Laurent Smet <las@odoo.com>
2023-02-14 13:13:47 +01:00
niyasraphy c7360ebcab [FIX] sale: remove quick_add from sales calendar view
before this commit, on clicking the sales calendar view, it allows the quick adding from the calendar view and entered value is going to the name field of sale.order model.

after this commit, quick adding will be disable and on clicking form will be opened with selected date.

closes odoo/odoo#112587

X-original-commit: b82c59bdaffb731172eeb36954e5e46907ac9fcc
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2023-02-14 10:02:28 +01:00
mehjabinfarsana ecf083d0a4 [FIX] sale: pricelist required attribute issue
before this commit, when try to create a sale order without inputting pricelist field it was showing exception like "The operation cannot be completed:
- Create/update: a mandatory field is not set."

after this commit, user cannot save the record without filling pricelist field

closes odoo/odoo#111209

X-original-commit: 5ff011912e7dac8177d4a03ff51534e29fa4ddb4
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2023-01-27 14:03:37 +01:00
mehjabinfarsana 418c46be03 [FIX] sale: Traceback on clearing quotation date in sale order form
before this commit, in sale order form view, while clearing the quotation date it was showing Traceback error. field is already required in the model level, so removing the conditional required attribute from the view

after this commit, the quotation date is required

closes odoo/odoo#111066

X-original-commit: f8db67897c1b533a591eaf48ae18b625b1dd4d33
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2023-01-26 18:51:37 +01:00
Julien Van Roy f2a64b03e1 [IMP] sale,website_sale: add hooks to the checkout flow
Add hooks before rendering the `website_sale.cart` and
`website_sale.extra_info` templates. This allows to pass flags to
trigger style variation in the checkout wizard (add an extra step). In
addition, add the country_code to the sale_order view form, since it
will be needed everytime we add l10n_* fields in this view (with attrs
based on `country_code`).

Related: https://github.com/odoo/enterprise/pull/35050/commits/fce5e682946cfa7d9e19c0c3c6abfab3dcbcc54a.

task-3089169

closes odoo/odoo#108181

Related: odoo/enterprise#35050
Signed-off-by: Laurent Smet <las@odoo.com>
2023-01-26 18:51:01 +01:00
Anita (anko) f5eec1d539 [FIX] sale,purchase,account: Duplicating document_tax_totals
If user would add addictional field in one of reports it could break other
reports as other models do not share all the same fields. Now modules inherit
template and create their version of field.

task-2858097

closes odoo/odoo#106140

Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2023-01-26 18:50:58 +01:00
Adrien Schoffeniels 9e071ac34c [FIX] utm, *: allow quick creation of campaigns
Purpose:
========
Since the introduction of the required "title" field in the utm_campaign
model in commit [1], quick creation of campaigns from many2ones is not
possible anymore (the slow creation modal is opened when clicking on
"Create"), and the name value entered is not copied into the name field
of the creation form.

This is because the model now has a field "name", and a field "title",
which are both required. The creation using the many2one widget tries to
create a record using the entered value as title and no name, which fails.

It fails because the create method replaces this empty name by a False
value, since it could not generate a unique name given no name.

This commit makes sure that if a title but no name is given when creating
a new campaign record, one does not set the name value to False anymore.

It also makes sure that the value entered before clicking on the "create
and edit" button is copied in the form, by adding the "create_name_field"
option on the many2one fields (the form uses the title field, not the
name).
The "always_reload" option has also been added because without it, the
many2one shows the name of the created record instead of showing the title.

[1]: https://github.com/odoo/odoo/commit/4dbcefb5e5b1878e81fe9be9fe48a785f813334f

Task-3113954

closes odoo/odoo#110474

X-original-commit: 869208cd09b6ceb5dcda55b6fe4131d7cc8d43e8
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
2023-01-20 06:21:02 +01:00
Demesmaeker 83c52575d0 [REF] product,repair,(*_)sale(_*): unrequired pricelist
Removes the constraint of using a pricelist and makes all sales flows
rely on the currency of the sale order (or repair order)

task-2735672

closes odoo/odoo#84920

Related: odoo/enterprise#24716
Related: odoo/upgrade#3642
Signed-off-by: Morgane Demesmaeker <edm@odoo.com>
2023-01-18 21:08:52 +01:00
niyasraphy d326a9c4c4 [FIX] sale: show sales warning only when feature is activated in settings
after this commit: https://github.com/odoo/odoo/commit/8b91cab67f122667ecc250a8b016b152929c61e2 sales warning fields sale_warn and sale_warn_msg fields in the partner form is displayed always without respecting the option in sales settings.

the fields will be displayed always even if the feature is unticked in the settings.

after this commit, the fields will be shown only once the feature is activated in settings.

closes odoo/odoo#108987

X-original-commit: d247279c9e42469d0a120fa8d673fec69186c7e5
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2023-01-03 13:16:25 +01:00