When doing pivot table data visualization, the Unit Cost of several
lines are summed up but there has more meaning if they were averaged.
This will probably still not be perfect (such as averaging two line
with different quantities the quantities would not be taken into
accounts) but it is already slightly better.
opw-694068
When the 'Invoicing' or 'Accounting' module is installed without the
module 'Sales', only the admin user can create products in the database.
The expected behavior is that any 'Accounting Adviser' should be able to
manage some products in Odoo.
To allow 'Accounting Advisers' to manage products, we add them the CRUD
rights on 'product.product', 'product.template' and
'product.price.history'
opw-703610
When a quality.alert was added from the kanban view, a traceback was raised
due to a coding error. In the fail function, the event is the second parameter.
opw:703281
Split method generate_account() in chart template generation to allow an easier overwritting of the vals in case a localization added some custom fields on account.account object. Courtesy of David Arnold(dar@devco.co)
Since new-api migration of `ir.ui.view`, the method that check views
raises exceptions instead of returning a boolean. Show them as warning.
Related to #14521
On UNIX, the timezone modules conversions can be reset by using
`time.tzset()`. On windows this is not available and the timezone (TZ)
environment variable must be set before the first import of time module.
If not, all datetime gotten in python without specifying UTC (such as
datetime.datetime.now) could be wrong.
This was fixed with 4a77c6a0 in 2013, but has come back since 389c2ba97b
imported pkg_resources (which do a `time` module import) before that.
closes#14926
opw-693764
- Create a SO for a customer (without VAT), validate the invoice
- Connected as the customer, go to 'my/account', and change any
information (e.g. phone number).
You receive the error 'Changing VAT number is not allowed...'.
This is because `data.get('vat', partner.vat)` is `u''`, while
`partner.vat` is `False`.
opw-696962
Previous commit was cleaning the orphan and fuzzy translations of all main translations.
This commit does the same for all regional languages (that are not on Transifex).
To keep these files small, keep only the translated strings.
Fixes#14937
The number of records selected by a FieldCharDomain was only computed
with the base language.
But when selecting the domain with a modal window, or when sending a
mass mailing restricted to a domain, the current user language is used.
With this commit, the number of records is computed with the current
user language.
opw-693836
Was removed at 467ba386 but need it in blackbox for many terms
The alternative is to add all the fields in export_for_printing but this patch,
even if less modular, is way smaller and safer.
When a search is performed and the completion feature is used (search on
a many2one field), clicking on a '(no result)' item causes a crash.
opw-703557
This reverts commit 804ef6f.
1. Generating the vendor bill by adding the related Purchase Order:
in that case, it works well since the system has a first on-change on the product when selecting the asset type;
it sets the asset account in the expense account of the product which in turn is used as the vendor bill account.
2. Creating the vendor by adding manually the product which is an asset:
in that case it takes the wrong account since it used the depreciation account instead of the asset one.
But the labels cannot be changed because the case 1 works.
opw:702265
Some languages were published on Transifex in v9 but no longer in v10.
These languages were still using the outdated .po files
In some of these po, there were some fuzzy translations that were incorrect
(e.g. 'POS Order %s' - 'Kassa ostud', missing '%s')
These were not erased as still using the old translations.
Regenerate a correct .po file based on the new .pot and remove fuzzy
translations.
Fixes similar issue than raised at #14937
The onchange code calls the variable 'partner' before assignement,
this error comes from the migration in rev: https://github.com/odoo/odoo/commit/d45996c9
We fix it by calling the right 'self.partner_id' variable
These `end` migration script will be executed when all modules have
been updated and models setup.
Also accelerate the search of migration scripts, speeding up registry
loading.
To reproduce:
- Configure an external payment provider (e.g. Ingenico) with "Authorize
& capture the amount, confirm the SO and auto-validate the invoice on
acquirer confirmation"
- Create a quotation with a product linked to a subscription
- Send the link to the customer
- Click on "Accept & Pay", use the configured provider
The SO is confirmed, but the invoice is not generated.
By calling `action_confirm` in the callback of the transaction, we
validate the SO before `form_feedback` is called. Therefore, the method
`_confirm_so` will do nothing since the SO is not in state 'draft' or
'sent' anymore.
The solution is to manually call `_confirm_so`instead of
`action_confirm`. This is necessary to do it at this moment since we
might not go through `form_feedback` (e.g. if we pay thanks to wire
transfer).
opw-694273
When reading customized views from our dashbord in reporting,
the measures selected in the customized views were not taken into
account. It happened when the customized view was build from a report.
opw:698105
To reproduce:
- Create 2 products with 'Track Service' set as 'Create a task and track
hours'.
- On a SO, add these 2 products and confirm (2 tasks will be created)
- Go to Timesheet > Activities, and create a line for Task 1. The
delivered quantity of Product 1 in the SO should be modified
accordingly.
- Change the activity line by setting 'Task 2' instead of 'Task 1'.
The delivered quantity of Product 2 is updated accordingly, but the
delivered quantity of Product 1 is unchanged.
This is a complement of commit 4e60d28d00.
opw-693520
opw-695087
When adding a partner "filter" to the calendar view, it only works if we
select directly the partner and not when we choose him via "search more"
or create him on the fly.
This commit uses the partner id directly which is available in the field
value in those three possible instances.
opw-702491
Use the same logic to display taxes as in the default report:
use the tax description and fallback on the name
Already done in report_invoice_document and report_saleorder_document
Closes#14906
It forced to select a coutnry before the state which is not very userfriendly.
Cf comments at #13657
Instead restrict only if the country if a country is selected.
Courtesy of Pedro M. Baeza, Tecnativa
For v10 this is a minimum change and a larger refactoring can be done in master.
This replaces and closes#14896
By not marking invalid custom views as a failure, this allow database
migrations to not be considered failed for simple errors that can be
solved after migration.