Compare commits
1 Commits
14.0-add-o
...
14.0-googl
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d4272eff9c |
@@ -25,7 +25,6 @@
|
|||||||
'views/account_move.xml',
|
'views/account_move.xml',
|
||||||
'views/account_menu.xml',
|
'views/account_menu.xml',
|
||||||
'views/account_tax.xml',
|
'views/account_tax.xml',
|
||||||
'views/product.xml',
|
|
||||||
'views/res_config_settings.xml',
|
'views/res_config_settings.xml',
|
||||||
'views/res_partner.xml',
|
'views/res_partner.xml',
|
||||||
'views/account_report.xml',
|
'views/account_report.xml',
|
||||||
|
|||||||
@@ -6,4 +6,3 @@ from . import account_journal
|
|||||||
from . import account_move
|
from . import account_move
|
||||||
from . import account_partial_reconcile
|
from . import account_partial_reconcile
|
||||||
from . import res_partner
|
from . import res_partner
|
||||||
from . import product
|
|
||||||
|
|||||||
@@ -5,7 +5,6 @@
|
|||||||
from odoo import api, fields, models
|
from odoo import api, fields, models
|
||||||
from odoo.tools import float_is_zero
|
from odoo.tools import float_is_zero
|
||||||
from odoo.tools.misc import format_date
|
from odoo.tools.misc import format_date
|
||||||
from odoo.osv import expression
|
|
||||||
|
|
||||||
|
|
||||||
class AccountMove(models.Model):
|
class AccountMove(models.Model):
|
||||||
@@ -50,11 +49,11 @@ class AccountMove(models.Model):
|
|||||||
def _compute_has_attachment(self):
|
def _compute_has_attachment(self):
|
||||||
iao = self.env['ir.attachment']
|
iao = self.env['ir.attachment']
|
||||||
for move in self:
|
for move in self:
|
||||||
if iao.search_count([
|
if iao.search([
|
||||||
('res_model', '=', 'account.move'),
|
('res_model', '=', 'account.move'),
|
||||||
('res_id', '=', move.id),
|
('res_id', '=', move.id),
|
||||||
('type', '=', 'binary'),
|
('type', '=', 'binary'),
|
||||||
('company_id', '=', move.company_id.id)]):
|
('company_id', '=', move.company_id.id)], limit=1):
|
||||||
move.has_attachment = True
|
move.has_attachment = True
|
||||||
else:
|
else:
|
||||||
move.has_attachment = False
|
move.has_attachment = False
|
||||||
@@ -122,7 +121,7 @@ class AccountMove(models.Model):
|
|||||||
res = []
|
res = []
|
||||||
has_sections = False
|
has_sections = False
|
||||||
subtotal = 0.0
|
subtotal = 0.0
|
||||||
sign = self.move_type == 'out_refund' and -1 or 1
|
sign = self.type == 'out_refund' and -1 or 1
|
||||||
for line in self.invoice_line_ids:
|
for line in self.invoice_line_ids:
|
||||||
if line.display_type == 'line_section':
|
if line.display_type == 'line_section':
|
||||||
# insert line
|
# insert line
|
||||||
@@ -158,24 +157,6 @@ class AccountMove(models.Model):
|
|||||||
for x in sales]
|
for x in sales]
|
||||||
inv.sale_dates = ", ".join(dates)
|
inv.sale_dates = ", ".join(dates)
|
||||||
|
|
||||||
# allow to manually create moves not only in general journals,
|
|
||||||
# but also in cash journal and check journals (= bank journals not linked to a bank account)
|
|
||||||
@api.depends('company_id', 'invoice_filter_type_domain')
|
|
||||||
def _compute_suitable_journal_ids(self):
|
|
||||||
for move in self:
|
|
||||||
if move.invoice_filter_type_domain:
|
|
||||||
super(AccountMove, move)._compute_suitable_journal_ids()
|
|
||||||
else:
|
|
||||||
company_id = move.company_id.id or self.env.company.id
|
|
||||||
domain = expression.AND([
|
|
||||||
[('company_id', '=', company_id)],
|
|
||||||
expression.OR([
|
|
||||||
[('type', 'in', ('general', 'cash'))],
|
|
||||||
[('type', '=', 'bank'), ('bank_account_id', '=', False)]
|
|
||||||
])
|
|
||||||
])
|
|
||||||
move.suitable_journal_ids = self.env['account.journal'].search(domain)
|
|
||||||
|
|
||||||
|
|
||||||
class AccountMoveLine(models.Model):
|
class AccountMoveLine(models.Model):
|
||||||
_inherit = 'account.move.line'
|
_inherit = 'account.move.line'
|
||||||
@@ -195,8 +176,6 @@ class AccountMoveLine(models.Model):
|
|||||||
matched_credit_ids = fields.One2many(string='Partial Reconcile Credit')
|
matched_credit_ids = fields.One2many(string='Partial Reconcile Credit')
|
||||||
reconcile_string = fields.Char(
|
reconcile_string = fields.Char(
|
||||||
compute='_compute_reconcile_string', string='Reconcile', store=True)
|
compute='_compute_reconcile_string', string='Reconcile', store=True)
|
||||||
# for optional display in tree view
|
|
||||||
product_barcode = fields.Char(related='product_id.barcode', string="Product Barcode")
|
|
||||||
|
|
||||||
def show_account_move_form(self):
|
def show_account_move_form(self):
|
||||||
self.ensure_one()
|
self.ensure_one()
|
||||||
|
|||||||
@@ -1,45 +0,0 @@
|
|||||||
# Copyright 2015-2021 Akretion (http://www.akretion.com)
|
|
||||||
# @author Alexis de Lattre <alexis.delattre@akretion.com>
|
|
||||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
|
||||||
|
|
||||||
from odoo import api, fields, models, _
|
|
||||||
|
|
||||||
|
|
||||||
class ProductTemplate(models.Model):
|
|
||||||
_inherit = 'product.template'
|
|
||||||
|
|
||||||
# DON'T put store=True on those fields, because they are company dependent
|
|
||||||
sale_price_type = fields.Selection(
|
|
||||||
'_sale_purchase_price_type_sel', compute='_compute_sale_price_type',
|
|
||||||
string='Sale Price Type', compute_sudo=False, readonly=True)
|
|
||||||
purchase_price_type = fields.Selection(
|
|
||||||
'_sale_purchase_price_type_sel', compute='_compute_purchase_price_type',
|
|
||||||
string='Purchase Price Type', compute_sudo=False, readonly=True)
|
|
||||||
|
|
||||||
@api.model
|
|
||||||
def _sale_purchase_price_type_sel(self):
|
|
||||||
return [('incl', _('Tax incl.')), ('excl', _('Tax excl.'))]
|
|
||||||
|
|
||||||
@api.depends('taxes_id')
|
|
||||||
def _compute_sale_price_type(self):
|
|
||||||
for pt in self:
|
|
||||||
sale_price_type = 'incl'
|
|
||||||
if pt.taxes_id and all([not t.price_include for t in pt.taxes_id if t.amount_type == 'percent']):
|
|
||||||
sale_price_type = 'excl'
|
|
||||||
pt.sale_price_type = sale_price_type
|
|
||||||
|
|
||||||
@api.depends('supplier_taxes_id')
|
|
||||||
def _compute_purchase_price_type(self):
|
|
||||||
for pt in self:
|
|
||||||
purchase_price_type = 'incl'
|
|
||||||
if pt.supplier_taxes_id and all([not t.price_include for t in pt.supplier_taxes_id if t.amount_type == 'percent']):
|
|
||||||
purchase_price_type = 'excl'
|
|
||||||
pt.purchase_price_type = purchase_price_type
|
|
||||||
|
|
||||||
|
|
||||||
class ProductSupplierinfo(models.Model):
|
|
||||||
_inherit = 'product.supplierinfo'
|
|
||||||
|
|
||||||
# DON'T put store=True on those fields, because they are company dependent
|
|
||||||
purchase_price_type = fields.Selection(
|
|
||||||
related='product_tmpl_id.purchase_price_type', related_sudo=False)
|
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<!--
|
<!--
|
||||||
Copyright 2015-2021 Akretion France (http://www.akretion.com/)
|
Copyright 2015-2020 Akretion France (http://www.akretion.com/)
|
||||||
@author: Alexis de Lattre <alexis.delattre@akretion.com>
|
@author: Alexis de Lattre <alexis.delattre@akretion.com>
|
||||||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
-->
|
-->
|
||||||
@@ -8,18 +8,6 @@
|
|||||||
<odoo>
|
<odoo>
|
||||||
|
|
||||||
|
|
||||||
<record id="view_account_form" model="ir.ui.view">
|
|
||||||
<field name="name">account.account.form</field>
|
|
||||||
<field name="model">account.account</field>
|
|
||||||
<field name="inherit_id" ref="account.view_account_form"/>
|
|
||||||
<field name="arch" type="xml">
|
|
||||||
<field name="deprecated" position="before">
|
|
||||||
<field name="reconcile" attrs="{'invisible': ['|', ('internal_type','=','liquidity'), ('internal_group', '=', 'off_balance')]}"/>
|
|
||||||
</field>
|
|
||||||
</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
|
|
||||||
<record id="view_account_search" model="ir.ui.view">
|
<record id="view_account_search" model="ir.ui.view">
|
||||||
<field name="name">account.account.search</field>
|
<field name="name">account.account.search</field>
|
||||||
<field name="model">account.account</field>
|
<field name="model">account.account</field>
|
||||||
|
|||||||
@@ -30,9 +30,6 @@
|
|||||||
<field name="matching_number" optional="hide"/>
|
<field name="matching_number" optional="hide"/>
|
||||||
<field name="reconcile_string" optional="show"/>
|
<field name="reconcile_string" optional="show"/>
|
||||||
</xpath>
|
</xpath>
|
||||||
<xpath expr="//field[@name='invoice_line_ids']/tree/field[@name='product_id']" position="after">
|
|
||||||
<field name="product_barcode" optional="hide"/>
|
|
||||||
</xpath>
|
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
@@ -61,36 +58,6 @@
|
|||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<record id="view_account_move_line_filter" model="ir.ui.view">
|
|
||||||
<field name="name">account_usability.account_move_line_search</field>
|
|
||||||
<field name="model">account.move.line</field>
|
|
||||||
<field name="inherit_id" ref="account.view_account_move_line_filter"/>
|
|
||||||
<field name="arch" type="xml">
|
|
||||||
<filter name="unposted" position="before">
|
|
||||||
<filter name="current_year" string="Current Year" domain="[('date', '>=', (context_today().strftime('%Y-01-01'))), ('date', '<=', (context_today().strftime('%Y-12-31')))]"/>
|
|
||||||
<filter name="previous_year" string="Previous Year" domain="[('date', '>=', (context_today() + relativedelta(day=1, month=1, years=-1)).strftime('%Y-%m-%d')), ('date', '<=', (context_today() + relativedelta(day=31, month=12, years=-1)).strftime('%Y-%m-%d'))]"/>
|
|
||||||
<separator/>
|
|
||||||
</filter>
|
|
||||||
<field name="partner_id" position="after">
|
|
||||||
<field name="reconcile_string" />
|
|
||||||
<field name="debit" filter_domain="['|', ('debit', '=', self), ('credit', '=', self)]" string="Debit or Credit"/>
|
|
||||||
</field>
|
|
||||||
<filter name="unreconciled" position="before">
|
|
||||||
<filter name="reconciled" string="Fully Reconciled" domain="[('full_reconcile_id', '!=', False)]"/>
|
|
||||||
</filter>
|
|
||||||
<filter name="unreconciled" position="attributes">
|
|
||||||
<attribute name="string">Unreconciled or Partially Reconciled</attribute>
|
|
||||||
</filter>
|
|
||||||
<!--
|
|
||||||
<field name="name" position="attributes">
|
|
||||||
<attribute name="string">Name or Reference</attribute>
|
|
||||||
</field> -->
|
|
||||||
<field name="partner_id" position="attributes">
|
|
||||||
<attribute name="domain">['|', ('parent_id', '=', False), ('is_company', '=', True)]</attribute>
|
|
||||||
</field>
|
|
||||||
</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
<record id="account.action_move_journal_line" model="ir.actions.act_window">
|
<record id="account.action_move_journal_line" model="ir.actions.act_window">
|
||||||
<field name="context">{'default_move_type': 'entry', 'view_no_maturity': True}</field>
|
<field name="context">{'default_move_type': 'entry', 'view_no_maturity': True}</field>
|
||||||
<!-- Remove 'search_default_misc_filter': 1 -->
|
<!-- Remove 'search_default_misc_filter': 1 -->
|
||||||
|
|||||||
@@ -1,72 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<!--
|
|
||||||
Copyright 2017-2020 Akretion (http://www.akretion.com/)
|
|
||||||
@author: Alexis de Lattre <alexis.delattre@akretion.com>
|
|
||||||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
|
||||||
-->
|
|
||||||
|
|
||||||
<odoo>
|
|
||||||
|
|
||||||
<!-- In the official account module, on product category and product template,
|
|
||||||
some fields/groups are on account.group_account_invoice, some on
|
|
||||||
account.group_account_user and some on account.group_account_manager
|
|
||||||
Here, we set all those fields on account.group_account_invoice
|
|
||||||
-->
|
|
||||||
|
|
||||||
<record id="product_template_form_view" model="ir.ui.view">
|
|
||||||
<field name="name">account_usability.product.template.form</field>
|
|
||||||
<field name="model">product.template</field>
|
|
||||||
<field name="priority">100</field> <!-- when you replace a field, it's always better to inherit at the end -->
|
|
||||||
<field name="inherit_id" ref="account.product_template_form_view"/>
|
|
||||||
<field name="arch" type="xml">
|
|
||||||
<field name="property_account_income_id" position="attributes">
|
|
||||||
<attribute name="groups">account.group_account_invoice</attribute>
|
|
||||||
</field>
|
|
||||||
<field name="property_account_expense_id" position="attributes">
|
|
||||||
<attribute name="groups">account.group_account_invoice</attribute>
|
|
||||||
</field>
|
|
||||||
<field name="list_price" position="replace">
|
|
||||||
<div name="list_price">
|
|
||||||
<field name="list_price" widget='monetary' options="{'currency_field': 'currency_id'}" class="oe_inline"/>
|
|
||||||
<label for="sale_price_type" string=" "/>
|
|
||||||
<field name="sale_price_type"/>
|
|
||||||
</div>
|
|
||||||
</field>
|
|
||||||
</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
<record id="view_category_property_form" model="ir.ui.view">
|
|
||||||
<field name="name">account_usability.product.category.form</field>
|
|
||||||
<field name="model">product.category</field>
|
|
||||||
<field name="inherit_id" ref="account.view_category_property_form"/>
|
|
||||||
<field name="arch" type="xml">
|
|
||||||
<group name="account_property" position="attributes">
|
|
||||||
<attribute name="groups">account.group_account_invoice</attribute>
|
|
||||||
</group>
|
|
||||||
</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
<record id="product_supplierinfo_form_view" model="ir.ui.view">
|
|
||||||
<field name="name">account_usability.product.supplierinfo.form</field>
|
|
||||||
<field name="model">product.supplierinfo</field>
|
|
||||||
<field name="inherit_id" ref="product.product_supplierinfo_form_view"/>
|
|
||||||
<field name="arch" type="xml">
|
|
||||||
<field name="currency_id" position="after">
|
|
||||||
<field name="purchase_price_type"/>
|
|
||||||
</field>
|
|
||||||
</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
<record id="product_supplierinfo_tree_view" model="ir.ui.view">
|
|
||||||
<field name="name">account_usability.product.supplierinfo.tree</field>
|
|
||||||
<field name="model">product.supplierinfo</field>
|
|
||||||
<field name="inherit_id" ref="product.product_supplierinfo_tree_view"/>
|
|
||||||
<field name="arch" type="xml">
|
|
||||||
<field name="price" position="after">
|
|
||||||
<field name="purchase_price_type" string="Tax"/>
|
|
||||||
</field>
|
|
||||||
</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
|
|
||||||
</odoo>
|
|
||||||
@@ -72,9 +72,7 @@
|
|||||||
<record id="view_partner_form" model="ir.ui.view">
|
<record id="view_partner_form" model="ir.ui.view">
|
||||||
<field name="name">add.phone_ids.on.partner.form</field>
|
<field name="name">add.phone_ids.on.partner.form</field>
|
||||||
<field name="model">res.partner</field>
|
<field name="model">res.partner</field>
|
||||||
<field name="inherit_id" ref="mail.res_partner_view_form_inherit_mail"/>
|
<field name="inherit_id" ref="base.view_partner_form"/>
|
||||||
<!-- This module depends on contacts which depends on mail
|
|
||||||
and the mail module replaces the email field -->
|
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<field name="phone" position="after">
|
<field name="phone" position="after">
|
||||||
<field name="phone_ids" nolabel="1" colspan="2"/>
|
<field name="phone_ids" nolabel="1" colspan="2"/>
|
||||||
@@ -85,12 +83,9 @@
|
|||||||
<field name="mobile" position="attributes">
|
<field name="mobile" position="attributes">
|
||||||
<attribute name="invisible">1</attribute>
|
<attribute name="invisible">1</attribute>
|
||||||
</field>
|
</field>
|
||||||
<label for="email" position="attributes">
|
<field name="email" position="attributes">
|
||||||
<attribute name="invisible">1</attribute>
|
<attribute name="invisible">1</attribute>
|
||||||
</label>
|
</field>
|
||||||
<xpath expr="//field[@name='email']/.." position="attributes">
|
|
||||||
<attribute name="invisible">1</attribute>
|
|
||||||
</xpath>
|
|
||||||
<!-- I can't display phone_ids in the Contacts
|
<!-- I can't display phone_ids in the Contacts
|
||||||
because there is a very strange thing in the web client: if
|
because there is a very strange thing in the web client: if
|
||||||
you have a res.partner.phone on one of the fields,
|
you have a res.partner.phone on one of the fields,
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
'summary': 'Better usability in base module',
|
'summary': 'Better usability in base module',
|
||||||
'author': 'Akretion',
|
'author': 'Akretion',
|
||||||
'website': 'http://www.akretion.com',
|
'website': 'http://www.akretion.com',
|
||||||
'depends': ['base', 'contacts'],
|
'depends': ['base'],
|
||||||
'data': [
|
'data': [
|
||||||
'security/group.xml',
|
'security/group.xml',
|
||||||
'security/ir.model.access.csv',
|
'security/ir.model.access.csv',
|
||||||
|
|||||||
@@ -1,194 +0,0 @@
|
|||||||
# Translation of Odoo Server.
|
|
||||||
# This file contains the translation of the following modules:
|
|
||||||
# * base_usability
|
|
||||||
#
|
|
||||||
msgid ""
|
|
||||||
msgstr ""
|
|
||||||
"Project-Id-Version: Odoo Server 14.0\n"
|
|
||||||
"Report-Msgid-Bugs-To: \n"
|
|
||||||
"POT-Creation-Date: 2021-02-17 16:55+0000\n"
|
|
||||||
"PO-Revision-Date: 2021-02-17 16:55+0000\n"
|
|
||||||
"Last-Translator: \n"
|
|
||||||
"Language-Team: \n"
|
|
||||||
"MIME-Version: 1.0\n"
|
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
|
||||||
"Content-Transfer-Encoding: \n"
|
|
||||||
"Plural-Forms: \n"
|
|
||||||
|
|
||||||
#. module: base_usability
|
|
||||||
#: model:ir.model,name:base_usability.model_res_partner_bank
|
|
||||||
msgid "Bank Accounts"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#. module: base_usability
|
|
||||||
#: model:ir.model.fields,field_description:base_usability.field_res_partner_bank__bank_name
|
|
||||||
msgid "Bank Name"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#. module: base_usability
|
|
||||||
#: model:ir.model,name:base_usability.model_res_company
|
|
||||||
msgid "Companies"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#. module: base_usability
|
|
||||||
#: model:ir.model,name:base_usability.model_res_partner
|
|
||||||
msgid "Contact"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#. module: base_usability
|
|
||||||
#: model_terms:ir.ui.view,arch_db:base_usability.res_country_search
|
|
||||||
msgid "Currency"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#. module: base_usability
|
|
||||||
#: code:addons/base_usability/models/res_partner.py:0
|
|
||||||
#: code:addons/base_usability/models/res_partner.py:0
|
|
||||||
#, python-format
|
|
||||||
msgid "Customer Number:"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#. module: base_usability
|
|
||||||
#: model:ir.model.fields,field_description:base_usability.field_ir_mail_server__display_name
|
|
||||||
#: model:ir.model.fields,field_description:base_usability.field_ir_model__display_name
|
|
||||||
#: model:ir.model.fields,field_description:base_usability.field_res_company__display_name
|
|
||||||
#: model:ir.model.fields,field_description:base_usability.field_res_partner__display_name
|
|
||||||
#: model:ir.model.fields,field_description:base_usability.field_res_partner_bank__display_name
|
|
||||||
#: model:ir.model.fields,field_description:base_usability.field_res_partner_category__display_name
|
|
||||||
#: model:ir.model.fields,field_description:base_usability.field_res_users__display_name
|
|
||||||
msgid "Display Name"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#. module: base_usability
|
|
||||||
#: code:addons/base_usability/models/res_company.py:0
|
|
||||||
#: code:addons/base_usability/models/res_partner.py:0
|
|
||||||
#, python-format
|
|
||||||
msgid "E-mail:"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#. module: base_usability
|
|
||||||
#: model_terms:ir.ui.view,arch_db:base_usability.res_country_search
|
|
||||||
msgid "Group By"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#. module: base_usability
|
|
||||||
#: model:ir.model.fields,field_description:base_usability.field_ir_mail_server__id
|
|
||||||
#: model:ir.model.fields,field_description:base_usability.field_ir_model__id
|
|
||||||
#: model:ir.model.fields,field_description:base_usability.field_res_company__id
|
|
||||||
#: model:ir.model.fields,field_description:base_usability.field_res_partner__id
|
|
||||||
#: model:ir.model.fields,field_description:base_usability.field_res_partner_bank__id
|
|
||||||
#: model:ir.model.fields,field_description:base_usability.field_res_partner_category__id
|
|
||||||
#: model:ir.model.fields,field_description:base_usability.field_res_users__id
|
|
||||||
msgid "ID"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#. module: base_usability
|
|
||||||
#: model_terms:ir.ui.view,arch_db:base_usability.view_module_filter
|
|
||||||
msgid "Installable"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#. module: base_usability
|
|
||||||
#: model:ir.model.fields,field_description:base_usability.field_ir_mail_server____last_update
|
|
||||||
#: model:ir.model.fields,field_description:base_usability.field_ir_model____last_update
|
|
||||||
#: model:ir.model.fields,field_description:base_usability.field_res_company____last_update
|
|
||||||
#: model:ir.model.fields,field_description:base_usability.field_res_partner____last_update
|
|
||||||
#: model:ir.model.fields,field_description:base_usability.field_res_partner_bank____last_update
|
|
||||||
#: model:ir.model.fields,field_description:base_usability.field_res_partner_category____last_update
|
|
||||||
#: model:ir.model.fields,field_description:base_usability.field_res_users____last_update
|
|
||||||
msgid "Last Modified on"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#. module: base_usability
|
|
||||||
#: model:ir.model,name:base_usability.model_ir_mail_server
|
|
||||||
msgid "Mail Server"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#. module: base_usability
|
|
||||||
#: code:addons/base_usability/models/res_partner.py:0
|
|
||||||
#, python-format
|
|
||||||
msgid "Mobile:"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#. module: base_usability
|
|
||||||
#: model:ir.model,name:base_usability.model_ir_model
|
|
||||||
msgid "Models"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#. module: base_usability
|
|
||||||
#: model_terms:ir.ui.view,arch_db:base_usability.res_country_search
|
|
||||||
msgid "Name or Code"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#. module: base_usability
|
|
||||||
#: model_terms:ir.ui.view,arch_db:base_usability.view_res_partner_filter
|
|
||||||
msgid "Name or Email or Reference"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#. module: base_usability
|
|
||||||
#: model:ir.model.fields,field_description:base_usability.field_res_partner__name_title
|
|
||||||
#: model:ir.model.fields,field_description:base_usability.field_res_users__name_title
|
|
||||||
msgid "Name with Title"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#. module: base_usability
|
|
||||||
#: model:res.groups,name:base_usability.group_nobody
|
|
||||||
msgid "Nobody (used to hide native menus)"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#. module: base_usability
|
|
||||||
#: model:ir.model,name:base_usability.model_res_partner_category
|
|
||||||
msgid "Partner Tags"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#. module: base_usability
|
|
||||||
#: model:ir.model.fields,field_description:base_usability.field_res_partner__ref
|
|
||||||
#: model:ir.model.fields,field_description:base_usability.field_res_users__ref
|
|
||||||
msgid "Reference"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#. module: base_usability
|
|
||||||
#: model_terms:ir.ui.view,arch_db:base_usability.res_country_search
|
|
||||||
msgid "Search Countries"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#. module: base_usability
|
|
||||||
#: code:addons/base_usability/models/res_partner.py:0
|
|
||||||
#: code:addons/base_usability/models/res_partner.py:0
|
|
||||||
#, python-format
|
|
||||||
msgid "Supplier Number:"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#. module: base_usability
|
|
||||||
#: model:ir.model.fields,field_description:base_usability.field_res_partner_category__name
|
|
||||||
msgid "Tag Name"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#. module: base_usability
|
|
||||||
#: code:addons/base_usability/models/res_company.py:0
|
|
||||||
#: code:addons/base_usability/models/res_partner.py:0
|
|
||||||
#, python-format
|
|
||||||
msgid "Tel:"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#. module: base_usability
|
|
||||||
#: model:ir.model,name:base_usability.model_res_users
|
|
||||||
msgid "Users"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#. module: base_usability
|
|
||||||
#: code:addons/base_usability/models/res_partner.py:0
|
|
||||||
#, python-format
|
|
||||||
msgid "VAT Number:"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#. module: base_usability
|
|
||||||
#: code:addons/base_usability/models/res_company.py:0
|
|
||||||
#, python-format
|
|
||||||
msgid "VAT:"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#. module: base_usability
|
|
||||||
#: code:addons/base_usability/models/res_company.py:0
|
|
||||||
#: code:addons/base_usability/models/res_partner.py:0
|
|
||||||
#, python-format
|
|
||||||
msgid "Website:"
|
|
||||||
msgstr ""
|
|
||||||
@@ -1,194 +0,0 @@
|
|||||||
# Translation of Odoo Server.
|
|
||||||
# This file contains the translation of the following modules:
|
|
||||||
# * base_usability
|
|
||||||
#
|
|
||||||
msgid ""
|
|
||||||
msgstr ""
|
|
||||||
"Project-Id-Version: Odoo Server 14.0\n"
|
|
||||||
"Report-Msgid-Bugs-To: \n"
|
|
||||||
"POT-Creation-Date: 2021-02-17 16:55+0000\n"
|
|
||||||
"PO-Revision-Date: 2021-02-17 16:55+0000\n"
|
|
||||||
"Last-Translator: \n"
|
|
||||||
"Language-Team: \n"
|
|
||||||
"MIME-Version: 1.0\n"
|
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
|
||||||
"Content-Transfer-Encoding: \n"
|
|
||||||
"Plural-Forms: \n"
|
|
||||||
|
|
||||||
#. module: base_usability
|
|
||||||
#: model:ir.model,name:base_usability.model_res_partner_bank
|
|
||||||
msgid "Bank Accounts"
|
|
||||||
msgstr "Comptes bancaires"
|
|
||||||
|
|
||||||
#. module: base_usability
|
|
||||||
#: model:ir.model.fields,field_description:base_usability.field_res_partner_bank__bank_name
|
|
||||||
msgid "Bank Name"
|
|
||||||
msgstr "Nom de la banque"
|
|
||||||
|
|
||||||
#. module: base_usability
|
|
||||||
#: model:ir.model,name:base_usability.model_res_company
|
|
||||||
msgid "Companies"
|
|
||||||
msgstr "Sociétés"
|
|
||||||
|
|
||||||
#. module: base_usability
|
|
||||||
#: model:ir.model,name:base_usability.model_res_partner
|
|
||||||
msgid "Contact"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#. module: base_usability
|
|
||||||
#: model_terms:ir.ui.view,arch_db:base_usability.res_country_search
|
|
||||||
msgid "Currency"
|
|
||||||
msgstr "Monnaie"
|
|
||||||
|
|
||||||
#. module: base_usability
|
|
||||||
#: code:addons/base_usability/models/res_partner.py:0
|
|
||||||
#: code:addons/base_usability/models/res_partner.py:0
|
|
||||||
#, python-format
|
|
||||||
msgid "Customer Number:"
|
|
||||||
msgstr "N° client :"
|
|
||||||
|
|
||||||
#. module: base_usability
|
|
||||||
#: model:ir.model.fields,field_description:base_usability.field_ir_mail_server__display_name
|
|
||||||
#: model:ir.model.fields,field_description:base_usability.field_ir_model__display_name
|
|
||||||
#: model:ir.model.fields,field_description:base_usability.field_res_company__display_name
|
|
||||||
#: model:ir.model.fields,field_description:base_usability.field_res_partner__display_name
|
|
||||||
#: model:ir.model.fields,field_description:base_usability.field_res_partner_bank__display_name
|
|
||||||
#: model:ir.model.fields,field_description:base_usability.field_res_partner_category__display_name
|
|
||||||
#: model:ir.model.fields,field_description:base_usability.field_res_users__display_name
|
|
||||||
msgid "Display Name"
|
|
||||||
msgstr "Nom affiché"
|
|
||||||
|
|
||||||
#. module: base_usability
|
|
||||||
#: code:addons/base_usability/models/res_company.py:0
|
|
||||||
#: code:addons/base_usability/models/res_partner.py:0
|
|
||||||
#, python-format
|
|
||||||
msgid "E-mail:"
|
|
||||||
msgstr "E-mail :"
|
|
||||||
|
|
||||||
#. module: base_usability
|
|
||||||
#: model_terms:ir.ui.view,arch_db:base_usability.res_country_search
|
|
||||||
msgid "Group By"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#. module: base_usability
|
|
||||||
#: model:ir.model.fields,field_description:base_usability.field_ir_mail_server__id
|
|
||||||
#: model:ir.model.fields,field_description:base_usability.field_ir_model__id
|
|
||||||
#: model:ir.model.fields,field_description:base_usability.field_res_company__id
|
|
||||||
#: model:ir.model.fields,field_description:base_usability.field_res_partner__id
|
|
||||||
#: model:ir.model.fields,field_description:base_usability.field_res_partner_bank__id
|
|
||||||
#: model:ir.model.fields,field_description:base_usability.field_res_partner_category__id
|
|
||||||
#: model:ir.model.fields,field_description:base_usability.field_res_users__id
|
|
||||||
msgid "ID"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#. module: base_usability
|
|
||||||
#: model_terms:ir.ui.view,arch_db:base_usability.view_module_filter
|
|
||||||
msgid "Installable"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#. module: base_usability
|
|
||||||
#: model:ir.model.fields,field_description:base_usability.field_ir_mail_server____last_update
|
|
||||||
#: model:ir.model.fields,field_description:base_usability.field_ir_model____last_update
|
|
||||||
#: model:ir.model.fields,field_description:base_usability.field_res_company____last_update
|
|
||||||
#: model:ir.model.fields,field_description:base_usability.field_res_partner____last_update
|
|
||||||
#: model:ir.model.fields,field_description:base_usability.field_res_partner_bank____last_update
|
|
||||||
#: model:ir.model.fields,field_description:base_usability.field_res_partner_category____last_update
|
|
||||||
#: model:ir.model.fields,field_description:base_usability.field_res_users____last_update
|
|
||||||
msgid "Last Modified on"
|
|
||||||
msgstr "Dernière modification le"
|
|
||||||
|
|
||||||
#. module: base_usability
|
|
||||||
#: model:ir.model,name:base_usability.model_ir_mail_server
|
|
||||||
msgid "Mail Server"
|
|
||||||
msgstr "Serveur d'email"
|
|
||||||
|
|
||||||
#. module: base_usability
|
|
||||||
#: code:addons/base_usability/models/res_partner.py:0
|
|
||||||
#, python-format
|
|
||||||
msgid "Mobile:"
|
|
||||||
msgstr "Portable :"
|
|
||||||
|
|
||||||
#. module: base_usability
|
|
||||||
#: model:ir.model,name:base_usability.model_ir_model
|
|
||||||
msgid "Models"
|
|
||||||
msgstr "Modèles"
|
|
||||||
|
|
||||||
#. module: base_usability
|
|
||||||
#: model_terms:ir.ui.view,arch_db:base_usability.res_country_search
|
|
||||||
msgid "Name or Code"
|
|
||||||
msgstr "Nom ou code"
|
|
||||||
|
|
||||||
#. module: base_usability
|
|
||||||
#: model_terms:ir.ui.view,arch_db:base_usability.view_res_partner_filter
|
|
||||||
msgid "Name or Email or Reference"
|
|
||||||
msgstr "Nom ou e-mail ou référence"
|
|
||||||
|
|
||||||
#. module: base_usability
|
|
||||||
#: model:ir.model.fields,field_description:base_usability.field_res_partner__name_title
|
|
||||||
#: model:ir.model.fields,field_description:base_usability.field_res_users__name_title
|
|
||||||
msgid "Name with Title"
|
|
||||||
msgstr "Nom avec titre"
|
|
||||||
|
|
||||||
#. module: base_usability
|
|
||||||
#: model:res.groups,name:base_usability.group_nobody
|
|
||||||
msgid "Nobody (used to hide native menus)"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#. module: base_usability
|
|
||||||
#: model:ir.model,name:base_usability.model_res_partner_category
|
|
||||||
msgid "Partner Tags"
|
|
||||||
msgstr "Étiquettes du partenaire"
|
|
||||||
|
|
||||||
#. module: base_usability
|
|
||||||
#: model:ir.model.fields,field_description:base_usability.field_res_partner__ref
|
|
||||||
#: model:ir.model.fields,field_description:base_usability.field_res_users__ref
|
|
||||||
msgid "Reference"
|
|
||||||
msgstr "Référence"
|
|
||||||
|
|
||||||
#. module: base_usability
|
|
||||||
#: model_terms:ir.ui.view,arch_db:base_usability.res_country_search
|
|
||||||
msgid "Search Countries"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#. module: base_usability
|
|
||||||
#: code:addons/base_usability/models/res_partner.py:0
|
|
||||||
#: code:addons/base_usability/models/res_partner.py:0
|
|
||||||
#, python-format
|
|
||||||
msgid "Supplier Number:"
|
|
||||||
msgstr "N° fournisseur :"
|
|
||||||
|
|
||||||
#. module: base_usability
|
|
||||||
#: model:ir.model.fields,field_description:base_usability.field_res_partner_category__name
|
|
||||||
msgid "Tag Name"
|
|
||||||
msgstr "Nom de l'étiquette"
|
|
||||||
|
|
||||||
#. module: base_usability
|
|
||||||
#: code:addons/base_usability/models/res_company.py:0
|
|
||||||
#: code:addons/base_usability/models/res_partner.py:0
|
|
||||||
#, python-format
|
|
||||||
msgid "Tel:"
|
|
||||||
msgstr "Tél :"
|
|
||||||
|
|
||||||
#. module: base_usability
|
|
||||||
#: model:ir.model,name:base_usability.model_res_users
|
|
||||||
msgid "Users"
|
|
||||||
msgstr "Utilisateurs"
|
|
||||||
|
|
||||||
#. module: base_usability
|
|
||||||
#: code:addons/base_usability/models/res_partner.py:0
|
|
||||||
#, python-format
|
|
||||||
msgid "VAT Number:"
|
|
||||||
msgstr "N° TVA :"
|
|
||||||
|
|
||||||
#. module: base_usability
|
|
||||||
#: code:addons/base_usability/models/res_company.py:0
|
|
||||||
#, python-format
|
|
||||||
msgid "VAT:"
|
|
||||||
msgstr "TVA :"
|
|
||||||
|
|
||||||
#. module: base_usability
|
|
||||||
#: code:addons/base_usability/models/res_company.py:0
|
|
||||||
#: code:addons/base_usability/models/res_partner.py:0
|
|
||||||
#, python-format
|
|
||||||
msgid "Website:"
|
|
||||||
msgstr "Site web :"
|
|
||||||
@@ -51,7 +51,7 @@ class ResCompany(models.Model):
|
|||||||
'label': _('Website:')},
|
'label': _('Website:')},
|
||||||
'vat': {
|
'vat': {
|
||||||
'value': self.vat,
|
'value': self.vat,
|
||||||
'label': _('VAT:')},
|
'label': _('TVA :')}, # TODO translate
|
||||||
}
|
}
|
||||||
return options
|
return options
|
||||||
|
|
||||||
|
|||||||
@@ -56,8 +56,9 @@ class ResPartner(models.Model):
|
|||||||
|
|
||||||
# for reports
|
# for reports
|
||||||
def _display_full_address(
|
def _display_full_address(
|
||||||
self,
|
self, details=[
|
||||||
details=['company', 'name', 'address', 'phone', 'mobile', 'email'],
|
'company', 'name', 'address', 'phone',
|
||||||
|
'mobile', 'email'],
|
||||||
icon=True):
|
icon=True):
|
||||||
self.ensure_one()
|
self.ensure_one()
|
||||||
# To make the icons work with py3o with PDF export, on the py3o server:
|
# To make the icons work with py3o with PDF export, on the py3o server:
|
||||||
@@ -118,28 +119,7 @@ class ResPartner(models.Model):
|
|||||||
},
|
},
|
||||||
'address': {
|
'address': {
|
||||||
'value': self._display_address(without_company=True),
|
'value': self._display_address(without_company=True),
|
||||||
},
|
}
|
||||||
'vat': {
|
|
||||||
'value': self.commercial_partner_id.vat,
|
|
||||||
'label': _('VAT Number:'),
|
|
||||||
},
|
|
||||||
'commercial_ref': {
|
|
||||||
'value': self.commercial_partner_id.ref,
|
|
||||||
'label': _('Customer Number:'),
|
|
||||||
},
|
|
||||||
'ref': {
|
|
||||||
'value': self.ref,
|
|
||||||
'label': _('Customer Number:'),
|
|
||||||
},
|
|
||||||
# Same with 'supplier_' prefix, to change the label
|
|
||||||
'supplier_commercial_ref': {
|
|
||||||
'value': self.commercial_partner_id.ref,
|
|
||||||
'label': _('Supplier Number:'),
|
|
||||||
},
|
|
||||||
'supplier_ref': {
|
|
||||||
'value': self.ref,
|
|
||||||
'label': _('Supplier Number:'),
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
res = []
|
res = []
|
||||||
for detail in details:
|
for detail in details:
|
||||||
|
|||||||
@@ -16,19 +16,6 @@
|
|||||||
<xpath expr="//field[@name='child_ids']/form//field[@name='title']" position="attributes">
|
<xpath expr="//field[@name='child_ids']/form//field[@name='title']" position="attributes">
|
||||||
<attribute name="attrs"></attribute>
|
<attribute name="attrs"></attribute>
|
||||||
</xpath>
|
</xpath>
|
||||||
<!-- Show double VAT partner even when not in editable mode -->
|
|
||||||
<div attrs="{'invisible': [('same_vat_partner_id', '=', False)]}" position="attributes">
|
|
||||||
<attribute name="class">alert alert-warning</attribute>
|
|
||||||
</div>
|
|
||||||
<!-- Add a kanban button to open child partner -->
|
|
||||||
<xpath expr="//field[@name='child_ids']//kanban/templates/t/div" position="inside">
|
|
||||||
<div class="o_dropdown_kanban">
|
|
||||||
<a class="btn" role="button" title="Open"
|
|
||||||
t-att-href="'/web#id=' + record.id.raw_value + '&action=%(contacts.action_contacts)d' + '&menu_id=%(contacts.menu_contacts)d' + '&view_type=form&cids=1&model=res.partner'">
|
|
||||||
<span class="fa fa-external-link" />
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</xpath>
|
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
|
|||||||
1
google_calendar_usability/__init__.py
Normal file
1
google_calendar_usability/__init__.py
Normal file
@@ -0,0 +1 @@
|
|||||||
|
from . import models
|
||||||
16
google_calendar_usability/__manifest__.py
Normal file
16
google_calendar_usability/__manifest__.py
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
# Copyright 2021 Akretion (http://www.akretion.com)
|
||||||
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
|
{
|
||||||
|
"name": "Google Calendar Usability",
|
||||||
|
"version": "14.0.1.0.0",
|
||||||
|
"category": "Productivity",
|
||||||
|
"description": "Removes displaying credentials from the general settings view, "
|
||||||
|
"prevents deleting calendar events",
|
||||||
|
"depends": ["google_calendar"],
|
||||||
|
"data": [
|
||||||
|
"views/res_config_settings_views.xml",
|
||||||
|
],
|
||||||
|
"demo": [],
|
||||||
|
"installable": True,
|
||||||
|
"auto_install": False,
|
||||||
|
}
|
||||||
2
google_calendar_usability/models/__init__.py
Normal file
2
google_calendar_usability/models/__init__.py
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
from . import res_config_settings
|
||||||
|
from . import calendar
|
||||||
15
google_calendar_usability/models/calendar.py
Normal file
15
google_calendar_usability/models/calendar.py
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
# Copyright 2021 Akretion (http://www.akretion.com)
|
||||||
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
|
|
||||||
|
from odoo import models
|
||||||
|
|
||||||
|
|
||||||
|
class Meeting(models.Model):
|
||||||
|
_inherit = "calendar.event"
|
||||||
|
|
||||||
|
def unlink(self):
|
||||||
|
to_archive = self.filtered(lambda r: r.google_id and r.active)
|
||||||
|
if to_archive:
|
||||||
|
to_archive.write({"active": False})
|
||||||
|
to_unlink = self - to_archive
|
||||||
|
super(Meeting, to_unlink).unlink()
|
||||||
32
google_calendar_usability/models/res_config_settings.py
Normal file
32
google_calendar_usability/models/res_config_settings.py
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
# Copyright 2021 Akretion (http://www.akretion.com)
|
||||||
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
|
|
||||||
|
from odoo import fields, models
|
||||||
|
|
||||||
|
|
||||||
|
class ResConfigSettings(models.TransientModel):
|
||||||
|
_inherit = "res.config.settings"
|
||||||
|
|
||||||
|
dummy_cal_client_id = fields.Char(
|
||||||
|
"Client_id",
|
||||||
|
compute="_compute_dummy_gcal_credentials",
|
||||||
|
inverse="_inverse_dummy_cal_client_id",
|
||||||
|
)
|
||||||
|
dummy_cal_client_secret = fields.Char(
|
||||||
|
"Client_key",
|
||||||
|
compute="_compute_dummy_gcal_credentials",
|
||||||
|
inverse="_inverse_dummy_cal_client_secret",
|
||||||
|
)
|
||||||
|
|
||||||
|
def _compute_dummy_gcal_credentials(self):
|
||||||
|
for rec in self:
|
||||||
|
rec.dummy_cal_client_id = ""
|
||||||
|
rec.dummy_cal_client_secret = ""
|
||||||
|
|
||||||
|
def _inverse_dummy_cal_client_id(self):
|
||||||
|
for rec in self:
|
||||||
|
rec.cal_client_id = rec.dummy_cal_client_id
|
||||||
|
|
||||||
|
def _inverse_dummy_cal_client_secret(self):
|
||||||
|
for rec in self:
|
||||||
|
rec.cal_client_secret = rec.dummy_cal_client_secret
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<odoo>
|
||||||
|
|
||||||
|
<record id="res_config_settings_view_form" model="ir.ui.view">
|
||||||
|
<field name="model">res.config.settings</field>
|
||||||
|
<field name="inherit_id" ref="base_setup.res_config_settings_view_form"/>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<xpath expr="//field[@name='cal_client_id']" position="replace">
|
||||||
|
<field name="dummy_cal_client_id" nolabel="1"/>
|
||||||
|
</xpath>
|
||||||
|
<xpath expr="//label[@for='cal_client_id']" position="replace">
|
||||||
|
<label for="dummy_cal_client_id" string="Client ID" class="col-3 col-lg-3 o_light_label"/>
|
||||||
|
</xpath>
|
||||||
|
<xpath expr="//field[@name='cal_client_secret']" position="replace">
|
||||||
|
<field name="dummy_cal_client_secret" nolabel="1"/>
|
||||||
|
</xpath>
|
||||||
|
<xpath expr="//label[@for='cal_client_secret']" position="replace">
|
||||||
|
<label for="dummy_cal_client_secret" string="Client Secret" class="col-3 col-lg-3 o_light_label"/>
|
||||||
|
</xpath>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
</odoo>
|
||||||
|
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
# Copyright 2021 Akretion (http://www.akretion.com)
|
|
||||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
'name': 'POS Product Tree Default',
|
|
||||||
'version': '14.0.1.0.0',
|
|
||||||
'category': 'Product',
|
|
||||||
'license': 'AGPL-3',
|
|
||||||
'summary': 'Tree view by default instead of kanban for Products',
|
|
||||||
'description': """
|
|
||||||
Replace default kanban view by tree view for product menu in Point of Sale
|
|
||||||
main menu
|
|
||||||
""",
|
|
||||||
'author': 'Akretion',
|
|
||||||
'website': 'http://www.akretion.com',
|
|
||||||
'depends': ['point_of_sale'],
|
|
||||||
'data': [
|
|
||||||
'views/product_template.xml'
|
|
||||||
],
|
|
||||||
'installable': True,
|
|
||||||
}
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
|
|
||||||
<odoo>
|
|
||||||
|
|
||||||
<record id="point_of_sale.product_template_action_pos_product" model="ir.actions.act_window">
|
|
||||||
<field name="view_mode">tree,form,kanban,activity</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
</odoo>
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
from . import models
|
|
||||||
|
|||||||
@@ -1,10 +1,8 @@
|
|||||||
# Copyright 2014-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).
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
|
|
||||||
{
|
{
|
||||||
"name": "POS Usability",
|
"name": "POS Usability",
|
||||||
"version": "14.0.1.0.0",
|
"version": "12.0.1.0.0",
|
||||||
"category": "Point of sale",
|
"category": "Point of sale",
|
||||||
"license": "AGPL-3",
|
"license": "AGPL-3",
|
||||||
"summary": "Misc usability improvement for point of sale",
|
"summary": "Misc usability improvement for point of sale",
|
||||||
@@ -26,10 +24,6 @@ Akretion:
|
|||||||
"author": "Akretion",
|
"author": "Akretion",
|
||||||
"website": "http://www.akretion.com",
|
"website": "http://www.akretion.com",
|
||||||
"depends": ["point_of_sale"],
|
"depends": ["point_of_sale"],
|
||||||
"data": [
|
"data": ["report/pos.xml"],
|
||||||
"report/pos.xml",
|
"installable": False,
|
||||||
"views/pos_category.xml",
|
|
||||||
"views/product.xml",
|
|
||||||
],
|
|
||||||
"installable": True,
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +0,0 @@
|
|||||||
from . import product
|
|
||||||
from . import pos_category
|
|
||||||
from . import pos_payment_method
|
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
# Copyright 2017-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).
|
|
||||||
|
|
||||||
from odoo import fields, models
|
|
||||||
|
|
||||||
|
|
||||||
class PosCategory(models.Model):
|
|
||||||
_inherit = 'pos.category'
|
|
||||||
|
|
||||||
product_count = fields.Integer(
|
|
||||||
'# Products', compute='_compute_product_count',
|
|
||||||
help="The number of products under this point of sale category "
|
|
||||||
"(does not consider the children categories)")
|
|
||||||
|
|
||||||
# inspired by the code of odoo/addons/product/models/product.py
|
|
||||||
def _compute_product_count(self):
|
|
||||||
read_group_res = self.env['product.template'].read_group(
|
|
||||||
[('pos_categ_id', 'in', self.ids)],
|
|
||||||
['pos_categ_id'], ['pos_categ_id'])
|
|
||||||
group_data = dict(
|
|
||||||
(data['pos_categ_id'][0], data['pos_categ_id_count']) for data
|
|
||||||
in read_group_res)
|
|
||||||
for pos_categ in self:
|
|
||||||
pos_categ.product_count = group_data.get(pos_categ.id, 0)
|
|
||||||
@@ -1,12 +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).
|
|
||||||
|
|
||||||
from odoo import fields, models
|
|
||||||
|
|
||||||
|
|
||||||
class PosPaymentMethod(models.Model):
|
|
||||||
_inherit = 'pos.payment.method'
|
|
||||||
_check_company_auto = True
|
|
||||||
|
|
||||||
cash_journal_id = fields.Many2one(check_company=True)
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
# Copyright 2017-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).
|
|
||||||
|
|
||||||
from odoo import fields, models
|
|
||||||
|
|
||||||
|
|
||||||
class ProductTemplate(models.Model):
|
|
||||||
_inherit = 'product.template'
|
|
||||||
|
|
||||||
available_in_pos = fields.Boolean(tracking=True)
|
|
||||||
pos_categ_id = fields.Many2one(tracking=True)
|
|
||||||
@@ -1,35 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
Copyright 2015-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).
|
|
||||||
-->
|
|
||||||
|
|
||||||
<odoo>
|
|
||||||
|
|
||||||
|
|
||||||
<record id="product_pos_category_form_view" model="ir.ui.view">
|
|
||||||
<field name="name">pos_usability.pos.category.form</field>
|
|
||||||
<field name="model">pos.category</field>
|
|
||||||
<field name="inherit_id" ref="point_of_sale.product_pos_category_form_view"/>
|
|
||||||
<field name="arch" type="xml">
|
|
||||||
<div class="oe_title" position="before">
|
|
||||||
<div class="oe_button_box" name="button_box">
|
|
||||||
<button class="oe_stat_button"
|
|
||||||
name="%(product.product_template_action_all)d"
|
|
||||||
icon="fa-th-list"
|
|
||||||
type="action"
|
|
||||||
context="{'search_default_pos_categ_id': active_id}">
|
|
||||||
<div class="o_form_field o_stat_info">
|
|
||||||
<span class="o_stat_value"><field name="product_count"/></span>
|
|
||||||
<span class="o_stat_text"> Products</span>
|
|
||||||
</div>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
|
|
||||||
</odoo>
|
|
||||||
@@ -1,43 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
Copyright 2015-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).
|
|
||||||
-->
|
|
||||||
|
|
||||||
<odoo>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- put option "available in POS" at the top of product form view -->
|
|
||||||
<record id="product_template_form_view" model="ir.ui.view">
|
|
||||||
<field name="name">usability.pos.product.template</field>
|
|
||||||
<field name="model">product.template</field>
|
|
||||||
<field name="inherit_id" ref="point_of_sale.product_template_form_view"/>
|
|
||||||
<field name="arch" type="xml">
|
|
||||||
<xpath expr="//group[@name='pos']//field[@name='available_in_pos']" position="replace"/>
|
|
||||||
<xpath expr="//div[@name='options']//field[@name='sale_ok']/.." position="after">
|
|
||||||
<div name="available_in_pos">
|
|
||||||
<field name="available_in_pos"/>
|
|
||||||
<label for="available_in_pos"/>
|
|
||||||
</div>
|
|
||||||
</xpath>
|
|
||||||
</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
<record id="product_template_search_view" model="ir.ui.view">
|
|
||||||
<field name="name">pos_usability.product.template.search</field>
|
|
||||||
<field name="model">product.template</field>
|
|
||||||
<field name="inherit_id" ref="product.product_template_search_view"/>
|
|
||||||
<field name="arch" type="xml">
|
|
||||||
<field name="categ_id" position="after">
|
|
||||||
<field name="pos_categ_id" filter_domain="[('pos_categ_id', 'child_of', raw_value)]"/>
|
|
||||||
</field>
|
|
||||||
<filter name="categ_id" position="after">
|
|
||||||
<filter name="pos_categ_groupby" string="Point of Sale Category" context="{'group_by': 'pos_categ_id'}"/>
|
|
||||||
</filter>
|
|
||||||
</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
|
|
||||||
</odoo>
|
|
||||||
@@ -23,7 +23,7 @@
|
|||||||
|
|
||||||
{
|
{
|
||||||
'name': 'Product no Translation',
|
'name': 'Product no Translation',
|
||||||
'version': '14.0.1.0.0',
|
'version': '12.0.0.0.1',
|
||||||
'category': 'Sales Management',
|
'category': 'Sales Management',
|
||||||
'license': 'AGPL-3',
|
'license': 'AGPL-3',
|
||||||
'summary': 'For companies that work with only one language',
|
'summary': 'For companies that work with only one language',
|
||||||
@@ -37,5 +37,5 @@ And it reduces the start time of the Point of Sale !
|
|||||||
'author': 'Akretion',
|
'author': 'Akretion',
|
||||||
'website': 'http://www.akretion.com',
|
'website': 'http://www.akretion.com',
|
||||||
'depends': ['product'],
|
'depends': ['product'],
|
||||||
'installable': True,
|
'installable': False,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,6 +31,13 @@ class ProductTemplate(models.Model):
|
|||||||
description = fields.Text(translate=False)
|
description = fields.Text(translate=False)
|
||||||
name = fields.Char(translate=False)
|
name = fields.Char(translate=False)
|
||||||
|
|
||||||
|
|
||||||
|
class ProductCategory(models.Model):
|
||||||
|
_inherit = "product.category"
|
||||||
|
|
||||||
|
name = fields.Char(translate=False)
|
||||||
|
|
||||||
|
|
||||||
class ProductAttribute(models.Model):
|
class ProductAttribute(models.Model):
|
||||||
_inherit = "product.attribute"
|
_inherit = "product.attribute"
|
||||||
|
|
||||||
|
|||||||
@@ -1,2 +1,3 @@
|
|||||||
from . import models
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
from . import wizard
|
from . import wizard
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ This module adds a wizard on product.product form view which allows to generate
|
|||||||
* regular product barcode stickers. These stickers will show:
|
* regular product barcode stickers. These stickers will show:
|
||||||
* product name
|
* product name
|
||||||
* product price
|
* product price
|
||||||
* EAN13 or EAN8 barcode
|
* EAN13 barcode
|
||||||
|
|
||||||
* price/weight barcode stickers. These stickers will show:
|
* price/weight barcode stickers. These stickers will show:
|
||||||
* product name
|
* product name
|
||||||
@@ -26,8 +26,6 @@ This module adds a wizard on product.product form view which allows to generate
|
|||||||
* price per kg
|
* price per kg
|
||||||
* EAN13 barcode
|
* EAN13 barcode
|
||||||
|
|
||||||
It also allows to generate a private barcode for products without barcode. For that, you must configure the sequence "private.product.barcode". This sequence must be configured to produce 12 digits (for EAN13) or 7 digits (for EAN8) ; the checksum will be added automatically.
|
|
||||||
|
|
||||||
This module has been written by Alexis de Lattre from Akretion
|
This module has been written by Alexis de Lattre from Akretion
|
||||||
<alexis.delattre@akretion.com>.
|
<alexis.delattre@akretion.com>.
|
||||||
""",
|
""",
|
||||||
@@ -45,7 +43,6 @@ This module has been written by Alexis de Lattre from Akretion
|
|||||||
'security/ir.model.access.csv',
|
'security/ir.model.access.csv',
|
||||||
'wizard/product_print_zpl_barcode_view.xml',
|
'wizard/product_print_zpl_barcode_view.xml',
|
||||||
'views/product.xml',
|
'views/product.xml',
|
||||||
'data/barcode_sequence.xml',
|
|
||||||
],
|
],
|
||||||
'installable': True,
|
'installable': True,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,26 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
|
|
||||||
<odoo>
|
|
||||||
<data noupdate="1">
|
|
||||||
|
|
||||||
<!--
|
|
||||||
GS1 prefixes : https://www.gs1.org/standards/id-keys/company-prefix
|
|
||||||
200 - 299 : Used to issue GS1 Restricted Circulation Numbers
|
|
||||||
within a geographic region (MO defined)
|
|
||||||
21, 22 and 23 are already used by Odoo for Weight, Price & Discount barcodes
|
|
||||||
So I use 298 by default
|
|
||||||
Another option would to be use a small country at the other side of the world,
|
|
||||||
for example 623 : Brunei
|
|
||||||
-->
|
|
||||||
<record id="private_product_barcode_seq" model="ir.sequence">
|
|
||||||
<field name="name">Private Product Barcode</field>
|
|
||||||
<field name="code">private.product.barcode</field>
|
|
||||||
<field name="prefix">298</field>
|
|
||||||
<field name="padding">9</field>
|
|
||||||
<field name="number_next">1</field>
|
|
||||||
<field name="company_id" eval="False"/>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
|
|
||||||
</data>
|
|
||||||
</odoo>
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
from . import product
|
|
||||||
@@ -1,67 +0,0 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
# Copyright 2020 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).
|
|
||||||
|
|
||||||
from odoo import api, fields, models, _
|
|
||||||
from odoo.exceptions import UserError
|
|
||||||
from stdnum.ean import calc_check_digit
|
|
||||||
|
|
||||||
|
|
||||||
class ProductTemplate(models.Model):
|
|
||||||
_inherit = "product.template"
|
|
||||||
|
|
||||||
must_print_barcode = fields.Boolean(
|
|
||||||
string="Must Print Barcode",
|
|
||||||
help="Enable that option for products for which you must "
|
|
||||||
"print a barcode upon reception in stock.")
|
|
||||||
|
|
||||||
def generate_barcode_from_product_template(self):
|
|
||||||
self.ensure_one()
|
|
||||||
if self.product_variant_count != 1:
|
|
||||||
raise UserError(_(
|
|
||||||
"You cannot call the method "
|
|
||||||
"generate_barcode_from_product_template on product '%s' "
|
|
||||||
"because it has %d variants and not just one.")
|
|
||||||
% (self.display_name, self.product_variant_count))
|
|
||||||
return self.product_variant_ids[0].generate_barcode_from_product_product()
|
|
||||||
|
|
||||||
def print_zpl_barcode_from_product_template(self):
|
|
||||||
self.ensure_one()
|
|
||||||
if self.product_variant_count != 1:
|
|
||||||
raise UserError(_(
|
|
||||||
"You cannot call the method "
|
|
||||||
"print_zpl_barcode_from_product_template on product '%s' "
|
|
||||||
"because it has %d variants and not just one.")
|
|
||||||
% (self.display_name, self.product_variant_count))
|
|
||||||
action = self.env.ref(
|
|
||||||
'product_print_zpl_barcode.product_print_zpl_barcode_action').sudo().read()[0]
|
|
||||||
action['context'] = {
|
|
||||||
'active_id': self.product_variant_ids[0].id,
|
|
||||||
'active_model': 'product.product',
|
|
||||||
}
|
|
||||||
return action
|
|
||||||
|
|
||||||
|
|
||||||
class ProductProduct(models.Model):
|
|
||||||
_inherit = 'product.product'
|
|
||||||
|
|
||||||
def generate_barcode_from_product_product(self):
|
|
||||||
self.ensure_one()
|
|
||||||
if self.barcode:
|
|
||||||
raise UserError(_(
|
|
||||||
"The product '%s' already has a barcode.") % self.display_name)
|
|
||||||
barcode_without_checksum = self.env['ir.sequence'].next_by_code(
|
|
||||||
'private.product.barcode')
|
|
||||||
if len(barcode_without_checksum) not in (7, 12):
|
|
||||||
raise UserError(_(
|
|
||||||
"The sequence 'private.product.barcode' is not properly "
|
|
||||||
"configured. The generated sequence should have 7 digits "
|
|
||||||
"(for EAN-8) or 12 digits (for EAN-13). "
|
|
||||||
"It currently has %d digits." % len(barcode_without_checksum)))
|
|
||||||
checksum = calc_check_digit(barcode_without_checksum)
|
|
||||||
barcode = barcode_without_checksum + str(checksum)
|
|
||||||
self.write({
|
|
||||||
'barcode': barcode,
|
|
||||||
'must_print_barcode': True,
|
|
||||||
})
|
|
||||||
@@ -1,45 +1,20 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<!--
|
<!--
|
||||||
Copyright 2020-2021 Akretion France (http://www.akretion.com/)
|
© 2016 Akretion (http://www.akretion.com/)
|
||||||
@author Alexis de Lattre <alexis.delattre@akretion.com>
|
@author Alexis de Lattre <alexis.delattre@akretion.com>
|
||||||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<odoo>
|
<odoo>
|
||||||
|
|
||||||
<record id="product_template_form_view" model="ir.ui.view">
|
|
||||||
<field name="model">product.template</field>
|
|
||||||
<field name="inherit_id" ref="product.product_template_form_view"/>
|
|
||||||
<field name="arch" type="xml">
|
|
||||||
<div name="options" position="inside">
|
|
||||||
<div id="must_print_barcode">
|
|
||||||
<field name="must_print_barcode"/>
|
|
||||||
<label for="must_print_barcode"/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
|
|
||||||
<record id="product_template_only_form_view" model="ir.ui.view">
|
|
||||||
<field name="model">product.template</field>
|
|
||||||
<field name="inherit_id" ref="product.product_template_only_form_view"/>
|
|
||||||
<field name="arch" type="xml">
|
|
||||||
<header position="inside">
|
|
||||||
<button name="generate_barcode_from_product_template" type="object" string="Generate Barcode" attrs="{'invisible': ['|', ('product_variant_count', '>', 1), ('barcode', '!=', False)]}"/>
|
|
||||||
<button name="print_zpl_barcode_from_product_template" type="object" string="Print Barcode" groups="base_report_to_printer.printing_group_user" attrs="{'invisible': ['|', ('product_variant_count', '>', 1), ('barcode', '=', False)]}"/>
|
|
||||||
</header>
|
|
||||||
</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
|
|
||||||
<record id="product_normal_form_view" model="ir.ui.view">
|
<record id="product_normal_form_view" model="ir.ui.view">
|
||||||
|
<field name="name">generate.weight.price.barcode.product.product.form</field>
|
||||||
<field name="model">product.product</field>
|
<field name="model">product.product</field>
|
||||||
<field name="inherit_id" ref="product.product_normal_form_view" />
|
<field name="inherit_id" ref="product.product_normal_form_view" />
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<header position="inside">
|
<header position="inside">
|
||||||
<button name="generate_barcode_from_product_product" type="object" string="Generate Barcode" attrs="{'invisible': [('barcode', '!=', False)]}"/>
|
<button name="%(product_print_zpl_barcode.product_print_zpl_barcode_action)d" type="action" string="Print Barcode" groups="base_report_to_printer.printing_group_user"/>
|
||||||
<button name="%(product_print_zpl_barcode.product_print_zpl_barcode_action)d" type="action" string="Print Barcode" groups="base_report_to_printer.printing_group_user" attrs="{'invisible': [('barcode', '=', False)]}"/>
|
|
||||||
</header>
|
</header>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|||||||
@@ -5,7 +5,6 @@
|
|||||||
from odoo import api, fields, models, _
|
from odoo import api, fields, models, _
|
||||||
from odoo.exceptions import UserError
|
from odoo.exceptions import UserError
|
||||||
from odoo.tools import float_compare, float_is_zero
|
from odoo.tools import float_compare, float_is_zero
|
||||||
from stdnum.ean import is_valid
|
|
||||||
import base64
|
import base64
|
||||||
import re
|
import re
|
||||||
|
|
||||||
@@ -173,8 +172,7 @@ class ProductPrintZplBarcode(models.TransientModel):
|
|||||||
# print "barcode FINAL=", barcode
|
# print "barcode FINAL=", barcode
|
||||||
zpl_unicode = self._price_weight_barcode_type_zpl() % {
|
zpl_unicode = self._price_weight_barcode_type_zpl() % {
|
||||||
'product_name': self.product_name,
|
'product_name': self.product_name,
|
||||||
'ean_zpl_command': len(self.barcode) == 8 and 'B8' or 'BE',
|
'ean13_no_checksum': barcode[:12],
|
||||||
'ean_no_checksum': barcode[:-1],
|
|
||||||
'price_uom': self.price_uom,
|
'price_uom': self.price_uom,
|
||||||
'price': self.price,
|
'price': self.price,
|
||||||
'currency_symbol': self.currency_id.symbol,
|
'currency_symbol': self.currency_id.symbol,
|
||||||
@@ -191,7 +189,7 @@ class ProductPrintZplBarcode(models.TransientModel):
|
|||||||
|
|
||||||
@api.model
|
@api.model
|
||||||
def _price_weight_barcode_type_zpl(self):
|
def _price_weight_barcode_type_zpl(self):
|
||||||
label = """
|
label = u"""
|
||||||
^XA
|
^XA
|
||||||
^CI28
|
^CI28
|
||||||
^PW304
|
^PW304
|
||||||
@@ -203,7 +201,7 @@ class ProductPrintZplBarcode(models.TransientModel):
|
|||||||
^FO15,30^FB270,3,0,C^FD%(product_name)s^FS
|
^FO15,30^FB270,3,0,C^FD%(product_name)s^FS
|
||||||
^CF0,25
|
^CF0,25
|
||||||
^FO15,75^FB270,1,0,C^FD%(quantity).3f %(uom_name)s %(price_uom).2f %(currency_symbol)s/%(uom_name)s^FS
|
^FO15,75^FB270,1,0,C^FD%(quantity).3f %(uom_name)s %(price_uom).2f %(currency_symbol)s/%(uom_name)s^FS
|
||||||
^FO60,110^%(ean_zpl_command)sN,50^FD%(ean_no_checksum)s^FS
|
^FO60,110^BEN,50^FD%(ean13_no_checksum)s^FS
|
||||||
^PQ%(copies)s
|
^PQ%(copies)s
|
||||||
^XZ
|
^XZ
|
||||||
"""
|
"""
|
||||||
@@ -211,7 +209,7 @@ class ProductPrintZplBarcode(models.TransientModel):
|
|||||||
|
|
||||||
@api.model
|
@api.model
|
||||||
def _product_barcode_type_zpl(self):
|
def _product_barcode_type_zpl(self):
|
||||||
label = """
|
label = u"""
|
||||||
^XA
|
^XA
|
||||||
^CI28
|
^CI28
|
||||||
^PW304
|
^PW304
|
||||||
@@ -221,7 +219,7 @@ class ProductPrintZplBarcode(models.TransientModel):
|
|||||||
^FO15,0^FB270,1,0,C^FD%(price_uom).2f %(currency_symbol)s^FS
|
^FO15,0^FB270,1,0,C^FD%(price_uom).2f %(currency_symbol)s^FS
|
||||||
^CF0,20
|
^CF0,20
|
||||||
^FO15,30^FB270,3,0,C^FD%(product_name)s^FS
|
^FO15,30^FB270,3,0,C^FD%(product_name)s^FS
|
||||||
^FO60,100^%(ean_zpl_command)sN,60^FD%(ean_no_checksum)s^FS
|
^FO60,100^BEN,60^FD%(ean13_no_checksum)s^FS
|
||||||
^PQ%(copies)s
|
^PQ%(copies)s
|
||||||
^XZ
|
^XZ
|
||||||
"""
|
"""
|
||||||
@@ -230,8 +228,7 @@ class ProductPrintZplBarcode(models.TransientModel):
|
|||||||
def _prepare_product_barcode_type(self):
|
def _prepare_product_barcode_type(self):
|
||||||
zpl_unicode = self._product_barcode_type_zpl() % {
|
zpl_unicode = self._product_barcode_type_zpl() % {
|
||||||
'product_name': self.product_name,
|
'product_name': self.product_name,
|
||||||
'ean_zpl_command': len(self.barcode) == 8 and 'B8' or 'BE',
|
'ean13_no_checksum': self.barcode[:12],
|
||||||
'ean_no_checksum': self.barcode[:-1],
|
|
||||||
'price_uom': self.price_uom,
|
'price_uom': self.price_uom,
|
||||||
'currency_symbol': self.currency_id.symbol, # symbol is a required field
|
'currency_symbol': self.currency_id.symbol, # symbol is a required field
|
||||||
'copies': self.copies,
|
'copies': self.copies,
|
||||||
@@ -245,16 +242,12 @@ class ProductPrintZplBarcode(models.TransientModel):
|
|||||||
|
|
||||||
def generate(self):
|
def generate(self):
|
||||||
assert self.barcode
|
assert self.barcode
|
||||||
if len(self.barcode) not in (8, 13):
|
if len(self.barcode) != 13:
|
||||||
raise UserError(_(
|
raise UserError(_(
|
||||||
"This wizard only supports EAN8 and EAN13 for the moment. "
|
"This wizard only supports EAN13 for the moment. Barcode '%s' "
|
||||||
"Barcode '%s' has %d digits.") % (
|
"has %d digits instead of 13") % (
|
||||||
self.barcode,
|
self.barcode,
|
||||||
len(self.barcode)))
|
len(self.barcode)))
|
||||||
if not is_valid(self.barcode):
|
|
||||||
raise UserError(_(
|
|
||||||
"The barcode '%s' is not a valid EAN barcode "
|
|
||||||
"(wrong checksum).") % self.barcode)
|
|
||||||
if not self.copies:
|
if not self.copies:
|
||||||
raise UserError(_("The number of copies cannot be 0"))
|
raise UserError(_("The number of copies cannot be 0"))
|
||||||
if self.barcode_type in ('price', 'weight'):
|
if self.barcode_type in ('price', 'weight'):
|
||||||
@@ -270,7 +263,7 @@ class ProductPrintZplBarcode(models.TransientModel):
|
|||||||
'zpl_filename': 'barcode_%s.zpl' % vals['barcode'],
|
'zpl_filename': 'barcode_%s.zpl' % vals['barcode'],
|
||||||
})
|
})
|
||||||
self.write(vals)
|
self.write(vals)
|
||||||
action = self.env.ref('product_print_zpl_barcode.product_print_zpl_barcode_action').sudo().read()[0]
|
action = self.env.ref('product_print_zpl_barcode.product_print_zpl_barcode_action').read()[0]
|
||||||
action.update({
|
action.update({
|
||||||
'res_id': self.id,
|
'res_id': self.id,
|
||||||
'context': self._context,
|
'context': self._context,
|
||||||
@@ -285,7 +278,7 @@ class ProductPrintZplBarcode(models.TransientModel):
|
|||||||
self.zpl_filename, base64.decodebytes(self.zpl_file), format='raw')
|
self.zpl_filename, base64.decodebytes(self.zpl_file), format='raw')
|
||||||
action = True
|
action = True
|
||||||
if self._context.get('print_and_new'):
|
if self._context.get('print_and_new'):
|
||||||
action = self.env.ref('product_print_zpl_barcode.product_print_zpl_barcode_action').sudo().read()[0]
|
action = self.env.ref('product_print_zpl_barcode.product_print_zpl_barcode_action').read()[0]
|
||||||
action.update({
|
action.update({
|
||||||
'views': False,
|
'views': False,
|
||||||
'context': self._context,
|
'context': self._context,
|
||||||
|
|||||||
@@ -14,16 +14,25 @@ class ProductTemplate(models.Model):
|
|||||||
# in v10, that field was defined in procurement_suggest, but we will
|
# in v10, that field was defined in procurement_suggest, but we will
|
||||||
# probably not port procurement_suggest because it is native in v14
|
# probably not port procurement_suggest because it is native in v14
|
||||||
seller_id = fields.Many2one(
|
seller_id = fields.Many2one(
|
||||||
'res.partner', related='seller_ids.name', store=True,
|
'res.partner', related='seller_ids.name', string='Main Supplier')
|
||||||
string='Main Supplier')
|
|
||||||
|
|
||||||
# in v14, I noticed that the tracking of the fields of product.template
|
# name = fields.Char(
|
||||||
# are only shown in the form view of product.template, not in the form
|
# track_visibility='onchange')
|
||||||
# view of product.product
|
|
||||||
name = fields.Char(tracking=10)
|
# type = fields.Selection(
|
||||||
categ_id = fields.Many2one(tracking=20)
|
# track_visibility='onchange')
|
||||||
type = fields.Selection(tracking=30)
|
|
||||||
list_price = fields.Float(tracking=40)
|
# categ_id = fields.Many2one(
|
||||||
sale_ok = fields.Boolean(tracking=50)
|
# track_visibility='onchange')
|
||||||
purchase_ok = fields.Boolean(tracking=60)
|
|
||||||
active = fields.Boolean(tracking=70)
|
# list_price = fields.Float(
|
||||||
|
# track_visibility='onchange')
|
||||||
|
|
||||||
|
# sale_ok = fields.Boolean(
|
||||||
|
# track_visibility='onchange')
|
||||||
|
|
||||||
|
# purchase_ok = fields.Boolean(
|
||||||
|
# track_visibility='onchange')
|
||||||
|
|
||||||
|
# active = fields.Boolean(
|
||||||
|
# track_visibility='onchange')
|
||||||
|
|||||||
@@ -17,15 +17,4 @@
|
|||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<record id="product_supplierinfo_tree_view" model="ir.ui.view">
|
|
||||||
<field name="model">product.supplierinfo</field>
|
|
||||||
<field name="inherit_id" ref="product.product_supplierinfo_tree_view"/>
|
|
||||||
<field name="arch" type="xml">
|
|
||||||
<field name="product_code" position="attributes">
|
|
||||||
<attribute name="optional">show</attribute>
|
|
||||||
</field>
|
|
||||||
</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
|
|
||||||
</odoo>
|
</odoo>
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
{
|
{
|
||||||
'name': 'Purchase Product Tree Default',
|
'name': 'Purchase Product Tree Default',
|
||||||
'version': '14.0.1.0.0',
|
'version': '12.0.1.0.0',
|
||||||
'category': 'Product',
|
'category': 'Product',
|
||||||
'license': 'AGPL-3',
|
'license': 'AGPL-3',
|
||||||
'summary': 'Tree view by default instead of kanban for Products',
|
'summary': 'Tree view by default instead of kanban for Products',
|
||||||
@@ -18,5 +18,5 @@
|
|||||||
'data': [
|
'data': [
|
||||||
'views/product_template.xml'
|
'views/product_template.xml'
|
||||||
],
|
],
|
||||||
'installable': True,
|
'installable': False,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
from . import models
|
from . import purchase
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
# Copyright (C) 2014-2021 Akretion (http://www.akretion.com)
|
# Copyright (C) 2014-2019 Akretion (http://www.akretion.com)
|
||||||
# @author Alexis de Lattre <alexis.delattre@akretion.com>
|
# @author Alexis de Lattre <alexis.delattre@akretion.com>
|
||||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
|
|
||||||
{
|
{
|
||||||
'name': 'Purchase Stock Usability',
|
'name': 'Purchase Stock Usability',
|
||||||
'version': '14.0.1.0.0',
|
'version': '12.0.1.0.0',
|
||||||
'category': 'Purchases',
|
'category': 'Purchases',
|
||||||
'license': 'AGPL-3',
|
'license': 'AGPL-3',
|
||||||
'summary': 'Usability improvements on purchase_stock module',
|
'summary': 'Usability improvements on purchase_stock module',
|
||||||
@@ -23,7 +23,7 @@ Please contact Alexis de Lattre from Akretion <alexis.delattre@akretion.com> for
|
|||||||
'purchase_usability',
|
'purchase_usability',
|
||||||
],
|
],
|
||||||
'data': [
|
'data': [
|
||||||
'views/stock_picking.xml',
|
'stock_view.xml',
|
||||||
],
|
],
|
||||||
'installable': True,
|
'installable': False,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
from . import purchase
|
|
||||||
@@ -1,15 +1,16 @@
|
|||||||
# Copyright 2015-2021 Akretion France (http://www.akretion.com)
|
# -*- coding: utf-8 -*-
|
||||||
|
# Copyright 2015-2019 Akretion France (http://www.akretion.com)
|
||||||
# @author Alexis de Lattre <alexis.delattre@akretion.com>
|
# @author Alexis de Lattre <alexis.delattre@akretion.com>
|
||||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
|
|
||||||
from odoo import api, fields, models
|
from odoo import models, fields, api
|
||||||
|
|
||||||
|
|
||||||
class PurchaseOrder(models.Model):
|
class PurchaseOrder(models.Model):
|
||||||
_inherit = 'purchase.order'
|
_inherit = 'purchase.order'
|
||||||
|
|
||||||
picking_type_id = fields.Many2one(tracking=True)
|
picking_type_id = fields.Many2one(track_visibility='onchange')
|
||||||
incoterm_id = fields.Many2one(tracking=True)
|
incoterm_id = fields.Many2one(track_visibility='onchange')
|
||||||
|
|
||||||
# inherit compute method of the field delivery_partner_id
|
# inherit compute method of the field delivery_partner_id
|
||||||
# defined in purchase_usability
|
# defined in purchase_usability
|
||||||
@@ -1,15 +1,14 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<!--
|
<!--
|
||||||
Copyright 2017-2021 Akretion (http://www.akretion.com/)
|
Copyright (C) 2017-2019 Akretion (http://www.akretion.com/)
|
||||||
@author: Alexis de Lattre <alexis.delattre@akretion.com>
|
@author: Alexis de Lattre <alexis.delattre@akretion.com>
|
||||||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<odoo>
|
<odoo>
|
||||||
|
|
||||||
|
|
||||||
<record id="view_picking_form" model="ir.ui.view">
|
<record id="view_picking_form" model="ir.ui.view">
|
||||||
<field name="name">purchase_stock_usability.stock.picking.form</field>
|
<field name="name">purchase_usability.stock.picking.form</field>
|
||||||
<field name="model">stock.picking</field>
|
<field name="model">stock.picking</field>
|
||||||
<field name="inherit_id" ref="stock.view_picking_form"/>
|
<field name="inherit_id" ref="stock.view_picking_form"/>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
@@ -42,39 +42,3 @@ class PurchaseOrder(models.Model):
|
|||||||
self.env, po.amount_untaxed, currency_obj=po.currency_id)
|
self.env, po.amount_untaxed, currency_obj=po.currency_id)
|
||||||
result.append((po.id, name))
|
result.append((po.id, name))
|
||||||
return result
|
return result
|
||||||
|
|
||||||
# for report
|
|
||||||
def py3o_lines_layout(self):
|
|
||||||
self.ensure_one()
|
|
||||||
res = []
|
|
||||||
has_sections = False
|
|
||||||
subtotal = 0.0
|
|
||||||
for line in self.order_line:
|
|
||||||
if line.display_type == 'line_section':
|
|
||||||
# insert line
|
|
||||||
if has_sections:
|
|
||||||
res.append({'subtotal': subtotal})
|
|
||||||
subtotal = 0.0 # reset counter
|
|
||||||
has_sections = True
|
|
||||||
else:
|
|
||||||
if not line.display_type:
|
|
||||||
subtotal += line.price_subtotal
|
|
||||||
res.append({'line': line})
|
|
||||||
if has_sections: # insert last subtotal line
|
|
||||||
res.append({'subtotal': subtotal})
|
|
||||||
# res:
|
|
||||||
# [
|
|
||||||
# {'line': sale_order_line(1) with display_type=='line_section'},
|
|
||||||
# {'line': sale_order_line(2) without display_type},
|
|
||||||
# {'line': sale_order_line(3) without display_type},
|
|
||||||
# {'line': sale_order_line(4) with display_type=='line_note'},
|
|
||||||
# {'subtotal': 8932.23},
|
|
||||||
# ]
|
|
||||||
return res
|
|
||||||
|
|
||||||
|
|
||||||
class PurchaseOrderLine(models.Model):
|
|
||||||
_inherit = 'purchase.order.line'
|
|
||||||
|
|
||||||
# for optional display in tree view
|
|
||||||
product_barcode = fields.Char(related='product_id.barcode', string="Product Barcode")
|
|
||||||
|
|||||||
@@ -34,9 +34,6 @@
|
|||||||
<xpath expr="//field[@name='order_line']/form//field[@name='analytic_tag_ids']" position="attributes">
|
<xpath expr="//field[@name='order_line']/form//field[@name='analytic_tag_ids']" position="attributes">
|
||||||
<attribute name="groups">analytic.group_analytic_tags</attribute>
|
<attribute name="groups">analytic.group_analytic_tags</attribute>
|
||||||
</xpath>
|
</xpath>
|
||||||
<xpath expr="//field[@name='order_line']/tree//field[@name='product_id']" position="after">
|
|
||||||
<field name="product_barcode" optional="hide"/>
|
|
||||||
</xpath>
|
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
|
|||||||
@@ -5,13 +5,13 @@
|
|||||||
{
|
{
|
||||||
"name": "Sale no optional product",
|
"name": "Sale no optional product",
|
||||||
"summary": "Hide optional product",
|
"summary": "Hide optional product",
|
||||||
"version": "14.0.1.0.0",
|
"version": "12.0.1.0.0",
|
||||||
"category": "Usability",
|
"category": "Usability",
|
||||||
"website": "www.akretion.com",
|
"website": "www.akretion.com",
|
||||||
"author": " Akretion",
|
"author": " Akretion",
|
||||||
"license": "AGPL-3",
|
"license": "AGPL-3",
|
||||||
"application": False,
|
"application": False,
|
||||||
"installable": True,
|
"installable": False,
|
||||||
"external_dependencies": {
|
"external_dependencies": {
|
||||||
"python": [],
|
"python": [],
|
||||||
"bin": [],
|
"bin": [],
|
||||||
@@ -20,6 +20,7 @@
|
|||||||
"sale_management",
|
"sale_management",
|
||||||
],
|
],
|
||||||
"data": [
|
"data": [
|
||||||
|
"views/product_template_view.xml",
|
||||||
"views/sale_order_view.xml",
|
"views/sale_order_view.xml",
|
||||||
],
|
],
|
||||||
"demo": [
|
"demo": [
|
||||||
|
|||||||
14
sale_no_optional_product/views/product_template_view.xml
Normal file
14
sale_no_optional_product/views/product_template_view.xml
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<odoo>
|
||||||
|
|
||||||
|
<record id="product_template_view_form" model="ir.ui.view">
|
||||||
|
<field name="model">product.template</field>
|
||||||
|
<field name="inherit_id" ref="sale.product_template_form_view"/>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<group name="options" position="attributes">
|
||||||
|
<attribute name="invisible"/>
|
||||||
|
</group>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
</odoo>
|
||||||
@@ -5,13 +5,13 @@
|
|||||||
{
|
{
|
||||||
"name": "Sale no preview button",
|
"name": "Sale no preview button",
|
||||||
"summary": "Hide 'preview' from sale",
|
"summary": "Hide 'preview' from sale",
|
||||||
"version": "14.0.1.0.0",
|
"version": "12.0.1.0.0",
|
||||||
"category": "Usabability",
|
"category": "Usabability",
|
||||||
"website": "www.akretion.com",
|
"website": "www.akretion.com",
|
||||||
"author": " Akretion",
|
"author": " Akretion",
|
||||||
"license": "AGPL-3",
|
"license": "AGPL-3",
|
||||||
"application": False,
|
"application": False,
|
||||||
"installable": True,
|
"installable": False,
|
||||||
"external_dependencies": {
|
"external_dependencies": {
|
||||||
"python": [],
|
"python": [],
|
||||||
"bin": [],
|
"bin": [],
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
{
|
{
|
||||||
'name': 'Sale Product Tree Default',
|
'name': 'Sale Product Tree Default',
|
||||||
'version': '14.0.1.0.0',
|
'version': '12.0.1.0.0',
|
||||||
'category': 'Product',
|
'category': 'Product',
|
||||||
'license': 'AGPL-3',
|
'license': 'AGPL-3',
|
||||||
'summary': 'Tree view by default instead of kanban for Products',
|
'summary': 'Tree view by default instead of kanban for Products',
|
||||||
@@ -18,5 +18,5 @@
|
|||||||
'data': [
|
'data': [
|
||||||
'views/product_template.xml'
|
'views/product_template.xml'
|
||||||
],
|
],
|
||||||
'installable': True,
|
'installable': False,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
<record id="sale.product_template_action" model="ir.actions.act_window">
|
<record id="sale.product_template_action" model="ir.actions.act_window">
|
||||||
<field name="view_mode">tree,form,kanban,activity</field>
|
<field name="view_mode">tree,form,kanban,activity</field>
|
||||||
<field name="view_id" eval="False"/>
|
<field name="view_id" ref="product.product_template_tree_view"/>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
</odoo>
|
</odoo>
|
||||||
|
|||||||
@@ -21,9 +21,6 @@ class SaleOrder(models.Model):
|
|||||||
fiscal_position_id = fields.Many2one(tracking=True)
|
fiscal_position_id = fields.Many2one(tracking=True)
|
||||||
# for reports
|
# for reports
|
||||||
has_discount = fields.Boolean(compute='_compute_has_discount')
|
has_discount = fields.Boolean(compute='_compute_has_discount')
|
||||||
has_attachment = fields.Boolean(
|
|
||||||
compute='_compute_has_attachment',
|
|
||||||
search='_search_has_attachment')
|
|
||||||
|
|
||||||
@api.depends('order_line.discount')
|
@api.depends('order_line.discount')
|
||||||
def _compute_has_discount(self):
|
def _compute_has_discount(self):
|
||||||
@@ -37,30 +34,6 @@ class SaleOrder(models.Model):
|
|||||||
break
|
break
|
||||||
order.has_discount = has_discount
|
order.has_discount = has_discount
|
||||||
|
|
||||||
def _compute_has_attachment(self):
|
|
||||||
iao = self.env['ir.attachment']
|
|
||||||
for order in self:
|
|
||||||
if iao.search_count([
|
|
||||||
('res_model', '=', 'sale.order'),
|
|
||||||
('res_id', '=', order.id),
|
|
||||||
('type', '=', 'binary'),
|
|
||||||
('company_id', '=', order.company_id.id)]):
|
|
||||||
order.has_attachment = True
|
|
||||||
else:
|
|
||||||
order.has_attachment = False
|
|
||||||
|
|
||||||
def _search_has_attachment(self, operator, value):
|
|
||||||
att_order_ids = {}
|
|
||||||
if operator == '=':
|
|
||||||
search_res = self.env['ir.attachment'].search_read([
|
|
||||||
('res_model', '=', 'sale.order'),
|
|
||||||
('type', '=', 'binary'),
|
|
||||||
('res_id', '!=', False)], ['res_id'])
|
|
||||||
for att in search_res:
|
|
||||||
att_order_ids[att['res_id']] = True
|
|
||||||
res = [('id', value and 'in' or 'not in', list(att_order_ids))]
|
|
||||||
return res
|
|
||||||
|
|
||||||
# for report
|
# for report
|
||||||
def py3o_lines_layout(self):
|
def py3o_lines_layout(self):
|
||||||
self.ensure_one()
|
self.ensure_one()
|
||||||
@@ -74,8 +47,9 @@ class SaleOrder(models.Model):
|
|||||||
res.append({'subtotal': subtotal})
|
res.append({'subtotal': subtotal})
|
||||||
subtotal = 0.0 # reset counter
|
subtotal = 0.0 # reset counter
|
||||||
has_sections = True
|
has_sections = True
|
||||||
elif not line.display_type:
|
else:
|
||||||
subtotal += line.price_subtotal
|
if not line.display_type:
|
||||||
|
subtotal += line.price_subtotal
|
||||||
res.append({'line': line})
|
res.append({'line': line})
|
||||||
if has_sections: # insert last subtotal line
|
if has_sections: # insert last subtotal line
|
||||||
res.append({'subtotal': subtotal})
|
res.append({'subtotal': subtotal})
|
||||||
@@ -93,10 +67,6 @@ class SaleOrder(models.Model):
|
|||||||
class SaleOrderLine(models.Model):
|
class SaleOrderLine(models.Model):
|
||||||
_inherit = 'sale.order.line'
|
_inherit = 'sale.order.line'
|
||||||
|
|
||||||
# for optional display in tree view
|
|
||||||
product_barcode = fields.Char(
|
|
||||||
related='product_id.barcode', string="Product Barcode")
|
|
||||||
|
|
||||||
@api.onchange('product_uom', 'product_uom_qty')
|
@api.onchange('product_uom', 'product_uom_qty')
|
||||||
def product_uom_change(self):
|
def product_uom_change(self):
|
||||||
# When the user has manually set a custom price
|
# When the user has manually set a custom price
|
||||||
|
|||||||
@@ -26,9 +26,6 @@
|
|||||||
<field name="date_order" position="after">
|
<field name="date_order" position="after">
|
||||||
<field name="client_order_ref"/>
|
<field name="client_order_ref"/>
|
||||||
</field>
|
</field>
|
||||||
<xpath expr="//field[@name='order_line']/tree/field[@name='product_template_id']" position="after">
|
|
||||||
<field name="product_barcode" optional="hide"/>
|
|
||||||
</xpath>
|
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
@@ -65,10 +62,6 @@
|
|||||||
<filter name="order_month" position="after">
|
<filter name="order_month" position="after">
|
||||||
<filter string="State" name="state_groupby" context="{'group_by': 'state'}"/>
|
<filter string="State" name="state_groupby" context="{'group_by': 'state'}"/>
|
||||||
</filter>
|
</filter>
|
||||||
<filter name="activities_upcoming_all" position="after">
|
|
||||||
<separator/>
|
|
||||||
<filter name="no_attachment" string="Missing Attachment" domain="[('has_attachment', '=', False)]"/>
|
|
||||||
</filter>
|
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# Copyright 2019-2021 Akretion France (http://www.akretion.com)
|
# Copyright 2019-2020 Akretion France (http://www.akretion.com)
|
||||||
# @author Alexis de Lattre <alexis.delattre@akretion.com>
|
# @author Alexis de Lattre <alexis.delattre@akretion.com>
|
||||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
|
|
||||||
@@ -15,13 +15,14 @@ Stock Account Usability
|
|||||||
|
|
||||||
The usability enhancements include:
|
The usability enhancements include:
|
||||||
|
|
||||||
- show to_refund on stock.move form view
|
NONE
|
||||||
|
|
||||||
This module has been written by Alexis de Lattre from Akretion <alexis.delattre@akretion.com>.
|
This module has been written by Alexis de Lattre from Akretion <alexis.delattre@akretion.com>.
|
||||||
""",
|
""",
|
||||||
'author': 'Akretion',
|
'author': 'Akretion',
|
||||||
'website': 'http://www.akretion.com',
|
'website': 'http://www.akretion.com',
|
||||||
'depends': ['stock_account', 'stock_usability'],
|
'depends': ['stock_account'],
|
||||||
'data': ['views/stock_move.xml'],
|
'data': [
|
||||||
'installable': True,
|
],
|
||||||
|
'installable': False,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,23 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<!--
|
|
||||||
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).
|
|
||||||
-->
|
|
||||||
|
|
||||||
<odoo>
|
|
||||||
|
|
||||||
|
|
||||||
<record id="view_move_form" model="ir.ui.view">
|
|
||||||
<field name="name">stock_account_usability.stock.move.form</field>
|
|
||||||
<field name="model">stock.move</field>
|
|
||||||
<field name="inherit_id" ref="stock_usability.view_move_form" />
|
|
||||||
<field name="arch" type="xml">
|
|
||||||
<field name="price_unit" position="after">
|
|
||||||
<field name="to_refund" readonly="1"/>
|
|
||||||
</field>
|
|
||||||
</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
|
|
||||||
</odoo>
|
|
||||||
2
stock_account_usability/wizard/__init__.py
Normal file
2
stock_account_usability/wizard/__init__.py
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
from . import stock_return_picking
|
||||||
|
from . import stock_quantity_history
|
||||||
@@ -1,10 +1,10 @@
|
|||||||
# Copyright 2019-2021 Akretion (http://www.akretion.com)
|
# © 2019 Akretion (http://www.akretion.com)
|
||||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
|
|
||||||
|
|
||||||
{
|
{
|
||||||
'name': 'Stock Product Tree Default',
|
'name': 'Stock Product Tree Default',
|
||||||
'version': '14.0.1.0.0',
|
'version': '12.0.1.0.0',
|
||||||
'category': 'Product',
|
'category': 'Product',
|
||||||
'license': 'AGPL-3',
|
'license': 'AGPL-3',
|
||||||
'summary': 'Tree view by default instead of kanban for Products',
|
'summary': 'Tree view by default instead of kanban for Products',
|
||||||
@@ -18,5 +18,5 @@
|
|||||||
'data': [
|
'data': [
|
||||||
'views/product_template.xml'
|
'views/product_template.xml'
|
||||||
],
|
],
|
||||||
'installable': True,
|
'installable': False,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
<record id="stock.product_template_action_product" model="ir.actions.act_window">
|
<record id="stock.product_template_action_product" model="ir.actions.act_window">
|
||||||
<field name="view_mode">tree,form,kanban,activity</field>
|
<field name="view_mode">tree,form,kanban,activity</field>
|
||||||
<field name="view_id" eval="False"/>
|
<field name="view_id" ref="product.product_template_tree_view"/>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
</odoo>
|
</odoo>
|
||||||
|
|||||||
@@ -1,2 +1 @@
|
|||||||
from . import models
|
from . import models
|
||||||
from .post_install import create_config_parameter_immediate_tranfer
|
|
||||||
|
|||||||
@@ -32,12 +32,9 @@ This module has been written by Alexis de Lattre from Akretion <alexis.delattre@
|
|||||||
'views/stock_move.xml',
|
'views/stock_move.xml',
|
||||||
'views/stock_picking.xml',
|
'views/stock_picking.xml',
|
||||||
'views/stock_warehouse.xml',
|
'views/stock_warehouse.xml',
|
||||||
'views/stock_warehouse_orderpoint.xml',
|
|
||||||
'views/product.xml',
|
|
||||||
'views/procurement_group.xml',
|
'views/procurement_group.xml',
|
||||||
'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,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,5 +5,5 @@ from . import stock_warehouse_orderpoint
|
|||||||
from . import stock_quant
|
from . import stock_quant
|
||||||
from . import procurement_group
|
from . import procurement_group
|
||||||
from . import procurement_scheduler_log
|
from . import procurement_scheduler_log
|
||||||
from . import product
|
from . import product_template
|
||||||
from . import res_partner
|
from . import res_partner
|
||||||
|
|||||||
@@ -1,31 +0,0 @@
|
|||||||
# Copyright 2016-2021 Akretion France
|
|
||||||
# @author: Alexis de Lattre <alexis.delattre@akretion.com>
|
|
||||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
|
||||||
|
|
||||||
from odoo import fields, models
|
|
||||||
|
|
||||||
|
|
||||||
class ProductTemplate(models.Model):
|
|
||||||
_inherit = 'product.template'
|
|
||||||
|
|
||||||
tracking = fields.Selection(tracking=True)
|
|
||||||
sale_delay = fields.Float(tracking=True)
|
|
||||||
# the 'stock' module adds 'product' in type...
|
|
||||||
# but forgets to make it the default
|
|
||||||
type = fields.Selection(default='product')
|
|
||||||
|
|
||||||
def action_view_stock_move(self):
|
|
||||||
action = self.env.ref('stock.stock_move_action').sudo().read()[0]
|
|
||||||
action['domain'] = [('product_id.product_tmpl_id', 'in', self.ids)]
|
|
||||||
action['context'] = {'search_default_done': True}
|
|
||||||
return action
|
|
||||||
|
|
||||||
|
|
||||||
class ProductProduct(models.Model):
|
|
||||||
_inherit = 'product.product'
|
|
||||||
|
|
||||||
def action_view_stock_move(self):
|
|
||||||
action = self.env.ref('stock.stock_move_action').sudo().read()[0]
|
|
||||||
action['domain'] = [('product_id', 'in', self.ids)]
|
|
||||||
action['context'] = {'search_default_done': True}
|
|
||||||
return action
|
|
||||||
15
stock_usability/models/product_template.py
Normal file
15
stock_usability/models/product_template.py
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
# Copyright 2016-2020 Akretion France
|
||||||
|
# @author: Alexis de Lattre <alexis.delattre@akretion.com>
|
||||||
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
|
|
||||||
|
from odoo import fields, models
|
||||||
|
|
||||||
|
|
||||||
|
class ProductTemplate(models.Model):
|
||||||
|
_inherit = 'product.template'
|
||||||
|
|
||||||
|
tracking = fields.Selection(tracking=True)
|
||||||
|
sale_delay = fields.Float(tracking=True)
|
||||||
|
# the 'stock' module adds 'product' in type...
|
||||||
|
# but forgets to make it the default
|
||||||
|
type = fields.Selection(default='product')
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
# @author Alexis de Lattre <alexis.delattre@akretion.com>
|
# @author Alexis de Lattre <alexis.delattre@akretion.com>
|
||||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
|
|
||||||
from odoo import fields, models, _
|
from odoo import models, _
|
||||||
from odoo.exceptions import UserError
|
from odoo.exceptions import UserError
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
@@ -12,9 +12,6 @@ logger = logging.getLogger(__name__)
|
|||||||
class StockMove(models.Model):
|
class StockMove(models.Model):
|
||||||
_inherit = 'stock.move'
|
_inherit = 'stock.move'
|
||||||
|
|
||||||
# for optional display in tree view
|
|
||||||
product_barcode = fields.Char(related='product_id.barcode', string="Product Barcode")
|
|
||||||
|
|
||||||
# def name_get(self):
|
# def name_get(self):
|
||||||
# '''name_get of stock_move is important for the reservation of the
|
# '''name_get of stock_move is important for the reservation of the
|
||||||
# quants: so want to add the name of the customer and the expected date
|
# quants: so want to add the name of the customer and the expected date
|
||||||
@@ -40,7 +37,7 @@ class StockMove(models.Model):
|
|||||||
picking = move.picking_id
|
picking = move.picking_id
|
||||||
if picking:
|
if picking:
|
||||||
product = move.product_id
|
product = move.product_id
|
||||||
picking.message_post(body=_(
|
picking.message_post(_(
|
||||||
"Product <a href=# data-oe-model=product.product "
|
"Product <a href=# data-oe-model=product.product "
|
||||||
"data-oe-id=%d>%s</a> qty %s %s <b>unreserved</b>")
|
"data-oe-id=%d>%s</a> qty %s %s <b>unreserved</b>")
|
||||||
% (product.id, product.display_name,
|
% (product.id, product.display_name,
|
||||||
@@ -52,9 +49,6 @@ class StockMove(models.Model):
|
|||||||
class StockMoveLine(models.Model):
|
class StockMoveLine(models.Model):
|
||||||
_inherit = 'stock.move.line'
|
_inherit = 'stock.move.line'
|
||||||
|
|
||||||
# for optional display in tree view
|
|
||||||
product_barcode = fields.Char(related='product_id.barcode', string="Product Barcode")
|
|
||||||
|
|
||||||
# TODO: I think it's not complete
|
# TODO: I think it's not complete
|
||||||
def button_do_unreserve(self):
|
def button_do_unreserve(self):
|
||||||
for moveline in self:
|
for moveline in self:
|
||||||
@@ -66,7 +60,7 @@ class StockMoveLine(models.Model):
|
|||||||
picking = moveline.move_id.picking_id
|
picking = moveline.move_id.picking_id
|
||||||
if picking:
|
if picking:
|
||||||
product = moveline.product_id
|
product = moveline.product_id
|
||||||
picking.message_post(body=_(
|
picking.message_post(_(
|
||||||
"Product <a href=# data-oe-model=product.product "
|
"Product <a href=# data-oe-model=product.product "
|
||||||
"data-oe-id=%d>%s</a> qty %s %s <b>unreserved</b>")
|
"data-oe-id=%d>%s</a> qty %s %s <b>unreserved</b>")
|
||||||
% (product.id, product.display_name,
|
% (product.id, product.display_name,
|
||||||
|
|||||||
@@ -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')
|
|
||||||
@@ -1,56 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<!--
|
|
||||||
Copyright 2021 Akretion (http://www.akretion.com/)
|
|
||||||
@author Alexis de Lattre <alexis.delattre@akretion.com>
|
|
||||||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
|
||||||
-->
|
|
||||||
|
|
||||||
<odoo>
|
|
||||||
|
|
||||||
|
|
||||||
<record id="view_stock_product_template_tree" model="ir.ui.view">
|
|
||||||
<field name="name">stock.usability.product.template.tree</field>
|
|
||||||
<field name="model">product.template</field>
|
|
||||||
<field name="inherit_id" ref="stock.view_stock_product_template_tree" />
|
|
||||||
<field name="arch" type="xml">
|
|
||||||
<field name="responsible_id" position="attributes">
|
|
||||||
<attribute name="optional">hide</attribute>
|
|
||||||
</field>
|
|
||||||
</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
<record id="product_template_form_view_procurement_button" model="ir.ui.view">
|
|
||||||
<field name="name">stock_usability.product.template.form</field>
|
|
||||||
<field name="model">product.template</field>
|
|
||||||
<field name="inherit_id" ref="stock.product_template_form_view_procurement_button"/>
|
|
||||||
<field name="arch" type="xml">
|
|
||||||
<button name="action_view_stock_move_lines" position="before">
|
|
||||||
<button string="Stock Moves"
|
|
||||||
type="object"
|
|
||||||
name= "action_view_stock_move"
|
|
||||||
attrs="{'invisible': [('type', 'not in', ('product', 'consu'))]}"
|
|
||||||
groups="stock.group_stock_user"
|
|
||||||
class="oe_stat_button" icon="fa-exchange"
|
|
||||||
/>
|
|
||||||
</button>
|
|
||||||
</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
<record id="product_form_view_procurement_button" model="ir.ui.view">
|
|
||||||
<field name="name">stock_usability.product.product.form</field>
|
|
||||||
<field name="model">product.product</field>
|
|
||||||
<field name="inherit_id" ref="stock.product_form_view_procurement_button"/>
|
|
||||||
<field name="arch" type="xml">
|
|
||||||
<button name="action_view_stock_move_lines" position="before">
|
|
||||||
<button string="Stock Moves"
|
|
||||||
type="object"
|
|
||||||
name= "action_view_stock_move"
|
|
||||||
attrs="{'invisible': [('type', 'not in', ('product', 'consu'))]}"
|
|
||||||
groups="stock.group_stock_user"
|
|
||||||
class="oe_stat_button" icon="fa-exchange"
|
|
||||||
/>
|
|
||||||
</button>
|
|
||||||
</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
</odoo>
|
|
||||||
@@ -21,9 +21,6 @@
|
|||||||
<attribute name="decoration-info">product_qty > theoretical_qty</attribute>
|
<attribute name="decoration-info">product_qty > theoretical_qty</attribute>
|
||||||
<attribute name="decoration-danger">product_qty < theoretical_qty</attribute>
|
<attribute name="decoration-danger">product_qty < theoretical_qty</attribute>
|
||||||
</tree>
|
</tree>
|
||||||
<field name="location_id" position="attributes">
|
|
||||||
<attribute name="invisible">0</attribute>
|
|
||||||
</field>
|
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
|
|||||||
@@ -58,9 +58,6 @@
|
|||||||
states="partially_available,assigned"
|
states="partially_available,assigned"
|
||||||
icon="fa-ban"/>
|
icon="fa-ban"/>
|
||||||
</field>
|
</field>
|
||||||
<field name="product_id" position="after">
|
|
||||||
<field name="product_barcode" optional="hide"/>
|
|
||||||
</field>
|
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
@@ -81,20 +78,6 @@
|
|||||||
states="partially_available,assigned"
|
states="partially_available,assigned"
|
||||||
icon="fa-ban"/>
|
icon="fa-ban"/>
|
||||||
</field>
|
</field>
|
||||||
<field name="product_id" position="after">
|
|
||||||
<field name="product_barcode" optional="hide"/>
|
|
||||||
</field>
|
|
||||||
</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
<!-- View embedded in picking -->
|
|
||||||
<record id="view_stock_move_line_detailed_operation_tree" model="ir.ui.view">
|
|
||||||
<field name="model">stock.move.line</field>
|
|
||||||
<field name="inherit_id" ref="stock.view_stock_move_line_detailed_operation_tree" />
|
|
||||||
<field name="arch" type="xml">
|
|
||||||
<field name="product_id" position="after">
|
|
||||||
<field name="product_barcode" optional="hide"/>
|
|
||||||
</field>
|
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
|
|||||||
@@ -30,12 +30,9 @@
|
|||||||
</xpath>
|
</xpath>
|
||||||
<xpath expr="//field[@name='move_ids_without_package']/tree/field[@name='location_id']" position="replace"/>
|
<xpath expr="//field[@name='move_ids_without_package']/tree/field[@name='location_id']" position="replace"/>
|
||||||
<xpath expr="//field[@name='move_ids_without_package']/tree/field[@name='location_dest_id']" position="replace"/>
|
<xpath expr="//field[@name='move_ids_without_package']/tree/field[@name='location_dest_id']" position="replace"/>
|
||||||
<xpath expr="//field[@name='move_ids_without_package']/tree/field[@name='name']" position="replace"/>
|
|
||||||
<xpath expr="//field[@name='move_ids_without_package']/tree/field[@name='product_id']" position="after">
|
<xpath expr="//field[@name='move_ids_without_package']/tree/field[@name='product_id']" position="after">
|
||||||
<field name="product_barcode" optional="hide"/>
|
<field name="location_id" groups="stock.group_stock_multi_locations"/>
|
||||||
<field name="name" optional="hide"/>
|
<field name="location_dest_id" groups="stock.group_stock_multi_locations"/>
|
||||||
<field name="location_id" groups="stock.group_stock_multi_locations" optional="show"/>
|
|
||||||
<field name="location_dest_id" groups="stock.group_stock_multi_locations" optional="show"/>
|
|
||||||
</xpath>
|
</xpath>
|
||||||
<xpath expr="//field[@name='move_ids_without_package']/tree/button[@name='action_assign_serial']" position="after">
|
<xpath expr="//field[@name='move_ids_without_package']/tree/button[@name='action_assign_serial']" position="after">
|
||||||
<button type="object" name="button_do_unreserve" string="Unreserve"
|
<button type="object" name="button_do_unreserve" string="Unreserve"
|
||||||
@@ -43,6 +40,15 @@
|
|||||||
states="partially_available,assigned"
|
states="partially_available,assigned"
|
||||||
icon="fa-ban"/>
|
icon="fa-ban"/>
|
||||||
</xpath>
|
</xpath>
|
||||||
|
<!-- STOCK MOVE LINE -->
|
||||||
|
<!--
|
||||||
|
<xpath expr="//field[@name='move_line_ids_without_package']/tree/field[@name='location_id']" position="attributes">
|
||||||
|
<attribute name="attrs">{}</attribute>
|
||||||
|
</xpath>
|
||||||
|
<xpath expr="//field[@name='move_line_ids_without_package']/tree/field[@name='location_dest_id']" position="attributes">
|
||||||
|
<attribute name="attrs">{}</attribute>
|
||||||
|
</xpath>
|
||||||
|
-->
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
|
|||||||
@@ -1,43 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<!--
|
|
||||||
Copyright 2014-2020 Akretion (http://www.akretion.com/)
|
|
||||||
@author Alexis de Lattre <alexis.delattre@akretion.com>
|
|
||||||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
|
||||||
-->
|
|
||||||
|
|
||||||
<odoo>
|
|
||||||
|
|
||||||
|
|
||||||
<record id="view_warehouse_orderpoint_form" model="ir.ui.view">
|
|
||||||
<field name="model">stock.warehouse.orderpoint</field>
|
|
||||||
<field name="inherit_id" ref="stock.view_warehouse_orderpoint_form" />
|
|
||||||
<field name="arch" type="xml">
|
|
||||||
<field name="product_id" position="after">
|
|
||||||
<field name="trigger"/>
|
|
||||||
</field>
|
|
||||||
</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
<record id="view_warehouse_orderpoint_tree_editable" model="ir.ui.view">
|
|
||||||
<field name="model">stock.warehouse.orderpoint</field>
|
|
||||||
<field name="inherit_id" ref="stock.view_warehouse_orderpoint_tree_editable" />
|
|
||||||
<field name="arch" type="xml">
|
|
||||||
<field name="trigger" position="attributes">
|
|
||||||
<attribute name="optional">show</attribute>
|
|
||||||
</field>
|
|
||||||
</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
<record id="view_warehouse_orderpoint_tree_editable_config" model="ir.ui.view">
|
|
||||||
<field name="model">stock.warehouse.orderpoint</field>
|
|
||||||
<field name="inherit_id" ref="stock.view_warehouse_orderpoint_tree_editable_config" />
|
|
||||||
<field name="arch" type="xml">
|
|
||||||
<field name="trigger" position="attributes">
|
|
||||||
<attribute name="optional">show</attribute>
|
|
||||||
</field>
|
|
||||||
</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</odoo>
|
|
||||||
Reference in New Issue
Block a user