<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.dolibarr.org/index.php?action=history&amp;feed=atom&amp;title=Module_Auto_PMP</id>
	<title>Module Auto PMP - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.dolibarr.org/index.php?action=history&amp;feed=atom&amp;title=Module_Auto_PMP"/>
	<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Module_Auto_PMP&amp;action=history"/>
	<updated>2026-11-14T19:33:32Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.17</generator>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Module_Auto_PMP&amp;diff=69024&amp;oldid=prev</id>
		<title>Weglob: Auto PMP 2.1.0 documentation</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Module_Auto_PMP&amp;diff=69024&amp;oldid=prev"/>
		<updated>2026-11-12T16:52:21Z</updated>

		<summary type="html">&lt;p&gt;Auto PMP 2.1.0 documentation&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;!-- Page title (EN): Module Auto PMP --&amp;gt;&lt;br /&gt;
&amp;lt;!-- BEGIN origin interlang links --&amp;gt;&lt;br /&gt;
&amp;lt;!-- You can edit this section but do NOT remove these comments&lt;br /&gt;
     Links below will be automatically replicated on translated pages by PolyglotBot --&amp;gt;&lt;br /&gt;
[[fr:Module_Auto_PMP_(FR)]]&lt;br /&gt;
&amp;lt;!-- END interlang links --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{TemplateDocUser}}&lt;br /&gt;
{{TemplateModuleInfo&lt;br /&gt;
|modulename=AutoPMP&lt;br /&gt;
|editor=Weglob&lt;br /&gt;
|web=https://weglob.com&lt;br /&gt;
|webbuy=https://www.dolistore.com/product.php?id=2569&lt;br /&gt;
|status=stable&lt;br /&gt;
|prerequisites=Products module enabled (Margins module recommended to see the margins)&lt;br /&gt;
|minversion=19.0&lt;br /&gt;
|note=Module ID 500000&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
= Module Auto PMP (AutoPMP) =&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Name !! Value&lt;br /&gt;
|-&lt;br /&gt;
| Publisher || Weglob&lt;br /&gt;
|-&lt;br /&gt;
| Status || Stable&lt;br /&gt;
|-&lt;br /&gt;
| Version || 2.1.0&lt;br /&gt;
|-&lt;br /&gt;
| Module ID || 500000&lt;br /&gt;
|-&lt;br /&gt;
| Dolibarr compatibility || 19.0 to 24.0&lt;br /&gt;
|-&lt;br /&gt;
| License || GPL v3 or later&lt;br /&gt;
|-&lt;br /&gt;
| Languages || English, French&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Auto PMP&amp;#039;&amp;#039;&amp;#039; adds an &amp;#039;&amp;#039;&amp;#039;&amp;quot;Update cost prices&amp;quot;&amp;#039;&amp;#039;&amp;#039; button on draft &amp;#039;&amp;#039;&amp;#039;proposals&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;sales orders&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;customer invoices&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
One click copies the &amp;#039;&amp;#039;&amp;#039;weighted average price (PMP)&amp;#039;&amp;#039;&amp;#039; of each product into the cost price of its line, then Dolibarr recalculates the margins. No more typing cost prices line by line, and your margins match the real stock value.&lt;br /&gt;
&lt;br /&gt;
The PMP itself is computed by Dolibarr when supplier goods enter the stock. Auto PMP only reuses it.&lt;br /&gt;
&lt;br /&gt;
== Features ==&lt;br /&gt;
* Button next to &amp;#039;&amp;#039;Validate&amp;#039;&amp;#039;, &amp;#039;&amp;#039;Clone&amp;#039;&amp;#039; and &amp;#039;&amp;#039;Delete&amp;#039;&amp;#039; on draft documents.&lt;br /&gt;
* Native Dolibarr confirmation popup.&lt;br /&gt;
* Two update modes:&lt;br /&gt;
** &amp;#039;&amp;#039;&amp;#039;All lines&amp;#039;&amp;#039;&amp;#039;: every product line gets the current PMP, even if it already has a cost price.&lt;br /&gt;
** &amp;#039;&amp;#039;&amp;#039;Only lines with cost price = 0&amp;#039;&amp;#039;&amp;#039;: lines you priced manually are kept.&lt;br /&gt;
* Free text lines and products without a PMP are skipped.&lt;br /&gt;
* Totals and margins are recalculated right after the update.&lt;br /&gt;
* The button is shown only to users allowed to edit the document.&lt;br /&gt;
* Safe: the update runs once, then the page reloads (a refresh does not run it again).&lt;br /&gt;
&lt;br /&gt;
== Screenshots ==&lt;br /&gt;
&amp;lt;gallery widths=400 heights=250&amp;gt;&lt;br /&gt;
File:AutoPMP_before.png|Draft proposal: cost price at 0, margin unknown&lt;br /&gt;
File:AutoPMP_confirm.png|Confirmation popup&lt;br /&gt;
File:AutoPMP_after.png|After the update: cost price = PMP, margin recalculated&lt;br /&gt;
File:AutoPMP_setup.png|Setup page&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
# Buy and download the module zip from DoliStore.&lt;br /&gt;
# Go to &amp;#039;&amp;#039;Home &amp;gt; Setup &amp;gt; Modules/Applications &amp;gt; Deploy/install external module&amp;#039;&amp;#039; and upload the zip.&lt;br /&gt;
# Or unzip it manually into &amp;#039;&amp;#039;htdocs/custom/&amp;#039;&amp;#039; so you get &amp;#039;&amp;#039;htdocs/custom/autopmp&amp;#039;&amp;#039;.&lt;br /&gt;
# Enable the &amp;#039;&amp;#039;&amp;#039;Auto PMP&amp;#039;&amp;#039;&amp;#039; module.&lt;br /&gt;
&lt;br /&gt;
== Configuration ==&lt;br /&gt;
# Open &amp;#039;&amp;#039;Setup &amp;gt; Modules/Applications &amp;gt; Auto PMP &amp;gt; Setup&amp;#039;&amp;#039;.&lt;br /&gt;
# Tick &amp;#039;&amp;#039;&amp;#039;Enable the module&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
# Choose the &amp;#039;&amp;#039;&amp;#039;update mode&amp;#039;&amp;#039;&amp;#039;: all lines, or only lines with a cost price of 0.&lt;br /&gt;
# Save.&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
# Open a &amp;#039;&amp;#039;&amp;#039;draft&amp;#039;&amp;#039;&amp;#039; proposal, order or invoice.&lt;br /&gt;
# Click &amp;#039;&amp;#039;&amp;#039;Update cost prices&amp;#039;&amp;#039;&amp;#039; at the bottom of the page.&lt;br /&gt;
# Confirm: a message tells how many lines were updated, and the margins are refreshed.&lt;br /&gt;
&lt;br /&gt;
== FAQ ==&lt;br /&gt;
;The button does not appear&lt;br /&gt;
:The document must be a draft, the module must be enabled in its setup page, and you need the right to create/modify this type of document.&lt;br /&gt;
&lt;br /&gt;
;A line was not updated&lt;br /&gt;
:Free text lines and products whose PMP is 0 are skipped. In &amp;quot;only lines with cost price = 0&amp;quot; mode, lines that already have a cost price are kept.&lt;br /&gt;
&lt;br /&gt;
;Where does the PMP come from?&lt;br /&gt;
:Dolibarr computes it on supplier stock entries. To include transport or customs fees in the PMP, see [[Module_Charges_PMP|Module Charges PMP]].&lt;br /&gt;
&lt;br /&gt;
== Support ==&lt;br /&gt;
* Email: contact@weglob.com&lt;br /&gt;
* Website: [https://weglob.com weglob.com]&lt;br /&gt;
* LinkedIn: [https://www.linkedin.com/in/mohamed-aggoubi/ Mohamed Aggoubi]&lt;br /&gt;
&lt;br /&gt;
[[Category:Complementary modules]]&lt;br /&gt;
[[Category:DocUserEN]]&lt;/div&gt;</summary>
		<author><name>Weglob</name></author>
	</entry>
</feed>