Merge pull request #22 from bakeupboys/92-16.0-make_package_creation_company_dependend
92 16.0 make package creation company dependend
This commit is contained in:
commit
ce6989e680
5 changed files with 13 additions and 3 deletions
|
|
@ -35,6 +35,7 @@ Changelog
|
||||||
|
|
||||||
:1.0.0: Initial module.
|
:1.0.0: Initial module.
|
||||||
:1.1.0: Add packaging
|
:1.1.0: Add packaging
|
||||||
|
:1.1.1: inherit package company if from product
|
||||||
|
|
||||||
Bug Tracker
|
Bug Tracker
|
||||||
===========
|
===========
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
"author": "BAKEUP",
|
"author": "BAKEUP",
|
||||||
"website": "https://www.bakeup.org",
|
"website": "https://www.bakeup.org",
|
||||||
"category": "Product",
|
"category": "Product",
|
||||||
"version": "16.0.1.1.0",
|
"version": "16.0.1.1.1",
|
||||||
"depends": ["product"],
|
"depends": ["product"],
|
||||||
"data": ["views/product_bnn_views.xml"],
|
"data": ["views/product_bnn_views.xml"],
|
||||||
"assets": {},
|
"assets": {},
|
||||||
|
|
|
||||||
|
|
@ -28,6 +28,12 @@ class ProductTemplate(models.Model):
|
||||||
packagings.write({"name": name, "qty": qty, "sales": True})
|
packagings.write({"name": name, "qty": qty, "sales": True})
|
||||||
else:
|
else:
|
||||||
self.env["product.packaging"].create(
|
self.env["product.packaging"].create(
|
||||||
{"name": name, "qty": qty, "product_id": product_product.id, "sales": True}
|
{
|
||||||
|
"name": name,
|
||||||
|
"qty": qty,
|
||||||
|
"product_id": product_product.id,
|
||||||
|
"sales": True,
|
||||||
|
"company_id": product_product.company_id.id,
|
||||||
|
}
|
||||||
)
|
)
|
||||||
return res
|
return res
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
|
|
||||||
:1.0.0: Initial module.
|
:1.0.0: Initial module.
|
||||||
:1.1.0: Add packaging
|
:1.1.0: Add packaging
|
||||||
|
:1.1.1: inherit package company if from product
|
||||||
|
|
@ -394,6 +394,8 @@ ul.auto-toc {
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="field"><th class="field-name">1.1.0:</th><td class="field-body">Add packaging</td>
|
<tr class="field"><th class="field-name">1.1.0:</th><td class="field-body">Add packaging</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr class="field"><th class="field-name">1.1.1:</th><td class="field-body">inherit package company if from product</td>
|
||||||
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue