TIP: You can type at any time to perform a new search.
Purchase landed costs - Alternative option
purchase_landed_cost · OCA/purchase-workflow
- Repository
- OCA/purchase-workflow · module folder · Try on Runboat
- Module version
- 1.0.0
- Category
- Purchase Management
- Folder size
- 1.02 MB
- License
- AGPL-3
- Application
- No
- Auto-installable
- No
- Website
- https://github.com/OCA/purchase-workflow
- Last tracking update
- 2026-08-13 11:29:18
- Authors
- Odoo Community Association (OCA), AvanzOSC, Joaquín Gutierrez, Tecnativa
- Maintainers
- Odoo Community Association (OCA), AvanzOSC, Joaquín Gutierrez, Tecnativa
- Committers
- David Vidal, Weblate, OCA-git-bot, oca-ci, Andrii9090-tecnativa
- Odoo dependencies
- Python dependencies
- None
- System dependencies
- None
- Required by
- None
- Description
## This module manages your purchase expenses The functionality of this module is to provide a way to manage your purchase costs more easily than the official module (*stock_landed_cost*) and allow to distribute them with a lot of methods. **Main features:** - Possibility to assign landed cost afterwards in a separate screen. - Management of expense types with preconfigured calculation methods. - Distribution of costs based on weight, volume, product price, etc. - Types marked as default are automatically added to each new purchase distribution. - Management orders shopping expenses associated with one or more entry slips.
Code Analysis ⓘ
Views touched (17)
| XML ID | Name | Model | Type | Status |
|---|---|---|---|---|
import_invoice_line_wizard_view |
import.invoice.line.wizard.form | import.invoice.line.wizard | form | New |
import_landed_cost_pickings_wizard_view |
import.landed.cost.pickings.wizard | form | New | |
picking_import_wizard_view |
picking.import.wizard.form | picking.import.wizard | form | New |
purchase_cost_distribution_form |
purchase.cost.distribution.form | purchase.cost.distribution | form | New |
purchase_cost_distribution_search |
purchase.cost.distribution.search | purchase.cost.distribution | search | New |
purchase_expense_type_tree |
purchase.expense.type | list | New | |
purchase_order_form |
purchase.order | form | Inherits purchase.purchase_order_form | |
view_move_form |
account.move | form | Inherits account.view_move_form | |
view_picking_form |
stock.picking | form | Inherits stock.view_picking_form | |
view_purchase_cost_distribution_calendar |
purchase.cost.distribution.calendar | purchase.cost.distribution | calendar | New |
view_purchase_cost_distribution_expense_invoice_form |
purchase.cost.distribution.expense | list | New | |
view_purchase_cost_distribution_graph |
purchase.cost.distribution.graph | purchase.cost.distribution | graph | New |
view_purchase_cost_distribution_line_expense_search |
purchase.cost.distribution.line.expense.search | purchase.cost.distribution.line.expense | search | New |
view_purchase_cost_distribution_line_expense_tree |
purchase.cost.distribution.line.expense | list | New | |
view_purchase_cost_distribution_line_form |
purchase.cost.distribution.line.form | purchase.cost.distribution.line | form | New |
view_purchase_cost_distribution_line_tree |
purchase.cost.distribution.line | list | New | |
view_purchase_cost_distribution_tree |
purchase.cost.distribution.tree | purchase.cost.distribution | list | New |
HTTP endpoints (0)
No HTTP endpoints found for this module.
Models touched (12)
New fields (1)
-
expense_line_idsOne2many → purchase.cost.distribution.expensecomodel_name='purchase.cost.distribution.expense'inverse_name='invoice_id'string='Landed costs'
No public methods.
New fields (1)
-
expense_line_idsOne2many → purchase.cost.distribution.expensecomodel_name='purchase.cost.distribution.expense'inverse_name='invoice_line'string='Landed costs'
No public methods.
New fields (4)
-
expense_typeMany2one → purchase.expense.typecomodel_name='purchase.expense.type'required=Truestring='Expense type' -
invoiceMany2one → account.movecomodel_name='account.move'domain="[('partner_id', '=', supplier), ('move_type', '=', 'in_invoice'),('state', '=', 'posted')]"required=True -
invoice_lineMany2one → account.move.linecomodel_name='account.move.line'domain="[('move_id', '=', invoice)]"required=Truestring='Invoice line' -
supplierMany2one → res.partnercomodel_name='res.partner'required=True
-
action_import_invoice_line(self)
New fields (2)
-
picking_idsMany2many → stock.pickingcomodel_name='stock.picking'domain="[('id', 'in', possible_picking_ids)]"relation='import_landed_cost_pickings_wizard_stock_picking_rel'string='Pickings' -
possible_picking_idsMany2many → stock.pickingcomodel_name='stock.picking'relation='import_landed_cost_pickings_possible_picking_rel'string='Possible pickings'
-
button_import(self) -
default_get(self, fields_list)@api.model
New fields (3)
-
pickingsMany2many → stock.pickingcolumn1='wizard_id'column2='picking_id'comodel_name='stock.picking'relation='distribution_import_picking_rel'required=Truestring='Incoming shipments' -
prev_pickingsMany2many → stock.pickingcomodel_name='stock.picking' -
supplierMany2one → res.partnercomodel_name='res.partner'required=True
-
action_import_picking(self) -
default_get(self, field_list)@api.modelGet pickings previously imported.
New fields (15)
-
amount_totalFloatcompute='_compute_amount_total'digits='Account'string='Total' -
company_idMany2one → res.companycomodel_name='res.company'default=<expr>required=True -
cost_linesOne2many → purchase.cost.distribution.linecomodel_name='purchase.cost.distribution.line'inverse_name='distribution'string='Distribution lines' -
currency_idMany2one → res.currencycomodel_name='res.currency'related='company_id.currency_id'string='Currency' -
dateDatedefault=fields.Date.context_todayindex=Truereadonly=Truerequired=True -
expense_linesOne2many → purchase.cost.distribution.expensecomodel_name='purchase.cost.distribution.expense'default=<expr>inverse_name='distribution'string='Expenses' -
nameChardefault='/'index=Truerequired=Truestring='Distribution number' -
noteTextstring='Documentation for this order' -
stateSelectiondefault='draft'readonly=Truestring='Status' args: [('draft', 'Draft'), ('calculated', 'Calculated'), ('done', 'Done')] -
total_expenseFloatcompute='_compute_total_expense'digits='Account'string='Total expenses' -
total_price_unitFloatcompute='_compute_total_price_unit'digits='Product Price'string='Total price unit' -
total_purchaseFloatcompute='_compute_total_purchase'digits='Account'string='Total purchase' -
total_uom_qtyFloatcompute='_compute_total_uom_qty'digits='Product UoS'readonly=Truestring='Total quantity' -
total_volumeFloatcompute='_compute_total_volume'readonly=Truestring='Total volume' -
total_weightFloatcompute='_compute_total_weight'digits='Stock Weight'readonly=Truestring='Total gross weight'
-
action_calculate(self) -
action_done(self) -
action_draft(self) -
create(self, vals_list)@api.model_create_multi -
write(self, vals)
New fields (11)
-
affected_linesMany2many → purchase.cost.distribution.linecolumn1='expense_id'column2='line_id'comodel_name='purchase.cost.distribution.line'domain="[('id', 'in', imported_lines)]"help='Put here specific lines that this expense is going to be distributed across. Leave it blank to use all imported lines.'relation='distribution_expense_aff_rel'string='Affected lines' -
calculation_methodSelectionreadonly=Truerelated='type.calculation_method'string='Calculation method' -
company_idMany2one → res.companycomodel_name='res.company'related='distribution.company_id'store=True -
display_nameCharcompute='_compute_display_name'store=True -
distributionMany2one → purchase.cost.distributioncomodel_name='purchase.cost.distribution'index=Trueondelete='cascade'required=Truestring='Cost distribution' -
expense_amountFloatdigits='Account'required=Truestring='Expense amount' -
imported_linesMany2many → purchase.cost.distribution.linecomodel_name='purchase.cost.distribution.line'compute='_compute_imported_lines'string='Imported lines' -
invoice_idMany2one → account.movecomodel_name='account.move' -
invoice_lineMany2one → account.move.linecomodel_name='account.move.line'domain="[('move_id.move_type', '=', 'in_invoice'),('move_id.state', '=', 'posted')]"string='Supplier invoice line' -
refCharstring='Reference' -
typeMany2one → purchase.expense.typecomodel_name='purchase.expense.type'index=Trueondelete='restrict'string='Expense type'
-
button_duplicate(self) -
onchange_invoice_line(self)@api.onchange('invoice_line')set expense_amount in the currency of the distribution -
onchange_type(self)@api.onchange('type')set expense_amount in the currency of the distribution
New fields (22)
-
company_idMany2one → res.companycomodel_name='res.company'related='distribution.company_id'store=True -
cost_ratioFloatcompute='_compute_cost_ratio'string='Unit cost' -
distributionMany2one → purchase.cost.distributioncomodel_name='purchase.cost.distribution'ondelete='cascade'required=Truestring='Cost distribution' -
expense_amountFloatcompute='_compute_expense_amount'digits='Account'string='Cost amount' -
expense_linesOne2many → purchase.cost.distribution.line.expensecomodel_name='purchase.cost.distribution.line.expense'inverse_name='distribution_line'string='Expenses distribution lines' -
move_idMany2one → stock.movecomodel_name='stock.move'ondelete='restrict'required=Truestring='Picking line' -
nameCharcompute='_compute_name'store=True -
partnerMany2one → res.partnercomodel_name='res.partner'readonly=Truerelated='move_id.purchase_line_id.order_id.partner_id'string='Supplier' -
picking_idMany2one → stock.pickingrelated='move_id.picking_id'store=Truestring='Picking' args: 'stock.picking' -
product_idMany2one → product.productcomodel_name='product.product'compute='_compute_product_id'store=True -
product_price_unitFloatrelated='move_id.price_unit'string='Unit price' -
product_qtyFloatcompute='_compute_product_qty'store=Truestring='Quantity' -
product_uomMany2one → uom.uomcomodel_name='uom.uom'related='move_id.product_uom'string='Unit of measure' -
product_volumeFloathelp='The volume in m3.'related='product_id.product_tmpl_id.volume'string='Volume' -
product_weightFloathelp='The gross weight in Kg.'related='product_id.product_tmpl_id.weight'string='Gross weight' -
purchase_idMany2one → purchase.ordercomodel_name='purchase.order'readonly=Truerelated='move_id.purchase_line_id.order_id'store=Truestring='Purchase order' -
purchase_line_idMany2one → purchase.order.linecomodel_name='purchase.order.line'related='move_id.purchase_line_id'string='Purchase order line' -
standard_price_newFloatcompute='_compute_standard_price_new'digits='Product Price'string='New cost' -
standard_price_oldFloatcompute='_compute_standard_price_old'digits='Product Price'store=Truestring='Previous cost' -
total_amountFloatcompute='_compute_total_amount'digits='Account'string='Amount line' -
total_volumeFloatcompute='_compute_total_volume'help='The line volume in m3.'store=Truestring='Line volume' -
total_weightFloatcompute='_compute_total_weight'digits='Stock Weight'help='The line gross weight in Kg.'store=Truestring='Line weight'
-
get_action_purchase_cost_distribution(self)@api.model
New fields (8)
-
company_idMany2one → res.companycomodel_name='res.company'readonly=Truerelated='distribution_line.company_id'store=True -
cost_ratioFloatargs: 'Unit cost' -
distribution_expenseMany2one → purchase.cost.distribution.expensecomodel_name='purchase.cost.distribution.expense'ondelete='cascade'string='Distribution expense' -
distribution_lineMany2one → purchase.cost.distribution.linecomodel_name='purchase.cost.distribution.line'ondelete='cascade'string='Cost distribution line' -
expense_amountFloatdigits='Account'string='Expense amount' -
picking_date_doneDatetimereadonly=Truerelated='picking_id.date_done'store=True -
picking_idMany2one → stock.pickingcomodel_name='stock.picking'readonly=Truerelated='distribution_line.picking_id'store=True -
typeMany2one → purchase.expense.typereadonly=Truerelated='distribution_expense.type'store=Truestring='Expense type' args: 'purchase.expense.type'
No public methods.
New fields (6)
-
calculation_methodSelectiondefault='amount'string='Calculation method' args: [('amount', 'By amount of the line'), ('price', 'By product price'), ('qty', 'By product quantity'), ('weight', 'By product weight'), ('volume', 'By product volume'), ('equal', 'Equally to all lines')] -
company_idMany2one → res.companycomodel_name='res.company'default=<expr> -
default_amountFloathelp='If set, this amount is put in the expense line when you select this expense type'string='Default amount' -
default_expenseBooleanhelp='Specify if the expense will be automatically added in a purchase cost distribution.' -
nameCharindex='trigram'required=Truetranslate=True -
noteTextstring='Cost documentation'
No public methods.
New fields (0)
No new fields.
Public methods (1)-
action_open_landed_cost(self)
New fields (0)
No new fields.
Public methods (1)-
action_open_landed_cost(self)
Loading…
Loading…
Loading…
Loading…
Loading…