Code Monkey home page Code Monkey logo

account-analytic's Introduction

Runboat Pre-commit Status Build Status codecov Translation Status

account-analytic

TODO: add repo description.

Available addons

addon version maintainers summary
account_analytic_distribution_required 14.0.1.0.0 Account Analytic Distribution Required
account_analytic_no_lines 14.0.1.0.0 Hide analytics lines and disable their generation from a move line.
account_analytic_parent 14.0.1.0.1 This module reintroduces the hierarchy to the analytic accounts.
account_analytic_required 14.0.1.0.3 Account Analytic Required
account_analytic_sequence 14.0.1.0.1 Restore the analytic account sequence
account_analytic_tag_default 14.0.1.0.0 Set default tags on analytic accounts.
account_analytic_wip 14.0.3.0.3 dreispt Track and report WIP and Variances based on Analytic Items
account_move_update_analytic 14.0.1.0.1 This module allows the user to update analytic on posted moves
analytic_activity_based_cost 14.0.4.0.2 dreispt Assign overhead costs to activities, using Analytic Items
analytic_base_department 14.0.1.0.0 Add relationshet between Analytic and Department
analytic_partner 14.0.1.0.0 Search and group analytic entries by partner
analytic_partner_hr_timesheet 14.0.1.0.0 Classify HR activities by partner
analytic_tag_dimension 14.0.1.0.1 Group Analytic Entries by Dimensions
analytic_tag_dimension_enhanced 14.0.1.1.2 Analytic Accounts Dimensions Enhanced
mrp_analytic 14.0.1.1.0 Adds the analytic account to the production order
mrp_analytic_child_mo 14.0.1.0.1 Carry the Manufacturing Order Analytic Account to the generated Manufacturing Orders
mrp_analytic_sale_project 14.0.1.0.0 Carry the Sales Order Analytic Account to the generated Manufacturing Orders
pos_analytic_by_config 14.0.1.0.0 Use analytic account defined on POS configuration for POS orders
procurement_mto_analytic 14.0.1.0.0 This module sets analytic account in purchase order line from sale order analytic account
product_analytic 14.0.1.0.0 Add analytic account on products and product categories
product_analytic_purchase 14.0.1.0.1 Glue module between purchase and product_analytic
product_analytic_sale 14.0.1.0.0 alexis-via Glue module between sale and product_analytic
purchase_analytic 14.0.3.0.0 Purchase Analytic
purchase_request_analytic 14.0.1.0.0 Purchase Request Analytic
purchase_stock_analytic 14.0.1.0.0 Copies the analytic account of the purchase order item to the stock move
sale_stock_analytic 14.0.1.0.0 Copies the analytic account of the sale order and the analytic tags of the sale order line to the stock move
stock_analytic 14.0.2.1.2 Adds an analytic account and analytic tags in stock move
stock_inventory_analytic 14.0.1.0.3 Stock Inventory Analytic
stock_picking_analytic 14.0.1.0.0 Allows to define the analytic account on picking level
stock_warehouse_analytic 14.0.1.0.0 Allows to mention an analytic account on warehouse level

Licenses

This repository is licensed under AGPL-3.0.

However, each module can have a totally different license, as long as they adhere to Odoo Community Association (OCA) policy. Consult each module's __manifest__.py file, which contains a license key that explains its license.


OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use.

account-analytic's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

account-analytic's Issues

Migration to version 13.0

Todo

https://github.com/OCA/maintainer-tools/wiki/Migration-to-version-13.0

Modules to migrate

Missing module? Check https://github.com/OCA/maintainer-tools/wiki/%5BFAQ%5D-Missing-modules-in-migration-issue-list

procurement_mto_analytic V12

There is a specific type of operation that is not covered.
When the analytic account is not set on the sale quotation, but the same sale order contains a product that generates a task in a new project and a product that generates the RFQ, as both actions are created at the same time (the new project with the analytic account related and the RFQ), the analytic account created is not copied on the RFQ.
Would it be possible that the RFQ created had the new analityc account created when the sale quotation is confirmed?

crash when writing the company when analytic_multicurrency is installed

To reproduce on v7:

  • install analytic_multicurrency
  • write any field in the company

You get the following crash:

TypeError: super(type, obj): obj must be an instance or subtype of type

The traceback points to the method causing the problem: https://github.com/OCA/account-analytic/blob/7.0/analytic_multicurrency/analytic.py#L100-L102.

That breaks because a store trigger in OpenERP is a method of a class which is called as a method of another class. In that case, we are in the account_analytic_account class, but self is a res_company.

12.0 Migration

Hi all,
The analytic distribution is now standard in v12 version. Do you have tips in order to migrate data from this module to the standard one ?
Thanks

[RFC] stock_analytic: Analytic account on transfers/scraps

We would like to propagate the analytic account to the stock moves based on the transfer and scrap.

stock.picking

  • Add a many2one field "Analytic Account" (analytic_account_id)
  • Extend create(): if the analytic account is set, update all the related stock moves with the same analytic account
  • Extend write(): if the analytic account is updated, update all the related stock moves with the same analytic account

stock.scrap

  • Add a many2one field "Analytic Account" (analytic_account_id)
  • Extend the method _prepare_move_values to set the analytic account

[9.0] blueprint: account_analytic_parent

The analytic accounts hierarchy has been removed in v9.

Whereas for G/L accounts, the notion of hierarchy is debatable and I think it was a good thing to remove it, I believe such a concept is useful for analytic accounts.

We would therefore start with a first module named account_analytic_parent that reintroduces parent_id and child_ids on account.analytic.account, together with the parent_left/parent_right mechanism for performance.

This module would be a foundation for other modules wishing to build on the hierarchy concept.

Is there an interest to have this in OCA?

[10.0]Analytic Tag Dimension causes crash during update all

Hi,
I've successfully installed the module analytic tag dimension, yet when we're updating the db with -u all, the following message occurs.

2018-02-20 11:24:33,564 28893 INFO prod odoo.sql_db: bad query: CREATE or REPLACE VIEW account_invoice_report as (
            WITH currency_rate AS (
            SELECT
                r.currency_id,
                COALESCE(r.company_id, c.id) as company_id,
                r.rate,
                r.name AS date_start,
                (SELECT name FROM res_currency_rate r2
                 WHERE r2.name > r.name AND
                       r2.currency_id = r.currency_id AND
                       (r2.company_id is null or r2.company_id = c.id)
                 ORDER BY r2.name ASC
                 LIMIT 1) AS date_end
            FROM res_currency_rate r
            JOIN res_company c ON (r.company_id is null or r.company_id = c.id)
        )
            
            SELECT sub.id, sub.date, sub.product_id, sub.partner_id, sub.country_id, sub.account_analytic_id,
                sub.payment_term_id, sub.uom_name, sub.currency_id, sub.journal_id,
                sub.fiscal_position_id, sub.user_id, sub.company_id, sub.nbr, sub.type, sub.state,
                sub.weight, sub.volume,
                sub.categ_id, sub.date_due, sub.account_id, sub.account_line_id, sub.partner_bank_id,
                sub.product_qty, sub.price_total as price_total, sub.price_average as price_average,
                COALESCE(cr.rate, 1) as currency_rate, sub.residual as residual, sub.commercial_partner_id as commercial_partner_id
        , sub.x_dimension_test as x_dimension_test, sub.x_dimension_None as x_dimension_None, sub.x_dimension_Activity as x_dimension_Activity, sub.x_dimension_subact as x_dimension_subact, sub.x_dimension_activity as x_dimension_activity, sub.x_dimension_country as x_dimension_country
            FROM (
                
                SELECT ail.id AS id,
                    ai.date_invoice AS date,
                    ail.product_id, ai.partner_id, ai.payment_term_id, ail.account_analytic_id,
                    u2.name AS uom_name,
                    ai.currency_id, ai.journal_id, ai.fiscal_position_id, ai.user_id, ai.company_id,
                    1 AS nbr,
                    ai.type, ai.state, pt.categ_id, ai.date_due, ai.account_id, ail.account_id AS account_line_id,
                    ai.partner_bank_id,
                    SUM ((invoice_type.sign * ail.quantity) / u.factor * u2.factor) AS product_qty,
                    SUM(ail.price_subtotal_signed * invoice_type.sign) AS price_total,
                    SUM(ABS(ail.price_subtotal_signed)) / CASE
                            WHEN SUM(ail.quantity / u.factor * u2.factor) <> 0::numeric
                               THEN SUM(ail.quantity / u.factor * u2.factor)
                               ELSE 1::numeric
                            END AS price_average,
                    ai.residual_company_signed / (SELECT count(*) FROM account_invoice_line l where invoice_id = ai.id) *
                    count(*) * invoice_type.sign AS residual,
                    ai.commercial_partner_id as commercial_partner_id,
                    partner.country_id,
                    SUM(pr.weight * (invoice_type.sign*ail.quantity) / u.factor * u2.factor) AS weight,
                    SUM(pr.volume * (invoice_type.sign*ail.quantity) / u.factor * u2.factor) AS volume
        , ail.x_dimension_test as x_dimension_test, ail.x_dimension_None as x_dimension_None, ail.x_dimension_Activity as x_dimension_Activity, ail.x_dimension_subact as x_dimension_subact, ail.x_dimension_activity as x_dimension_activity, ail.x_dimension_country as x_dimension_country 
                FROM account_invoice_line ail
                JOIN account_invoice ai ON ai.id = ail.invoice_id
                JOIN res_partner partner ON ai.commercial_partner_id = partner.id
                LEFT JOIN product_product pr ON pr.id = ail.product_id
                left JOIN product_template pt ON pt.id = pr.product_tmpl_id
                LEFT JOIN product_uom u ON u.id = ail.uom_id
                LEFT JOIN product_uom u2 ON u2.id = pt.uom_id
                JOIN (
                    -- Temporary table to decide if the qty should be added or retrieved (Invoice vs Refund) 
                    SELECT id,(CASE
                         WHEN ai.type::text = ANY (ARRAY['in_refund'::character varying::text, 'in_invoice'::character varying::text])
                            THEN -1
                            ELSE 1
                        END) AS sign
                    FROM account_invoice ai
                ) AS invoice_type ON invoice_type.id = ai.id
         
                GROUP BY ail.id, ail.product_id, ail.account_analytic_id, ai.date_invoice, ai.id,
                    ai.partner_id, ai.payment_term_id, u2.name, u2.id, ai.currency_id, ai.journal_id,
                    ai.fiscal_position_id, ai.user_id, ai.company_id, ai.type, invoice_type.sign, ai.state, pt.categ_id,
                    ai.date_due, ai.account_id, ail.account_id, ai.partner_bank_id, ai.residual_company_signed,
                    ai.amount_total_company_signed, ai.commercial_partner_id, partner.country_id
        
            ) AS sub
            LEFT JOIN currency_rate cr ON
                (cr.currency_id = sub.currency_id AND
                 cr.company_id = sub.company_id AND
                 cr.date_start <= COALESCE(sub.date, NOW()) AND
                 (cr.date_end IS NULL OR cr.date_end > COALESCE(sub.date, NOW())))
        )
2018-02-20 11:24:33,566 28893 WARNING prod odoo.modules.loading: Transient module states were reset
2018-02-20 11:24:33,567 28893 ERROR prod odoo.modules.registry: Failed to load registry
Traceback (most recent call last):
  File "/home/odoothomas/server/odoo/modules/registry.py", line 83, in new
    odoo.modules.load_modules(registry._db, force_demo, status, update_module)
  File "/home/odoothomas/server/odoo/modules/loading.py", line 335, in load_modules
    force, status, report, loaded_modules, update_module)
  File "/home/odoothomas/server/odoo/modules/loading.py", line 237, in load_marked_modules
    loaded, processed = load_module_graph(cr, graph, progressdict, report=report, skip_modules=loaded_modules, perform_checks=perform_checks)
  File "/home/odoothomas/server/odoo/modules/loading.py", line 136, in load_module_graph
    registry.init_models(cr, model_names, {'module': package.name})
  File "/home/odoothomas/server/odoo/modules/registry.py", line 318, in init_models
    model.init()
  File "/home/odoothomas/server/addons/account/report/account_invoice_report.py", line 180, in init
    self._select(), self._sub_select(), self._from(), self._group_by()))
  File "/home/odoothomas/server/odoo/sql_db.py", line 154, in wrapper
    return f(self, *args, **kwargs)
  File "/home/odoothomas/server/odoo/sql_db.py", line 231, in execute
    res = self._obj.execute(query, params)
ProgrammingError: ERREUR:  la colonne ail.x_dimension_none n'existe pas
LINE 49: ...      , ail.x_dimension_test as x_dimension_test, ail.x_dime...
                                                              ^

As a result we need to recreate manually the view and to update the module "after" account one by one.
Any idea?

Migration to version 11.0

Todo

https://github.com/OCA/maintainer-tools/wiki/Migration-to-version-11.0

Modules to migrate

  • account_analytic_default_account - By @i-vyshnevska - #232
  • account_analytic_distribution - By @nadiaafa - #142 - By @cubells - #184
  • account_analytic_distribution_required
  • account_analytic_line_list
  • account_analytic_no_lines - By @ThomasBinsfeld - #190
  • account_analytic_parent - By @jaumeplanas - #168
  • account_analytic_required - By @arkostyuk - #141
  • account_analytic_sequence - By @aheficent - #187
  • account_asset_analytic
  • analytic_base_department - By @arkostyuk - #145
  • analytic_department >> analytic_base_department - By @Tonow-c2c - #167
  • analytic_multicurrency
  • analytic_partner - By @cristinamartinrod - #195
  • analytic_partner_hr_timesheet
  • analytic_partner_hr_timesheet_invoice
  • analytic_secondaxis
  • analytic_secondaxis_multicurrency
  • analytic_secondaxis_project
  • analytic_secondaxis_timesheet
  • analytic_tag_dimension - By @arkostyuk - #146
  • analytic_tag_dimension_sale_warning - By @mpanarin - #148
  • analytic_tag_dimension_purchase_warning - By @mpanarin - #149
  • mrp_analytic - By @SalahAdDin - #186
  • procurement_analytic Not needed as procurement.order have dissapeared
  • product_analytic - By @chienandalu - #172
  • purchase_procurement_analytic > purchase_mto_analytic - By @gittusr - #204
  • sale_procurement_analytic > purchase_mto_analytic - By @gittusr - #204
  • stock_analytic - By @jaredkipe - #162

[10.0] (purchase_procurement_analytic) Isn't grouping the lines of products with different analytic account on same purchase order for the same supplier

Use of case:
You have five orders with different analytic account from different customers, two different products (A and B) from the same supplier A. Same route applies in this case Make to order

SO 1 from customer A, Analytic_account A - Orders 1 u. Product A and 1 u. Product B
SO 2 from customer B, Analytic_account B - Orders 3 u. Product A
SO 3 from customer C, with no analytic - Orders 5 u. Product B
SO 4 from customer D, with no analytic - Orders 5 u. Product A
SO 5 from customer E, Analytic_account B - Orders 5 u. Product A

Expected behaviour:
One purchase order to supplier A with the following lines:
1 u. Product A with Analytic_account A
8 u. Product A with Analytic_account B
1 u. Product B with Analytic_account A
5 u. Product B with no analytic
5 u. Product A with no analytic

Effective result:
3 different orders, one for each analytic account and one
PO 1: Equals to SO 1
PO 2: Equals to SO 2 + SO 5 correctly merged in one line as it is same product and analytic
PO 3: Equals to SO 3 + SO 4 correctly not merged in one line as it isn't same product

The grouping on the same purchase order is limited to the same analytic account or none, that limitation should be on the lines not on the document itself.
Is this behaviour intended?

If you need clarification I will be more than pleased to do it. # @rousseldenis @cubells

analytic_partner error message

I receive the next message when I try to use the filter "Group by: Acount Partner" in Analytic Journal Items:

Traceback (most recent call last):
File "/opt/odoo/odoo_8/src/OCA/OCB/openerp/http.py", line 537, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/opt/odoo/odoo_8/src/OCA/OCB/openerp/http.py", line 574, in dispatch
result = self._call_function(*_self.params)
File "/opt/odoo/odoo_8/src/OCA/OCB/openerp/http.py", line 310, in _call_function
return checked_call(self.db, *args, *_kwargs)
File "/opt/odoo/odoo_8/src/OCA/OCB/openerp/service/model.py", line 113, in wrapper
return f(dbname, _args, *_kwargs)
File "/opt/odoo/odoo_8/src/OCA/OCB/openerp/http.py", line 307, in checked_call
return self.endpoint(_a, *_kw)
File "/opt/odoo/odoo_8/src/OCA/OCB/openerp/http.py", line 803, in call
return self.method(_args, *_kw)
File "/opt/odoo/odoo_8/src/OCA/OCB/openerp/http.py", line 403, in response_wrap
response = f(_args, *_kw)
File "/opt/odoo/odoo_8/src/linked-addons/web/controllers/main.py", line 944, in call_kw
return self._call_kw(model, method, args, kwargs)
File "/opt/odoo/odoo_8/src/linked-addons/web/controllers/main.py", line 936, in _call_kw
return getattr(request.registry.get(model), method)(request.cr, request.uid, _args, *_kwargs)
File "/opt/odoo/odoo_8/src/OCA/OCB/openerp/api.py", line 241, in wrapper
return old_api(self, _args, *_kwargs)
File "/opt/odoo/odoo_8/src/OCA/OCB/openerp/models.py", line 2091, in read_group
assert groupby_def and groupby_def._classic_write, "Fields in 'groupby' must be regular database-persisted fields (no function or related fields), or function fields with store=True"
AssertionError: Fields in 'groupby' must be regular database-persisted fields (no function or related fields), or function fields with store=True

analytic tag dimension - data is not saved in the custom fields

Odoo 10 Community

How to reproduce

  • Create dimension: e.g. District
  • Create two tags: e.g North, South

In the database, the field "x_dimension_dis" is created - Accessible through pgadmin
create an invoice, and in the invoice line, select a tag e.g. "North"
Save the invoice
--> in the table account.invoice.line for that record, the field x_dimension_dis is still 'null'

Looking at the code, the line:
super(AnalyticDimensionLine, record).write(dimension_values)
is executed, but .. the data is not written in the DB.

No clue..

Migration to version 9.0

Todo

https://github.com/OCA/maintainer-tools/wiki/Migration-to-version-9.0

Modules to migrate

  • analytic_multicurrency
  • analytic_secondaxis
  • account_analytic_line_list
  • analytic_secondaxis_multicurrency
  • analytic_secondaxis_project
  • analytic_partner_hr_timesheet_invoice
  • analytic_partner
  • account_analytic_required - By @yvaucher - #59
  • analytic_partner_hr_timesheet
  • account_analytic_plan_required
  • analytic_secondaxis_timesheet
  • product_analytic - By @grindtildeath - #125
  • sale_procurement_analytic - By @cubells - #130
  • stock analytic - By @mreficent - #81

[8.0]Bug in analytic_multicurrency

Hi,
I am having an error when computing chart of analytic accounts KeyError: 'quantity' in analytic_multicurrency module.
When calling _debit_credit_bal_qtty looks like that 'quantity' key is lost in field_list, because the field is not in the tree view view_account_analytic_account_tree of the project view.

Manufacturing order does not take analytic account from the Sales orders

First of all I want to thank you for very useful App, but i have an issue that needs your help to solve it.
After setting analytic account in our Sales Orders when Manufacturing Order created based on the related SO, analytic account not shown in MO. It means you must check the MO one by one and add analytic account manually which takes time and it's very complex as lots of SO is created everyday.

Any ideas are welcome :)

[10.0] Stock Analytic, When I try to confirm a stock picking

Traceback (most recent call last):
File "/odoo/odoo-server/odoo/http.py", line 640, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/odoo/odoo-server/odoo/http.py", line 677, in dispatch
result = self._call_function(**self.params)
File "/odoo/odoo-server/odoo/http.py", line 333, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/odoo/odoo-server/odoo/service/model.py", line 101, in wrapper
return f(dbname, *args, **kwargs)
File "/odoo/odoo-server/odoo/http.py", line 326, in checked_call
result = self.endpoint(*a, **kw)
File "/odoo/odoo-server/odoo/http.py", line 935, in call
return self.method(*args, **kw)
File "/odoo/odoo-server/odoo/http.py", line 506, in response_wrap
response = f(*args, **kw)
File "/odoo/odoo-server/addons/web/controllers/main.py", line 889, in call_button
action = self._call_kw(model, method, args, {})
File "/odoo/odoo-server/addons/web/controllers/main.py", line 877, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "/odoo/odoo-server/odoo/api.py", line 689, in call_kw
return call_kw_multi(method, model, args, kwargs)
File "/odoo/odoo-server/odoo/api.py", line 680, in call_kw_multi
result = method(recs, *args, **kwargs)
File "/odoo/odoo-server/addons/stock/wizard/stock_immediate_transfer.py", line 36, in process
return self.pick_id.do_transfer()
File "/odoo/odoo-server/addons/stock/models/stock_picking.py", line 907, in do_transfer
todo_moves.action_done()
File "/odoo/odoo-server/addons/sale_stock/models/stock.py", line 22, in action_done
result = super(StockMove, self).action_done()
File "/odoo/odoo-server/addons/stock_account/models/stock.py", line 188, in action_done
res = super(StockMove, self).action_done()
File "/odoo/odoo-server/addons/mrp/models/stock_move.py", line 306, in action_done
return super(StockMove, self-production_moves).action_done()
File "/odoo/odoo-server/addons/stock/models/stock_move.py", line 856, in action_done
dest_package_id=quant_dest_package_id, entire_pack=entire_pack)
File "/odoo/odoo-server/addons/stock/models/stock_quant.py", line 198, in quants_move
quants_move_sudo._quant_update_from_move(move, location_to, dest_package_id, lot_id=lot_id, entire_pack=entire_pack)
File "/odoo/odoo-server/addons/stock_account/models/stock.py", line 172, in _quant_update_from_move
self._account_entry_move(move)
File "/odoo/custom/odoo-mexico-localization/argil_account_per_warehouse/model/metodos.py", line 195, in _account_entry_move
self.with_context(force_company=force_company)._create_account_move_line(move, acc_src, acc_dest, journal_id)
File "/odoo/odoo-server/addons/stock_account/models/stock.py", line 134, in _create_account_move_line
move_lines = move._prepare_account_move_line(qty, cost, credit_account_id, debit_account_id)
File "/odoo/custom/odoo-mexico-localization/stock_move_entries/model/metodos.py", line 13, in _prepare_account_move_line
res = super(stock_move, self)._prepare_account_move_line(qty, cost, credit_account_id, debit_account_id)
File "/odoo/custom/addons/stock_analytic/models/stock.py", line 30, in _prepare_account_move_line
if res[num][2]["account_id"] != self.product_id.
IndexError: list index out of range

'partner': analytic.partner_id.commercial_partner_id.name,

Dear.

I installed account_analytic_parent, but when a try to create a new analytic accoun, when a i select a mother o parent account i receive the follow error:

Error:
Odoo Server Error

Traceback (most recent call last):
File "/home/fernando/odoo-12-dev/odoo/odoo/http.py", line 656, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/home/fernando/odoo-12-dev/odoo/odoo/http.py", line 314, in _handle_exception
raise pycompat.reraise(type(exception), exception, sys.exc_info()[2])
File "/home/fernando/odoo-12-dev/odoo/odoo/tools/pycompat.py", line 87, in reraise
raise value
File "/home/fernando/odoo-12-dev/odoo/odoo/http.py", line 698, in dispatch
result = self._call_function(**self.params)
File "/home/fernando/odoo-12-dev/odoo/odoo/http.py", line 346, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/home/fernando/odoo-12-dev/odoo/odoo/service/model.py", line 97, in wrapper
return f(dbname, *args, **kwargs)
File "/home/fernando/odoo-12-dev/odoo/odoo/http.py", line 339, in checked_call
result = self.endpoint(*a, **kw)
File "/home/fernando/odoo-12-dev/odoo/odoo/http.py", line 941, in call
return self.method(*args, **kw)
File "/home/fernando/odoo-12-dev/odoo/odoo/http.py", line 519, in response_wrap
response = f(*args, **kw)
File "/home/fernando/odoo-12-dev/odoo/addons/web/controllers/main.py", line 962, in call_kw
return self._call_kw(model, method, args, kwargs)
File "/home/fernando/odoo-12-dev/odoo/addons/web/controllers/main.py", line 954, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "/home/fernando/odoo-12-dev/odoo/odoo/api.py", line 745, in call_kw
return _call_kw_model(method, model, args, kwargs)
File "/home/fernando/odoo-12-dev/odoo/odoo/api.py", line 718, in _call_kw_model
result = method(recs, *args, **kwargs)
File "/home/fernando/odoo-12-dev/odoo/odoo/models.py", line 1643, in name_search
return self._name_search(name, args, operator, limit=limit)
File "/home/fernando/odoo-12-dev/odoo/addons/analytic/models/analytic_account.py", line 168, in _name_search
return self.browse(analytic_account_ids).name_get()
File "/home/fernando/odoo-12-dev/odoo/extra-addons/account-analytic/account_analytic_parent/models/account_analytic_account.py", line 151, in name_get
'partner': analytic.partner_id.commercial_partner_id.name,
KeyError: 'nombre'

Questions about analytic_secondaxis, analytic_secondaxis_project, analytic_secondaxis_timesheet?

Hello,

Why those modules has installable False by default?
I tried to make it True, I mean installable = True
but then I got another error (run over odoo v8)

here the log:

2015-12-16 10:25:04,587 19408 CRITICAL test openerp.modules.module: Couldn't load module analytic_secondaxis
2015-12-16 10:25:04,588 19408 CRITICAL test openerp.modules.module: No module named osv
2015-12-16 10:25:04,588 19408 CRITICAL test openerp.service.server: Failed to initialize database test.
Traceback (most recent call last):
File "/home/yopiangi/Workspaces/odoo/openerp/service/server.py", line 929, in preload_registries
registry = RegistryManager.new(dbname, update_module=update_module)
File "/home/yopiangi/Workspaces/odoo/openerp/modules/registry.py", line 370, in new
openerp.modules.load_modules(registry._db, force_demo, status, update_module)
File "/home/yopiangi/Workspaces/odoo/openerp/modules/loading.py", line 351, in load_modules
force, status, report, loaded_modules, update_module)
File "/home/yopiangi/Workspaces/odoo/openerp/modules/loading.py", line 255, in load_marked_modules
loaded, processed = load_module_graph(cr, graph, progressdict, report=report, skip_modules=loaded_modules, perform_checks=perform_checks)
File "/home/yopiangi/Workspaces/odoo/openerp/modules/loading.py", line 143, in load_module_graph
load_openerp_module(package.name)
File "/home/yopiangi/Workspaces/odoo/openerp/modules/module.py", line 315, in load_openerp_module
import('openerp.addons.' + module_name)
File "/home/yopiangi/Workspaces/odoo/openerp/modules/module.py", line 80, in load_module
mod = imp.load_module('openerp.addons.' + module_part, f, path, descr)
File "/home/yopiangi/Workspaces/project/addons-community/oca_account-analytic/analytic_secondaxis/init.py", line 32, in
from . import analytic_secondaxis
File "/home/yopiangi/Workspaces/project/addons-community/oca_account-analytic/analytic_secondaxis/analytic_secondaxis.py", line 32, in
from osv import fields
ImportError: No module named osv

Thank you.

8.0 account_analytic_required depends

Maybe this module have to contain a depend with account_accountant and analytic.

I installed them and didn't get the new features in analytic account for typing it with policies : always, never and optional.

Is it ready and tested for v8, maybe i missed a parameter...

[12.0] Analytic distribution after Account move based on timesheets

Hi all,

  • Take an account move of an invoice with analytic account (AA) and analytic tag (AT) of 400โ‚ฌ.
  • So we have 1 analytic item of 400โ‚ฌ to an specific AA and AT.
  • But this is an invoice of a service that will be done after the invoice.
  • So at the end of the month you see Employee A with 2 hours and Employee B with 2 hours so you want to distribute the analytic item of 400โ‚ฌ in 2 different ones of 200+200 in the same AA but different AT depending on the department of the employee.

Do you know something already done? Or any approach to the OCA standards?

Thanks

[10.0] purchase_procurement_analytic: No grouping

@cubells The module purchase_procurement_analytic does not group purchase orders by analytic. Tested on runbot.

I think that's because the search method is implemented on purchase order lines and not purchase order model.

Moreover it's better not to use the context but use the '_make_po_get_domain' method in procurement.

And for a conclusion, I think the grouping should be an option as sometimes you don't want to separate purchase orders simply on analytic account (but keeping the analytic transmission through procurements and moves).

I've added some comments on OCA/purchase-workflow#392 also linked to this module.

stock_analytic does not take analytic account from the orders

If my tests are correct in V10, the module is not really usable since you have to enter manually the analytic account in the stock picking. The analytic account is already set at the sale order header or at purchase order lines, when the pickings are created from those orders, the analytic account (and also the analytic tags) should be transferred to them.
It is not feasible to expect users to enter analytic accounts in all the generated stock pickings. Whatsmore, analytic accounts normally come from default analytic values.

mrp_analytic module in version 10

Dear All,
perhaps I've missed something, but I'm not able to find this module in version 10.
perhaps it has been substituted by some other else.
regards
claudio

Migration to version 12.0

Todo

https://github.com/OCA/maintainer-tools/wiki/Migration-to-version-12.0

Modules to migrate

Migration to version 11.0

Todo

https://github.com/OCA/maintainer-tools/wiki/Migration-to-version-11.0

Modules to migrate

  • account_analytic_distribution
  • account_analytic_distribution_required
  • account_analytic_line_list
  • account_analytic_no_lines
  • account_analytic_parent
  • account_analytic_required
  • account_asset_analytic
  • analytic_base_department
  • analytic_department
  • analytic_multicurrency
  • analytic_partner
  • analytic_partner_hr_timesheet
  • analytic_partner_hr_timesheet_invoice
  • analytic_secondaxis
  • analytic_secondaxis_multicurrency
  • analytic_secondaxis_project
  • analytic_secondaxis_timesheet
  • analytic_tag_dimension
  • procurement_analytic
  • product_analytic
  • purchase_procurement_analytic
  • sale_procurement_analytic

[Question] - How to apply or setup for multidimensional anaylytic

Dear All,

I assume or believe that this analytic-account repo is already capable for multi dimension analytic, but i am not be able to configure it correctly yet, please anybody help so i can understand it correctly. For more clear I use a sample case as below:

1 company have many brands of product, customers, and have many retail stores owned by the company.
the company make to order for for each customer, and make to stock for retail stores

Analytic plan:

  1. Want to now profit (cost/revenue) for each brand and on each order of the brand
    1.a want to know each manufacturing cost of each order

  2. want to now profit/lost for each retail store

I plan to set:

  1. Analytic account for each brand as parent analytic account of each order
  2. create analytic account for each order
  3. create analytic tag every production order

(only 1 branch to be sold on all retail stores)
4. create analytic account for each store
5 create one analytic tag of each store (as each dimension)

I tried in bot,
I found that the analytic tag is not filled on stock journal entries/item (only analytic account), analytic tag is there for other journal items. With this it seem filtering on tags will not bring out all journal item of a specific store and the profit and lost will not reflect correct value for the a store (stock interim delivered (in case of sales) is not have a tag.

Please help me to figure out how to set correctly with the sample case above.

best regards,
Bun

[12.0][ADD] stock_request_analytic

This module allows you to set an analytic account on requests and request orders and push it to the generated transfers and moves.

Technical Specifications

Dependencies

  • stock_analytic: #247

stock.request

  • Add a many2one field "Analytic Account" (analytic_account_id)
  • Extend _prepare_procurement_values() to pass the analytic_account_id field

stock.request.order

  • Add a many2one field "Analytic Account" (analytic_account_id)
  • Extend create(): if the analytic account is set, update all the related stock requests with the same analytic account
  • Extend write(): if the analytic account is updated, update all the related stock requests with the same analytic account

[RFC] Product Sale Analytic?

The product_analytic module allows you to set Analytic Accounts on Products, that will be automatically used on Invoice Lines. With this I can analyze invoices.

However I need a similar feature for Sale Orders.
It turns out that, while invoices have a many2one analytic_account_id, SO Lines have a many2many analytic_line_ids.

So, what should a sale_product_analytic module do?
Use the existing many2many or add a many2one, like invoice lines have?
The many2many field is not analysis friendly, since you can't group on it, and thus can't be used in Pivot views.

Thank for your advice!

6.1: crash in analytic_multicurrency tests

Error log:

2014-09-08 08:19:34,315 23333 CRITICAL openerp_test openerp.modules.module: Couldn't load module analytic_multicurrency
2014-09-08 08:19:34,315 23333 CRITICAL openerp_test openerp.modules.module: 'module' object has no attribute 'decimal_precision'
2014-09-08 08:19:34,316 23333 ERROR openerp_test openerp: Failed to initialize database `openerp_test`.
Traceback (most recent call last):
  File "/home/travis/odoo-6.1/openerp-server", line 95, in preload_registry
    db, registry = openerp.pooler.get_db_and_pool(dbname, update_module=config['init'] or config['update'], pooljobs=False)
  File "/home/travis/odoo-6.1/openerp/pooler.py", line 33, in get_db_and_pool
    registry = RegistryManager.get(db_name, force_demo, status, update_module, pooljobs)
  File "/home/travis/odoo-6.1/openerp/modules/registry.py", line 180, in get
    update_module, pooljobs)
  File "/home/travis/odoo-6.1/openerp/modules/registry.py", line 202, in new
    openerp.modules.load_modules(registry.db, force_demo, status, update_module)
  File "/home/travis/odoo-6.1/openerp/modules/loading.py", line 338, in load_modules
    processed = load_marked_modules(cr, graph, states_to_load, force, status, report, loaded_modules)
  File "/home/travis/odoo-6.1/openerp/modules/loading.py", line 253, in load_marked_modules
    loaded, processed = load_module_graph(cr, graph, progressdict, report=report, skip_modules=loaded_modules)
  File "/home/travis/odoo-6.1/openerp/modules/loading.py", line 165, in load_module_graph
    load_openerp_module(package.name)
  File "/home/travis/odoo-6.1/openerp/modules/module.py", line 409, in load_openerp_module
    __import__('openerp.addons.' + module_name)
  File "/home/travis/odoo-6.1/openerp/modules/module.py", line 139, in load_module
    mod = imp.load_module('openerp.addons.' + module_part, f, path, descr)
  File "/home/travis/build/OCA/account-analytic/analytic_multicurrency/__init__.py", line 29, in <module>
    import account_analytic_line
  File "/home/travis/build/OCA/account-analytic/analytic_multicurrency/account_analytic_line.py", line 38, in <module>
    import openerp.addons.decimal_precision as dp
AttributeError: 'module' object has no attribute 'decimal_precision'

[10.0] analytic_tag_dimension causes WARNING log lines and "red" runbot build

2017-05-05 22:13:12,729 174 INFO openerp_test odoo.modules.registry: module analytic_tag_dimension: creating or updating database tables
2017-05-05 22:13:12,867 174 INFO openerp_test odoo.sql_db: bad query: ALTER TABLE "account_analytic_tag" ALTER COLUMN "analytic_dimension_id" SET NOT NULL
2017-05-05 22:13:12,868 174 WARNING openerp_test odoo.models: WARNING: unable to set column analytic_dimension_id of table account_analytic_tag not null !
Try to re-run: openerp-server --update=module
If it doesn't work, update records and execute manually:
ALTER TABLE account_analytic_tag ALTER COLUMN analytic_dimension_id SET NOT NULL
Traceback (most recent call last):
File "/.repo_requirements/odoo/odoo/models.py", line 2531, in _auto_init
cr.execute('ALTER TABLE "%s" ALTER COLUMN "%s" SET NOT NULL' % (self._table, name))
File "/.repo_requirements/odoo/odoo/sql_db.py", line 141, in wrapper
return f(self, *args, **kwargs)
File "/.repo_requirements/odoo/odoo/sql_db.py", line 218, in execute
res = self._obj.execute(query, params)
IntegrityError: column "analytic_dimension_id" contains null values

Does Not work

The module does not work. i added the analytical account on the product page. When i created an invoice and selected the product.it did not automatically fill in the analytical account on the product invoice line, the field was still blank.
Is there something am missing? cos i even tried it on your runbot and its the same thing.

[10.0]account_analytic_parent. Debit, credit and balance computation is super slow.

When overriding the method that computes those fields here: https://github.com/OCA/account-analytic/blob/10.0/account_analytic_parent/models/account_analytic_account.py#L24 Odoo calls the same method for all the children and it gets extremely slow when the number of analytic accounts grow, specially with many children.

We can make those fields stored but then we have to make sure it is recomputed everytime its needed and it's complex.

Any ideas are welcome! ๐Ÿค—

analytic_tag_dimension error

When I try to save a Dimension this traceback appears:
Error:
Odoo Server Error

Traceback (most recent call last):
File "/opt/odoo11e/odoo/odoo/http.py", line 650, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/opt/odoo11e/odoo/odoo/http.py", line 310, in _handle_exception
raise pycompat.reraise(type(exception), exception, sys.exc_info()[2])
File "/opt/odoo11e/odoo/odoo/tools/pycompat.py", line 87, in reraise
raise value
File "/opt/odoo11e/odoo/odoo/http.py", line 692, in dispatch
result = self._call_function(**self.params)
File "/opt/odoo11e/odoo/odoo/http.py", line 342, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/opt/odoo11e/odoo/odoo/service/model.py", line 97, in wrapper
return f(dbname, *args, **kwargs)
File "/opt/odoo11e/odoo/odoo/http.py", line 335, in checked_call
result = self.endpoint(*a, **kw)
File "/opt/odoo11e/odoo/odoo/http.py", line 936, in call
return self.method(*args, **kw)
File "/opt/odoo11e/odoo/odoo/http.py", line 515, in response_wrap
response = f(*args, **kw)
File "/opt/odoo11e/odoo/addons/web/controllers/main.py", line 931, in call_kw
return self._call_kw(model, method, args, kwargs)
File "/opt/odoo11e/odoo/addons/web/controllers/main.py", line 923, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "/opt/odoo11e/odoo/odoo/api.py", line 687, in call_kw
return call_kw_model(method, model, args, kwargs)
File "/opt/odoo11e/odoo/odoo/api.py", line 672, in call_kw_model
result = method(recs, *args, **kwargs)
File "/opt/odoo11e/OCA/account-analytic/analytic_tag_dimension/models/analytic.py", line 37, in create
'relation': 'account.analytic.tag',
File "/opt/odoo11e/odoo/enterprise/web_studio/models/studio_mixin.py", line 27, in write
res = super(StudioMixin, self).write(vals)
File "/opt/odoo11e/odoo/addons/mail/models/ir_model.py", line 38, in write
res = super(IrModel, self).write(vals)
File "/opt/odoo11e/odoo/odoo/addons/base/ir/ir_model.py", line 208, in write
return super(IrModel, self).write(vals)
File "/opt/odoo11e/odoo/odoo/models.py", line 3090, in write
self._write(old_vals)
File "/opt/odoo11e/odoo/odoo/models.py", line 3228, in _write
field.write(self.with_context(rel_context), vals[name])
File "/opt/odoo11e/odoo/odoo/fields.py", line 2259, in write
comodel.create(act[2])
File "/opt/odoo11e/odoo/enterprise/web_studio/models/studio_mixin.py", line 18, in create
res = super(StudioMixin, self).create(vals)
File "/opt/odoo11e/odoo/odoo/addons/base/ir/ir_model.py", line 638, in create
self.pool.init_models(self._cr, models, dict(self._context, update_custom_fields=True))
File "/opt/odoo11e/odoo/odoo/modules/registry.py", line 311, in init_models
func()
File "/opt/odoo11e/odoo/odoo/fields.py", line 1956, in update_db_foreign_key
new = process(model._cr, model._table, self.name, comodel._table, 'id', self.ondelete or 'set null')
File "/opt/odoo11e/odoo/odoo/tools/sql.py", line 169, in fix_foreign_key
cr.execute(query, (tablename1, columnname1))
File "/opt/odoo11e/odoo/odoo/sql_db.py", line 154, in wrapper
raise psycopg2.OperationalError(msg)
psycopg2.OperationalError: Unable to use a closed cursor.

Migration to version 10.0

Todo

https://github.com/OCA/maintainer-tools/wiki/Migration-to-version-10.0

Modules to migrate

[RFC] Compare diferent period of the same Analytic Account in amount and %

Hello all @OCA/accounting-maintainers :

The scope of this development is:

  • Analitic account: for ex. Department A/B/C, etc.. or Service A/B/C, etc..
  • You can get a dinamic report to compare for ex.
Analytic Account January 2016 January 2017 Diff Jan 2017 Variation % Jan 2017
Service A 1000 1200 200 20%
Service B 1000 1200 200 20%
Service C 1000 1200 200 20%

Any clue or knowledge that you can share with me?

Thanks!

[10.0][BUG] Analytic Parent Account calculates wrong debit credit and balance

Hello,

We discovered a bug in account_analytic_parent that seems to be fixed in V11 but not in V10.

Steps to reproduce:

  1. Create an Analytic Account "Parent" with no parent account
  2. Create an Analytic Account "Child" with the account "Parent" as the parent account
  3. Create a Customer Invoice (500$) with one invoice line and set the analytic account "Child" on that line.
  4. Create a Vendor Bill (300$) with one invoice line and set the analytic account "Child" on that line.

Now go back to the analytic account overview.

In V11 the parent account calculates everything correctly:

2019-03-27-V11

In V10 as you can see in the screenshot, there is a minus sign infront of the sum of credit on the parent account:

2019-03-27-V10

Will this get fixed for V10 oder do we need to switch to V11?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.