Compare commits
1 Commits
14.0-sale_
...
14.0-impro
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5a7a4d37ea |
@@ -32,6 +32,7 @@ This module has been written by Alexis de Lattre from Akretion <alexis.delattre@
|
|||||||
'views/product_pricelist_item.xml',
|
'views/product_pricelist_item.xml',
|
||||||
'views/product_template_view.xml',
|
'views/product_template_view.xml',
|
||||||
'views/product_product.xml',
|
'views/product_product.xml',
|
||||||
|
'views/product_category_view.xml',
|
||||||
],
|
],
|
||||||
'installable': True,
|
'installable': True,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,3 +2,4 @@ from . import product_product
|
|||||||
from . import product_template
|
from . import product_template
|
||||||
from . import product_supplierinfo
|
from . import product_supplierinfo
|
||||||
from . import product_pricelist
|
from . import product_pricelist
|
||||||
|
from . import product_category
|
||||||
|
|||||||
13
product_usability/models/product_category.py
Normal file
13
product_usability/models/product_category.py
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
# Copyright 2022 Akretion (https://www.akretion.com).
|
||||||
|
# @author Sébastien BEAU <sebastien.beau@akretion.com>
|
||||||
|
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
||||||
|
|
||||||
|
from odoo import fields, models
|
||||||
|
|
||||||
|
|
||||||
|
class ProductCategory(models.Model):
|
||||||
|
_inherit = ['product.category', "mail.thread", "mail.activity.mixin"]
|
||||||
|
_name = 'product.category'
|
||||||
|
|
||||||
|
name = fields.Char(tracking=10)
|
||||||
|
parent_id = fields.Many2one(tracking=20)
|
||||||
19
product_usability/views/product_category_view.xml
Normal file
19
product_usability/views/product_category_view.xml
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<odoo>
|
||||||
|
|
||||||
|
<record id="product_category_form_view" model="ir.ui.view">
|
||||||
|
<field name="model">product.category</field>
|
||||||
|
<field name="inherit_id" ref="product.product_category_form_view" />
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<sheet position="after">
|
||||||
|
<div class="oe_chatter">
|
||||||
|
<field name="message_follower_ids"/>
|
||||||
|
<field name="activity_ids"/>
|
||||||
|
<field name="message_ids"/>
|
||||||
|
</div>
|
||||||
|
</sheet>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
</odoo>
|
||||||
|
|
||||||
@@ -1,91 +0,0 @@
|
|||||||
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
|
|
||||||
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
|
||||||
:alt: License: AGPL-3
|
|
||||||
|
|
||||||
============================
|
|
||||||
Sale Shipping Address Domain
|
|
||||||
============================
|
|
||||||
|
|
||||||
Adds a sensible domain to the shipping address on sale form view
|
|
||||||
|
|
||||||
Installation
|
|
||||||
============
|
|
||||||
|
|
||||||
To install this module, you need to:
|
|
||||||
|
|
||||||
#. Do this ...
|
|
||||||
|
|
||||||
Configuration
|
|
||||||
=============
|
|
||||||
|
|
||||||
To configure this module, you need to:
|
|
||||||
|
|
||||||
#. Go to ...
|
|
||||||
|
|
||||||
.. figure:: path/to/local/image.png
|
|
||||||
:alt: alternative description
|
|
||||||
:width: 600 px
|
|
||||||
|
|
||||||
Usage
|
|
||||||
=====
|
|
||||||
|
|
||||||
To use this module, you need to:
|
|
||||||
|
|
||||||
#. Go to ...
|
|
||||||
|
|
||||||
.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
|
|
||||||
:alt: Try me on Runbot
|
|
||||||
:target: https://runbot.odoo-community.org/runbot/{repo_id}/{branch}
|
|
||||||
|
|
||||||
.. repo_id is available in https://github.com/OCA/maintainer-tools/blob/master/tools/repos_with_ids.txt
|
|
||||||
.. branch is "8.0" for example
|
|
||||||
|
|
||||||
Known issues / Roadmap
|
|
||||||
======================
|
|
||||||
|
|
||||||
* ...
|
|
||||||
|
|
||||||
Bug Tracker
|
|
||||||
===========
|
|
||||||
|
|
||||||
Bugs are tracked on `GitHub Issues
|
|
||||||
<https://github.com/OCA/{project_repo}/issues>`_. In case of trouble, please
|
|
||||||
check there if your issue has already been reported. If you spotted it first,
|
|
||||||
help us smash it by providing detailed and welcomed feedback.
|
|
||||||
|
|
||||||
Credits
|
|
||||||
=======
|
|
||||||
|
|
||||||
Images
|
|
||||||
------
|
|
||||||
|
|
||||||
* Odoo Community Association: `Icon <https://github.com/OCA/maintainer-tools/blob/master/template/module/static/description/icon.svg>`_.
|
|
||||||
|
|
||||||
Contributors
|
|
||||||
------------
|
|
||||||
|
|
||||||
* Firstname Lastname <email.address@example.org>
|
|
||||||
* Second Person <second.person@example.org>
|
|
||||||
|
|
||||||
Funders
|
|
||||||
-------
|
|
||||||
|
|
||||||
The development of this module has been financially supported by:
|
|
||||||
|
|
||||||
* Company 1 name
|
|
||||||
* Company 2 name
|
|
||||||
|
|
||||||
Maintainer
|
|
||||||
----------
|
|
||||||
|
|
||||||
.. image:: https://odoo-community.org/logo.png
|
|
||||||
:alt: Odoo Community Association
|
|
||||||
:target: https://odoo-community.org
|
|
||||||
|
|
||||||
This module is maintained by the OCA.
|
|
||||||
|
|
||||||
OCA, or the Odoo Community Association, is a nonprofit organization whose
|
|
||||||
mission is to support the collaborative development of Odoo features and
|
|
||||||
promote its widespread use.
|
|
||||||
|
|
||||||
To contribute to this module, please visit https://odoo-community.org.
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
from . import models
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
# Copyright 2021 Akretion
|
|
||||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
|
||||||
|
|
||||||
{
|
|
||||||
"name": "Sale Shipping and Invoice Domain",
|
|
||||||
"summary": """
|
|
||||||
Adds a sensible domain to the shipping and invoicing addresses on sale form view""",
|
|
||||||
"version": "14.0.1.0.0",
|
|
||||||
"license": "AGPL-3",
|
|
||||||
"author": "Akretion,Odoo Community Association (OCA)",
|
|
||||||
"depends": ["sale_stock", "sale_commercial_partner"],
|
|
||||||
"demo": [],
|
|
||||||
}
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
from . import sale_order
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
# Copyright 2021 Akretion France (http://www.akretion.com/)
|
|
||||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
|
||||||
|
|
||||||
from odoo import fields, models
|
|
||||||
|
|
||||||
|
|
||||||
class SaleOrder(models.Model):
|
|
||||||
_inherit = "sale.order"
|
|
||||||
|
|
||||||
partner_invoice_id = fields.Many2one(
|
|
||||||
domain="['&', '|', "
|
|
||||||
"('company_id', '=', False), ('company_id', '=', company_id),"
|
|
||||||
"('id', 'child_of', commercial_partner_id)]"
|
|
||||||
)
|
|
||||||
partner_shipping_id = fields.Many2one(
|
|
||||||
domain="['&', '|', "
|
|
||||||
"('company_id', '=', False), ('company_id', '=', company_id),"
|
|
||||||
"('id', 'child_of', commercial_partner_id)]"
|
|
||||||
)
|
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 9.2 KiB |
@@ -1,2 +1 @@
|
|||||||
from . import models
|
from . import models
|
||||||
from .post_install import create_config_parameter_immediate_tranfer
|
|
||||||
|
|||||||
@@ -38,6 +38,5 @@ This module has been written by Alexis de Lattre from Akretion <alexis.delattre@
|
|||||||
'views/procurement_scheduler_log.xml',
|
'views/procurement_scheduler_log.xml',
|
||||||
'security/ir.model.access.csv',
|
'security/ir.model.access.csv',
|
||||||
],
|
],
|
||||||
'post_init_hook': 'create_config_parameter_immediate_tranfer',
|
|
||||||
'installable': True,
|
'installable': True,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,26 +0,0 @@
|
|||||||
# Copyright 2021 Akretion France (http://www.akretion.com/)
|
|
||||||
# @author: Alexis de Lattre <alexis.delattre@akretion.com>
|
|
||||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
|
||||||
|
|
||||||
import logging
|
|
||||||
from odoo import SUPERUSER_ID, api
|
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
|
||||||
|
|
||||||
|
|
||||||
def create_config_parameter_immediate_tranfer(cr, registry):
|
|
||||||
with api.Environment.manage():
|
|
||||||
env = api.Environment(cr, SUPERUSER_ID, {})
|
|
||||||
ico = env["ir.config_parameter"]
|
|
||||||
conf_param = ico.search([('key', '=', 'stock.no_default_immediate_tranfer')])
|
|
||||||
if not conf_param:
|
|
||||||
ico.create({
|
|
||||||
'key': 'stock.no_default_immediate_tranfer',
|
|
||||||
'value': 'True',
|
|
||||||
})
|
|
||||||
logger.info(
|
|
||||||
'ir.config_parameter stock.no_default_immediate_tranfer created')
|
|
||||||
else:
|
|
||||||
logger.info(
|
|
||||||
'ir.config_parameter stock.no_default_immediate_tranfer '
|
|
||||||
'already exists')
|
|
||||||
Reference in New Issue
Block a user