Skip to content

Conversation

@amas-odoo
Copy link
Contributor

@amas-odoo amas-odoo commented Jan 13, 2026

[IMP] excise_management: Handle warehouse license & reporting by excise license

  • Add Excise License on warehouse and expose license in Inventory configuration.
  • Add Excise License field on excise reports, displayed above the period.
  • Generate excise reports per license (single report without license if
    none exist).
  • Remove Excise pivot report, as aggregation is not meaningful in this context.
  • Remove deprecated fields from stock.move: x_fiscal_deposit_move
  • Centralize excise report line computation logic:
    • Determine entry / entry fd / exit / exit fd / transfer / none
    • Handle fiscal deposit context in one place.
  • Improve report usability:
    • Add Moves button on excise report lines, opening the related stock moves
      with the line.
    • Style move type (entry/exit/transfer, FD or not) on report lines.
    • When opening moves from the report, apply contextual color styling to
      indicate whether quantities and amounts enter, leave, or circulate between
      license warehouses based on the active excise license context.

Tests have been updated accordingly: the former test coverage around the removed
x_fiscal_deposit_move field has been adapted to validate the new logic
implemented in the server action handling excise move categorization.

Task ID: 5383768

@robodoo
Copy link
Collaborator

robodoo commented Jan 13, 2026

Pull request status dashboard

@amas-odoo amas-odoo force-pushed the 19.0-excise-management-handle-warehouse-license-amas branch 7 times, most recently from f7b588f to 9b1c6dc Compare January 22, 2026 11:54
@amas-odoo amas-odoo marked this pull request as ready for review January 22, 2026 11:55
@amas-odoo amas-odoo force-pushed the 19.0-excise-management-handle-warehouse-license-amas branch 3 times, most recently from 661e825 to ba5b203 Compare January 22, 2026 13:14
@amas-odoo amas-odoo force-pushed the 19.0-excise-management-handle-warehouse-license-amas branch from ba5b203 to 6cd30dd Compare January 28, 2026 04:37
Copy link
Contributor

@pgu-odoo pgu-odoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vava-odoo PR is ready for your review.
@amas-odoo Just a few comments. Thanks for the good work.

if from_date < datetime.date.today():
res_id = env['x_excise_report'].create({'x_from_date': from_date, 'x_to_date': datetime.date.today(), 'x_reporter_id': env.company.x_reporter_id.id or env.ref('base.user_admin').id})
env['mail.activity'].create({'activity_type_id': env.ref('mail.mail_activity_data_todo').id, 'summary': f"Excise Report {res_id.x_name}",'res_model_id': env.ref('excise_management.excise_report').id, 'res_id': res_id.id, 'user_id': res_id.x_reporter_id.id, 'date_deadline': datetime.date.today() + datetime.timedelta(weeks=1)})
excise_licenses, last_excise_report = env['x_excise_license'].search([]).ids or [False], env['x_excise_report'].search([])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
excise_licenses, last_excise_report = env['x_excise_license'].search([]).ids or [False], env['x_excise_report'].search([])
excise_licenses, last_excise_report = env['x_excise_license'].search([]).ids or [False], env['x_excise_report'].search([('x_excise_license_id', in, excise_licenses)])
you can add domain to reduce load.

@@ -1,18 +1,19 @@
<?xml version='1.0' encoding='UTF-8'?>
<odoo>
<menuitem id="menu_excise_in_config_stock" name="Excise" parent="stock.menu_stock_config_settings" sequence="5"/>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<menuitem id="menu_excise_in_config_stock" name="Excise" parent="stock.menu_stock_config_settings" sequence="5"/>
<menuitem id="menu_excise_in_config_stock" name="Excise" parent="stock.menu_stock_config_settings"/>

@amas-odoo amas-odoo force-pushed the 19.0-excise-management-handle-warehouse-license-amas branch from 6cd30dd to 0f4cb68 Compare January 28, 2026 05:59
…se license

- Add Excise License on warehouse and expose license in Inventory configuration.
- Add Excise License field on excise reports, displayed above the period.
- Generate excise reports per license (single report without license if
none exist).
- Remove Excise pivot report, as aggregation is not meaningful in this context.
- Remove deprecated fields from stock.move: x_fiscal_deposit_move
- Centralize excise report line computation logic:
   - Determine entry / entry fd / exit / exit fd / transfer / none
   - Handle fiscal deposit context in one place.
- Improve report usability:
   - Add Moves button on excise report lines, opening the related stock moves
      with the line.
   - Style move type (entry/exit/transfer, FD or not) on report lines.
   - When opening moves from the report, apply contextual color styling to
      indicate whether quantities and amounts enter, leave, or circulate between
      license warehouses based on the active excise license context.

Tests have been updated accordingly: the former test coverage around the removed
x_fiscal_deposit_move field has been adapted to validate the new logic
implemented in the server action handling excise move categorization.
@amas-odoo amas-odoo force-pushed the 19.0-excise-management-handle-warehouse-license-amas branch from 0f4cb68 to f472a8f Compare January 30, 2026 04:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants