Steps to reproduce the bug:
- Set your user in multi company
- Set a default analytic account A for product P with your company
- Create a PO with P and deliver it
- Generate the invoice.
Bug:
The analytic account A was not set on the line.
opw:1831998
[IMP] purchase_requisition : add analytic_tag_ids field in purchase requistion
[IMP] sale: set analytic tags on invoice based on the analytic tags defined on SO
[IMP] account_analytic_default: add default analytic tags to invoice lines created from SO for down payment
(#23110)
The suggested analytic account must search based on the commercial_partner_id instead of
the partner_id field.
E.g. create an invoice with 'Agrolait, Thomas Passot', the analytic account 'Agrolait' wasn't set by default.
-github issue 21401
* analytic accounts can be shared among companies
* amount on analytic lines always refer to amount in company currency of which it belongs to
* add analytic groups (hierarchical way to classify analytic accounts)
* analytic tags:
- only present on analytic lines, not anymore on analytic accounts
- can be used to distribue/split an analytic lines among several analytic accounts
- enabled by a dedicated res.group
- added on several objects (vouchers, expenses, analytic defaults...) as well as in bank statement reconciliation widget (manual counterpart and account.reconcile.model)
* bunch of fixes made related to analytic
Was PR #22124. Was task 32386. Original work by tbe.
When migrating stock, some dummies methods have been removed. Indeed those
calls make more problems than they solve by adding unnecessary complexity
around simple methods. However it seems some calls have been left in the
process :
- _get_act_window_dict which is basically an env.ref or act_window.for_xml_id
- _get_products which is basically having all product_ids from template by
iterating on product_variant_ids.
Currently there is a selection field 'account_type' on the
account.analytic.account model with 2 values : Active or Archived
Let's use an active field instead and add a Archive stat button on the
form. That way, we can remove all the domain ('account_type','=','normal')
which are implicit with the generic active field behavior