mirror of
https://github.com/guohuadeng/app-odoo.git
synced 2025-02-23 04:11:36 +02:00
fix and add how to use
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -3,3 +3,5 @@
|
||||
.idea
|
||||
.iml
|
||||
/app_odoo_customize/_resource
|
||||
/app_web_studio
|
||||
/web_studio
|
||||
|
||||
@@ -40,6 +40,11 @@
|
||||
</record>
|
||||
|
||||
<!-- internal_type 数据-->
|
||||
<record id="internal_type_sourced" model="product.internal.type">
|
||||
<field name="name">Sourced Product</field>
|
||||
<field name="description">Set prefix as "S" in link sequence</field>
|
||||
<field name="link_sequence" ref="seq_sourced"/>
|
||||
</record>
|
||||
<record id="internal_type_manufacture" model="product.internal.type">
|
||||
<field name="name">Manufactured Product</field>
|
||||
<field name="description">Set prefix as "D" in link sequence</field>
|
||||
@@ -50,10 +55,15 @@
|
||||
<field name="description">Set prefix as "C" in link sequence</field>
|
||||
<field name="link_sequence" ref="seq_component"/>
|
||||
</record>
|
||||
<record id="internal_type_sourced" model="product.internal.type">
|
||||
<field name="name">Sourced Product</field>
|
||||
<field name="description">Set prefix as "S" in link sequence</field>
|
||||
<field name="link_sequence" ref="seq_sourced"/>
|
||||
|
||||
<!--设置产品默认值为外购产品-->
|
||||
<record id="product_internal_type_default" model="ir.values">
|
||||
<field name="name">internal_type</field>
|
||||
<field name="model">product.template</field>
|
||||
<field name="key">default</field>
|
||||
<field name="key2"></field>
|
||||
<field name="company_id" ref="base.main_company"/>
|
||||
<field name="value" eval="'I' + str(ref('app_product_sequence.internal_type_sourced'))+'\n.'"/>
|
||||
</record>
|
||||
</data>
|
||||
</odoo>
|
||||
|
||||
@@ -33,15 +33,31 @@
|
||||
<div>
|
||||
<img class="oe_picture oe_screenshot" src="set2.jpg">
|
||||
</div>
|
||||
<h2>Sample Rule:</h2>
|
||||
<p>
|
||||
D171100001 for Manufactured Products.<br/>
|
||||
C171000001 for Components Products.<br/>
|
||||
S171000001 for Sourced Products.<br/>
|
||||
17-year, 10-month.<br/>
|
||||
</p>
|
||||
<h2>Sample Rule: if we create on oct 2017</h2>
|
||||
<ul>
|
||||
<li>
|
||||
Manufactured Products: M20171100001
|
||||
</li>
|
||||
<li>
|
||||
Components Products: C20171100001
|
||||
</li>
|
||||
<li>
|
||||
Sourced Products: S20171100001
|
||||
</li>
|
||||
</ul>
|
||||
<p>
|
||||
Sepcial for variants. add [-00?]<br/>
|
||||
<ul>
|
||||
<li>
|
||||
Products with color[red]: M20171100001-001
|
||||
</li>
|
||||
<li>
|
||||
Products with color[blue]: M20171100001-002
|
||||
</li>
|
||||
<li>
|
||||
Products with color[white]: M20171100001-003
|
||||
</li>
|
||||
</ul>
|
||||
</p>
|
||||
<h2>Installation:</h2>
|
||||
<p>
|
||||
@@ -51,6 +67,54 @@
|
||||
by the system id for that product.<br/>
|
||||
Otherwise the setting of the unique constraint will fail and the module will fail to install.<br/>
|
||||
|
||||
Notice:<br/>
|
||||
Odoo product variants is very special.<br/>
|
||||
When u create a product(not product template) with attribute, It would delete the first product, which
|
||||
have no attribute.
|
||||
So it's very normal that the first product variants begin wit ???-002.<br/>
|
||||
And we make a rule that the product variants can only create after you create normal product template.
|
||||
</p>
|
||||
<h2>How to use: Very simple</h2>
|
||||
<p>
|
||||
After installed the app. You can Go to anyone of the menu:<br/>
|
||||
<ul>
|
||||
<li>
|
||||
Sales->Configuration->Products->Product Internal Type
|
||||
</li>
|
||||
<li>
|
||||
Inventory->Configuration->Products->Product Internal Type
|
||||
</li>
|
||||
<li>
|
||||
Settings->Sequences & Identifiers->Product Internal Type
|
||||
</li>
|
||||
</ul>
|
||||
</p>
|
||||
<p>
|
||||
You would see the default Product Intertype we create.
|
||||
|
||||
<div>
|
||||
<img class="oe_picture oe_screenshot" src="set3.jpg">
|
||||
</div>
|
||||
</p>
|
||||
<p>
|
||||
And create the product and code by yourself.
|
||||
<div>
|
||||
<img class="oe_picture oe_screenshot" src="set4.jpg">
|
||||
</div>
|
||||
</p>
|
||||
<p>
|
||||
Notice: The "Sequence Code" Field of sequence must be "product.product"
|
||||
<div>
|
||||
<img class="oe_picture oe_screenshot" src="set5.jpg">
|
||||
</div>
|
||||
</p>
|
||||
Go to Prior to installing this module, if you have any existing products you should ensure they already have
|
||||
a
|
||||
unique reference (or no reference) set.<br/>
|
||||
Products with a default_code of '/' or empty will automatically be assigned a code of "!!DP!!" followed
|
||||
by the system id for that product.<br/>
|
||||
Otherwise the setting of the unique constraint will fail and the module will fail to install.<br/>
|
||||
|
||||
Notice:<br/>
|
||||
Odoo product variants is very special.<br/>
|
||||
When u create a product(not product template) with attribute, It would delete the first product, which
|
||||
|
||||
BIN
app_product_sequence/static/description/set3.jpg
Normal file
BIN
app_product_sequence/static/description/set3.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 88 KiB |
BIN
app_product_sequence/static/description/set4.jpg
Normal file
BIN
app_product_sequence/static/description/set4.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 63 KiB |
BIN
app_product_sequence/static/description/set5.jpg
Normal file
BIN
app_product_sequence/static/description/set5.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 64 KiB |
@@ -8,7 +8,7 @@
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Product Internal Type" editable="top">
|
||||
<field name="name"/>
|
||||
<field name="link_sequence"/>
|
||||
<field name="link_sequence" context="{'default_code': 'product.product'}"/>
|
||||
<field name="sequence_prefix"/>
|
||||
<field name="description"/>
|
||||
</tree>
|
||||
@@ -22,9 +22,11 @@
|
||||
</record>
|
||||
|
||||
<menuitem action="app_product_sequence.internal_type_action" id="menu_internal_type_action_sys" parent="base.next_id_5"/>
|
||||
|
||||
<menuitem action="app_product_sequence.internal_type_action" id="menu_internal_type_action_sale"
|
||||
parent="sale.prod_config_main" sequence="6" groups="product.group_product_variant"/>
|
||||
parent="sale.prod_config_main" sequence="6" groups="base.group_no_one"/>
|
||||
|
||||
<menuitem action="app_product_sequence.internal_type_action" id="menu_internal_type_action_stock"
|
||||
parent="stock.menu_stock_inventory_control" sequence="3" groups="product.group_product_variant"/>
|
||||
parent="stock.menu_product_in_config_stock" sequence="3" groups="base.group_no_one"/>
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
Reference in New Issue
Block a user