Saturday, February 3, 2024
2 changes · 17.0
Resolved issues and error corrections
This update fixes a test failure that occurs when the French accounting module is installed alongside purchase stock functionality. The issue happened because certain accounting configurations weren't properly set up during testing. The fix skips the affected test when the company doesn't have a complete chart of accounts configured, preventing the error from occurring.
Original PR description
**Steps to reproduce the bug:** Run the following command: `-i purchase_stock,l10n_fr -d cro_test --test-enable --test-tags purchase_stock --stop-after-init` **Problem:** An error is triggered:…
**Steps to reproduce the bug:** Run the following command: `-i purchase_stock,l10n_fr -d cro_test --test-enable --test-tags purchase_stock --stop-after-init` **Problem:** An error is triggered: “odoo.exceptions.UserError: Cannot find a stock input account for the product Analytic Product. You must define one on the product category, or on the location, before processing this operation.” When installing the "l10n_fr" module, the French accounting for the default company will be set. so the "property_stock_account_input_categ_id" will not be set when creating a product category with "property_valuation" set as real_time because the user's company has no chart of accounts: https://github.com/odoo/odoo/blob/c3b4c7d8f2c260c31f9549d480ed2db4159a8119/addons/stock_account/models/product.py#L833-L835 Therefore, when validating the picking related to the purchase order created: https://github.com/odoo/odoo/blob/31d1a2a8a0f1490dd49d86628c0f856ca82198c8/addons/purchase_stock/tests/test_purchase_order_process.py#L124 The product accounts are then retrieved, but will be False: https://github.com/odoo/odoo/blob/9215e73fa229d64167de076ef0a288dd8d89a2cc/addons/stock_account/models/stock_move.py#L336 https://github.com/odoo/odoo/blob/493502bc4ad3ac35b1c0cb2eeb73ac6b6d0fe5b5/addons/stock_account/models/product.py#L29 **Solution:** skip the test if the user's company has no chart of accounts. opw-3698341 Forward-Port-Of: odoo/odoo#151852 Forward-Port-Of: odoo/odoo#151712
This update prevents dynamic slot parameters from being included in translation files (.pot files). Since slot parameters contain dynamic content that isn't translated (similar to other dynamic properties), removing them from translation exports reduces unnecessary clutter and improves the efficiency of the translation process.
Original PR description
Slot params are dynamic content, similar to props, and are not translated. There is no point in adding untranslated content to the .pot files; so this commit prevents the content of slot params from being exported for translation. Task-3718993 Forward-Port-Of: odoo/odoo#152499