[ADD] product_origin_char: Free text origin field per supplier
New addon to replace structured country/state fields with flexible free-text origin descriptions. Features: - Translatable origin_text field in product.supplierinfo - Computed origin field in products based on main_seller_id - Support for creative supplier origin descriptions - Full OCA documentation structure - ES/EU translations included - 8 unit tests (all passing) Replaces product_origin for use cases where suppliers use non-standardized origin descriptions (e.g., 'Valencia, Spain', 'Huerta de...', etc.) Depends on: product, product_main_seller Author: Criptomart Funding: Elika Bilbo
This commit is contained in:
parent
1a8f92a01e
commit
c8b83cc333
24 changed files with 1071 additions and 0 deletions
1
product_origin_char/static/description/LOGO_NEEDED.txt
Normal file
1
product_origin_char/static/description/LOGO_NEEDED.txt
Normal file
|
|
@ -0,0 +1 @@
|
|||
Logo placeholder - run install_logo.sh to add CriptoMart logo
|
||||
123
product_origin_char/static/description/index.html
Normal file
123
product_origin_char/static/description/index.html
Normal file
|
|
@ -0,0 +1,123 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>Product Origin Text</title>
|
||||
<style>
|
||||
body {
|
||||
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
|
||||
line-height: 1.6;
|
||||
color: #333;
|
||||
max-width: 900px;
|
||||
margin: 0 auto;
|
||||
padding: 20px;
|
||||
}
|
||||
h1 {
|
||||
color: #875a7b;
|
||||
border-bottom: 2px solid #875a7b;
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
h2 {
|
||||
color: #875a7b;
|
||||
margin-top: 30px;
|
||||
}
|
||||
.badge {
|
||||
display: inline-block;
|
||||
padding: 3px 7px;
|
||||
border-radius: 3px;
|
||||
font-size: 0.9em;
|
||||
margin-right: 5px;
|
||||
}
|
||||
.badge-beta {
|
||||
background-color: #f0ad4e;
|
||||
color: white;
|
||||
}
|
||||
.badge-license {
|
||||
background-color: #5bc0de;
|
||||
color: white;
|
||||
}
|
||||
ul {
|
||||
padding-left: 20px;
|
||||
}
|
||||
li {
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
code {
|
||||
background-color: #f4f4f4;
|
||||
padding: 2px 5px;
|
||||
border-radius: 3px;
|
||||
font-family: 'Courier New', Courier, monospace;
|
||||
}
|
||||
.feature-box {
|
||||
background-color: #f9f9f9;
|
||||
border-left: 4px solid #875a7b;
|
||||
padding: 15px;
|
||||
margin: 20px 0;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Product Origin Text</h1>
|
||||
|
||||
<p>
|
||||
<span class="badge badge-beta">Beta</span>
|
||||
<span class="badge badge-license">License: AGPL-3</span>
|
||||
</p>
|
||||
|
||||
<h2>Overview</h2>
|
||||
<p>
|
||||
This module replaces the structured country/state origin fields from
|
||||
<code>product_origin</code> with a flexible free-text field that can be
|
||||
defined per supplier.
|
||||
</p>
|
||||
|
||||
<div class="feature-box">
|
||||
<h3>Problem:</h3>
|
||||
<p>
|
||||
Suppliers often use creative and varied formats to describe product origin:
|
||||
</p>
|
||||
<ul>
|
||||
<li>"Valencia, Spain"</li>
|
||||
<li>"Huerta de Ana, Aragón"</li>
|
||||
<li>"Organic Farm - Northern Italy"</li>
|
||||
<li>"Local producer - Basque Country"</li>
|
||||
<li>"Fair Trade - Colombia"</li>
|
||||
</ul>
|
||||
<p>
|
||||
These free-form descriptions don't fit into structured country/state fields.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<h2>Features</h2>
|
||||
<ul>
|
||||
<li>Free-text <strong>Origin</strong> field in supplier info (Purchase tab of product)</li>
|
||||
<li>Computed <strong>Origin</strong> field in product form (shows main vendor's origin)</li>
|
||||
<li>Field is visible in product list view (optional column)</li>
|
||||
<li>Full translation support for multiple languages</li>
|
||||
<li>Compatible with existing supplier management workflows</li>
|
||||
</ul>
|
||||
|
||||
<h2>Usage</h2>
|
||||
<ol>
|
||||
<li>Go to a product form</li>
|
||||
<li>Open the <strong>Purchase</strong> tab</li>
|
||||
<li>In the <strong>Vendors</strong> section, select a supplier line</li>
|
||||
<li>Fill in the <strong>Origin</strong> field with free-form text</li>
|
||||
<li>The origin text from the main vendor will automatically appear on the product</li>
|
||||
</ol>
|
||||
|
||||
<h2>Dependencies</h2>
|
||||
<ul>
|
||||
<li><code>product</code> - Base product management</li>
|
||||
<li><code>product_main_seller</code> - To determine the main vendor for products</li>
|
||||
</ul>
|
||||
|
||||
<h2>Credits</h2>
|
||||
<p><strong>Development:</strong> <a href="https://criptomart.net" target="_blank">Criptomart</a></p>
|
||||
<p><strong>Funding:</strong> <a href="https://elikabilbo.eus" target="_blank">Elika Bilbo</a></p>
|
||||
<p style="font-size: 0.9em; color: #666;">
|
||||
This module was developed by Criptomart with funding from Elika Bilbo.
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
||||
Loading…
Add table
Add a link
Reference in a new issue