Commit Graph
152817 Commits
Author SHA1 Message Date
Victor Feyens da35c78dd8 [IMP] sale: rely on related fields instead of taking them from the order 2021-12-02 12:12:03 +01:00
Victor Feyens 096e8a3b95 [FIX] sale: do not recomputed price_unit on partner change 2021-12-02 12:12:03 +01:00
Victor Feyens 47f6416d8c [IMP] sale: test improvements
* Verify the pre-compute logic, from the SO side (recurisvely) and from 
the SOL side.
2021-12-02 12:12:03 +01:00
Victor Feyens 2905c565d2 [FIX] sale: avoid defaults on compute stored fields
Leave the computation fully to the compute method, to avoid side-effects 
and wrong values in db.
2021-12-02 12:12:03 +01:00
Victor Feyens d9f9826b93 [FIX] sale(_stock): do not override customer_lead compute with default 2021-12-02 12:12:03 +01:00
Victor Feyens bc945ef3f2 [FIX] sale: remove wrong default qty on lines
Compute was never called because of the compute, which lead to wrong
values (raising due to the SQL constraints).

Integrate the default in the compute directly.
2021-12-02 12:12:03 +01:00
Victor Feyens 886d6093f1 [IMP] sale: remove default for fully computed fields
Will be triggered and returned by default_get calls for nothing
2021-12-02 12:12:03 +01:00
Victor Feyens 3314036f71 [IMP] sale: pre-compute stored related fields 2021-12-02 12:12:03 +01:00
Victor Feyens 52a0f2cc6a [IMP] sale: keep only onchange tests in test_onchange file 2021-12-02 12:12:03 +01:00
Victor Feyens 31d10b862d [IMP] event_sale: convert onchanges to compute
+ review comments
2021-12-02 12:12:03 +01:00
Victor Feyens 302ad13b3d [IMP] sale,account: follow same pattern for all compute methods 2021-12-02 12:12:03 +01:00
Victor Feyens 1d3b9f6be6 [IMP] sale: minor perf improvement & cleanup 2021-12-02 12:12:02 +01:00
Victor Feyens 1d854b0bb6 [IMP] sale: correctly consider display_type in SOL computes 2021-12-02 12:12:02 +01:00
Victor Feyens 2de16205d2 [IMP] sale: clean date(time) conversions
* remove conversions from & to strings, odoo manages date(times)
natively
* clean imports
2021-12-02 12:12:02 +01:00
Victor Feyens 54fa80c24f [FIX][IMP] sale_*: clean customer_lead code
* remove useless hook _get_customer_lead, since the field is now 
computed
* Add inverse to properly modify existing stock moves when the customer 
delay is modified
2021-12-02 12:12:02 +01:00
Yannick Tivisse d7907ae07d [FIX] sale_timesheet: Avoid recomputing price_unit 2021-12-02 12:12:02 +01:00
Yannick Tivisse de4911aceb [IMP] sale: Remove qty_delivered_manual field
This field is useless since the new compute method from 13.0.

And also introduces side effect / loop recomputations.
2021-12-02 12:12:02 +01:00
Yannick Tivisse fecff7119f [IMP] sale: Don't recompute taxes on tax configuration change
This should be done manually
2021-12-02 12:12:02 +01:00
Yannick Tivisse 01557bf36e [FIX] sale: Split _compute_order_info_from_partner into several methods 2021-12-02 12:12:02 +01:00
Yannick Tivisse 052b15e823 [IMP] sale: Convert _change_sale_ok into compute method 2021-12-02 12:12:02 +01:00
Yannick Tivisse 728cb1b15f [IMP] sale: Remove useless pre-precessing on SOL creation
This is not needed anymore since the last ORM changes from this PR
with the pre_compute attribute.
2021-12-02 12:12:02 +01:00
Yannick Tivisse 1003ef0e70 [IMP] sale: Convert _onchange_discount into compute method 2021-12-02 12:12:02 +01:00
Yannick Tivisse 916e92aa30 [FIX] sale: Split product_id_change into several compute methods 2021-12-02 12:12:02 +01:00
Yannick Tivisse 8a6093c612 [FIX] sale: Add misc missing computation triggers 2021-12-02 12:12:02 +01:00
Yannick Tivisse b16b3e32f7 [IMP] sale: Convert _onchange_product_packaging_qty into compute method 2021-12-02 12:12:02 +01:00
Yannick Tivisse ccdd113260 [IMP] sale: Convert _onchange_update_product_packaging_qty into compute method 2021-12-02 12:12:02 +01:00
Yannick Tivisse d80758697d [IMP] sale: Convert _onchange_suggest_packaging into compute method 2021-12-02 12:12:02 +01:00
Yannick Tivisse 687a4c97e3 [IMP] sale: Convert _inverse_qty_delivered into computed method 2021-12-02 12:12:02 +01:00
Yannick Tivisse 836f463c97 [IMP] sale: Convert product_uom_change into compute method 2021-12-02 12:12:02 +01:00
Yannick Tivisse 6a4f437c99 [IMP] sale: Convert _onchange_product_id_set_customer_lead into compute method 2021-12-02 12:12:02 +01:00
Yannick Tivisse a88e7c8717 [IMP] sale: Add comment about onchange convertion issues 2021-12-02 12:12:02 +01:00
Yannick Tivisse d626f348fe [FIX] sale: Fix bad float comparison in tests 2021-12-02 12:12:02 +01:00
Yannick Tivisse 6c198eb31f [IMP] sale: Convert onchange_user_id on account.move into compute method 2021-12-02 12:12:02 +01:00
Yannick Tivisse f9f68adb2c [IMP] sale: Convert onchange_user_id into a compute method 2021-12-02 12:12:01 +01:00
Yannick Tivisse f503e69d3b [IMP] sale: Write create methods in api_create_multi mode 2021-12-02 12:12:01 +01:00
Yannick Tivisse ec84b7e7bd [IMP] sale: Add pre_compute=True on necessary fields 2021-12-02 12:12:01 +01:00
Yannick Tivisse c10db4492e [IMP] sale: Convert _compute_tax_id into real compute method 2021-12-02 12:12:01 +01:00
Yannick Tivisse 5fea243e1a [IMP] sale: Convert _onchange_pricelist_id into compute method 2021-12-02 12:12:01 +01:00
Yannick Tivisse 2806c5fd9f [IMP] sale: Convert onchange_partner_id into compute method 2021-12-02 12:12:01 +01:00
Yannick Tivisse f0f30828fc [IMP] sale: Convert onchange_partner_shipping_id into compute method 2021-12-02 12:12:01 +01:00
Yannick Tivisse b9194406ec [IMP] account: Avoid multiple rebrowse in get_fiscal_position
+ Make it private, as it is not supposed to be called from the
webclient.
2021-12-02 12:12:01 +01:00
Yannick Tivisse 550eb0b73c [IMP] account: Convert _onchange_sale_tax into compute method 2021-12-02 12:12:01 +01:00
Yannick Tivisse 40b2bc6f65 [IMP] website_sale: Convert _onchange_group_discount_per_so_line into compute method 2021-12-02 12:12:01 +01:00
Yannick Tivisse ebd719e0fa [IMP] website_sale: Convert _onchange_sale_delivery_settings into compute method 2021-12-02 12:12:01 +01:00
Yannick Tivisse 7b82fc1fe1 [IMP] sale_stock: Add query counter test on SO batch creation
This is be a correct metric to ensure the onchanges convertion
into compute methods using precompute attribute is going
in the right direction.
2021-12-02 12:12:01 +01:00
Jeremy Kersten 685c76aad2 [FIX] mail_group: only check members based on email and no author_id
In v15, in _find_members, we try to find a members with an email and without
partner_id or a member with the partner_id provided (if provided).

This commit remove the author_id, and so the partner_id to only looking for
members based on their email address.

Author_id could be the wrong since email is not uniq on partner.
We retrieve the same behavior than previously from this way.

courtesy of std for help to find a solution

closes odoo/odoo#80638

X-original-commit: 98d7b1417ee82fefcef175dd83ab41cd89db5119
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2021-12-02 10:19:00 +00:00
Paolo (pgi) f3e9e6f4b6 [FIX] l10n_ch: Fix QR bill according to specs
Reworked the structure of the HTML and the SCSS
to adhere to the official specs:

- 5mm padding inside the two main sections
- Correct font sizes
- Bold headers
- Increased the Swiss Cross inside the logo (7mm x 7mm)
- Scissors pictogram on the outline
- Dashed borders

Sizes now take the wkhtmltopdf (1/1.25 factor) shrinking
into consideration.

closes odoo/odoo#80544

X-original-commit: f02622684c6a220a425044d8d4a5fd474efdb519
Signed-off-by: William André (wan) <wan@odoo.com>
2021-12-02 10:18:56 +00:00
Víctor Martínez 8891f25872 [IMP] base_address_city: address field sync city_id.
`_address_fields` are used by `update_address` [1], which is in turn
called by `_fields_sync` and `_children_sync`.

This mechanism is in charge of synchronizing parent/children address fields
for contacts of type == "contact", as they don't really have an address of
their own. They simply copy the address of their parent.

Without this fix, an inconsistency is created between the value of city_id
and the value of the parent.

[1]: https://github.com/odoo/odoo/blob/20648ef21/odoo/addons/base/models/res_partner.py#L429

TT33047

closes odoo/odoo#80236

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-12-02 10:18:52 +00:00
Christophe Monniez c6600d1ea4 [IMP] core: bump master release version to 15.2
closes odoo/odoo#80708

Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2021-12-02 08:31:59 +00:00
Jérémy Hennecart (jeh) f6bcae9879 [FIX] website_event: fix arrow in some versions of ubuntu
In some version of ubuntu with GNOME, the arrow is not
available. We replace the arrow already defined by the unicode
decimal code of the arrow and remove the arrow separator for the
datepicker (a dash is used by default).

task-2655272

closes odoo/odoo#80700

X-original-commit: ebd0d68280b59954df17f3a56675d194b1e8f70b
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-12-01 20:10:45 +00:00